text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
from langchain_community.tools.gmail.base import GmailBaseTool
__all__ = ["GmailBaseTool"]
| langchain/libs/langchain/langchain/tools/gmail/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/gmail/base.py",
"repo_id": "langchain",
"token_count": 28
} | 549 |
import os
from pathlib import Path
class LogConfig:
def __init__(self):
self.log_debug = ""
self.log_err = ""
self.log_info = ""
self.log_worker = ""
self.get_default_config()
@staticmethod
def get_env_variable(var="CI_LOG_PATH"):
""" get log path for testin... | milvus/tests/python_client/config/log_config.py/0 | {
"file_path": "milvus/tests/python_client/config/log_config.py",
"repo_id": "milvus",
"token_count": 698
} | 1,999 |
"""Chain that interprets a prompt and executes bash code to perform bash operations."""
| langchain/libs/experimental/langchain_experimental/llm_bash/__init__.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/llm_bash/__init__.py",
"repo_id": "langchain",
"token_count": 18
} | 421 |
- sections:
- local: index
title: 🤗 Transformers
title: Get started | transformers/docs/source/tr/_toctree.yml/0 | {
"file_path": "transformers/docs/source/tr/_toctree.yml",
"repo_id": "transformers",
"token_count": 25
} | 568 |
# Azure CosmosDB for MongoDB vCore connection string
AZURE_COSMOSDB_CONNECTION_STRING=
# If you're using Azure OpenAI API, you'll need to set these variables
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_API_INSTANCE_NAME=
AZURE_OPENAI_API_DEPLOYMENT_NAME=
AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=
AZURE_OPENAI_API_VERSION=
#... | langchainjs/examples/src/indexes/vector_stores/azure_cosmosdb/.env.example/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/azure_cosmosdb/.env.example",
"repo_id": "langchainjs",
"token_count": 148
} | 845 |
python_tests()
| llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,696 |
python_tests()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-cohere/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-cohere/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,358 |
# LlamaIndex Multi-Modal-Llms Integration: Replicate Multi Modal
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate-multi-modal/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate-multi-modal/README.md",
"repo_id": "llama_index",
"token_count": 20
} | 1,430 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/distilbert/test_modeling_tf_distilbert.py/0 | {
"file_path": "transformers/tests/models/distilbert/test_modeling_tf_distilbert.py",
"repo_id": "transformers",
"token_count": 4547
} | 712 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/mobilenet_v1.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mobilenet_v1.md",
"repo_id": "transformers",
"token_count": 1403
} | 511 |
""" Misc utils
Hacked together by / Copyright 2020 Ross Wightman
"""
import argparse
import ast
import re
def natural_key(string_):
"""See http://www.codinghorror.com/blog/archives/001018.html"""
return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_.lower())]
def add_bool_arg(parser, nam... | pytorch-image-models/timm/utils/misc.py/0 | {
"file_path": "pytorch-image-models/timm/utils/misc.py",
"repo_id": "pytorch-image-models",
"token_count": 451
} | 414 |
<jupyter_start><jupyter_text>Qdrant Vector Store - Metadata Filter If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-vector-stores-qdrant
!pip install llama-index qdrant_client<jupyter_output><empty_output><jupyter_text>Build a Pinecone Inde... | llama_index/docs/examples/vector_stores/Qdrant_metadata_filter.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/Qdrant_metadata_filter.ipynb",
"repo_id": "llama_index",
"token_count": 1848
} | 1,168 |
"""Milvus vector store index.
An index that is built within Milvus.
"""
import logging
from typing import Any, Dict, List, Optional, Union
import pymilvus # noqa
from llama_index.core.schema import BaseNode, TextNode
from llama_index.core.vector_stores.types import (
MetadataFilters,
VectorStore,
Vector... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py",
"repo_id": "llama_index",
"token_count": 5608
} | 1,529 |
<jupyter_start><jupyter_text>Fine-tuning a 🤗 Transformers model on TPU with **Flax/JAX** In this notebook, we will see how to fine-tune one of the [🤗 Transformers](https://github.com/huggingface/transformers) models on TPU using [**Flax**](https://flax.readthedocs.io/en/latest/index.html). As can be seen on [this ben... | notebooks/examples/text_classification_flax.ipynb/0 | {
"file_path": "notebooks/examples/text_classification_flax.ipynb",
"repo_id": "notebooks",
"token_count": 9221
} | 304 |
module.exports = {
i18n: {
// providing the locales supported by your application
locales: ["en-US"],
// default locale used when the non-locale paths are visited
defaultLocale: "en-US",
},
} | auto-evaluator/nextjs/next.config.js/0 | {
"file_path": "auto-evaluator/nextjs/next.config.js",
"repo_id": "auto-evaluator",
"token_count": 87
} | 3 |
from langchain_community.agent_toolkits.clickup.toolkit import ClickupToolkit
__all__ = ["ClickupToolkit"]
| langchain/libs/langchain/langchain/agents/agent_toolkits/clickup/toolkit.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/clickup/toolkit.py",
"repo_id": "langchain",
"token_count": 35
} | 463 |
# Azure AI Search
[Azure AI Search](https://azure.microsoft.com/products/ai-services/ai-search) (formerly known as Azure Search and Azure Cognitive Search) is a distributed, RESTful search engine optimized for speed and relevance on production-scale workloads on Azure. It supports also vector search using the [k-neare... | langchainjs/docs/core_docs/docs/integrations/vectorstores/azure_aisearch.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/azure_aisearch.mdx",
"repo_id": "langchainjs",
"token_count": 711
} | 742 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 9083
} | 263 |
<jupyter_start><jupyter_text>DDIM InversionIn this notebook we will explore **inversion**, see how it relates to sampling, and apply it to the task of editing images with Stable Diffusion. What You Will Learn- How DDIM sampling works- Deterministic vs Stochastic samplers- The theory behind DDIM inversion- Editing imag... | diffusion-models-class/unit4/01_ddim_inversion.ipynb/0 | {
"file_path": "diffusion-models-class/unit4/01_ddim_inversion.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 5343
} | 302 |
"""Google Generative AI Vector Store.
The GenAI Semantic Retriever API is a managed end-to-end service that allows
developers to create a corpus of documents to perform semantic search on
related passages given a user query. For more information visit:
https://developers.generativeai.google/guide
"""
import logging
i... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-google/llama_index/vector_stores/google/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-google/llama_index/vector_stores/google/base.py",
"repo_id": "llama_index",
"token_count": 7133
} | 1,656 |
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | accelerate/src/accelerate/utils/tqdm.py/0 | {
"file_path": "accelerate/src/accelerate/utils/tqdm.py",
"repo_id": "accelerate",
"token_count": 433
} | 16 |
<jupyter_start><jupyter_text>Run LLMs locally Use caseThe popularity of projects like [PrivateGPT](https://github.com/imartinez/privateGPT), [llama.cpp](https://github.com/ggerganov/llama.cpp), and [GPT4All](https://github.com/nomic-ai/gpt4all) underscore the demand to run LLMs locally (on your own device).This has at ... | langchain/docs/docs/guides/local_llms.ipynb/0 | {
"file_path": "langchain/docs/docs/guides/local_llms.ipynb",
"repo_id": "langchain",
"token_count": 3768
} | 95 |
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
import argparse
import os.path as osp
import re
import torch
from safetensors.torch import load_file, save_file
# ========... | diffusers/scripts/convert_diffusers_to_original_stable_diffusion.py/0 | {
"file_path": "diffusers/scripts/convert_diffusers_to_original_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 6259
} | 233 |
package common
// Compoent is the base class for difference components of the system
type Component interface {
Start() error
Stop() error
}
| chroma/go/coordinator/internal/common/component.go/0 | {
"file_path": "chroma/go/coordinator/internal/common/component.go",
"repo_id": "chroma",
"token_count": 36
} | 45 |
from typing import Any, Dict, List
def get_prompt_input_key(inputs: Dict[str, Any], memory_variables: List[str]) -> str:
"""
Get the prompt input key.
Args:
inputs: Dict[str, Any]
memory_variables: List[str]
Returns:
A prompt input key.
"""
# "stop" is a special key t... | langchain/libs/langchain/langchain/memory/utils.py/0 | {
"file_path": "langchain/libs/langchain/langchain/memory/utils.py",
"repo_id": "langchain",
"token_count": 243
} | 550 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/kandinsky2_2/test_kandinsky.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky.py",
"repo_id": "diffusers",
"token_count": 3973
} | 264 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/it/perf_train_cpu.md/0 | {
"file_path": "transformers/docs/source/it/perf_train_cpu.md",
"repo_id": "transformers",
"token_count": 1307
} | 474 |
#!/usr/bin/env bash
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/scripts/fsmt/eval-facebook-wmt19.sh/0 | {
"file_path": "transformers/scripts/fsmt/eval-facebook-wmt19.sh",
"repo_id": "transformers",
"token_count": 2623
} | 613 |
<jupyter_start><jupyter_text>Ollama[Ollama](https://ollama.ai/) allows you to run open-source large language models, such as Llama 2, locally.Ollama bundles model weights, configuration, and data into a single package, defined by a Modelfile. It optimizes setup and configuration details, including GPU usage.For a compl... | langchain/docs/docs/integrations/llms/ollama.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/ollama.ipynb",
"repo_id": "langchain",
"token_count": 1584
} | 120 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.dashscope import DashScope
def test_class():
names_of_base_classes = [b.__name__ for b in DashScope.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-dashscope/tests/test_llms_dashscope.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-dashscope/tests/test_llms_dashscope.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,254 |
"""Module implements an agent that uses OpenAI's APIs function enabled API."""
import json
from json import JSONDecodeError
from typing import Any, List, Optional, Sequence, Tuple, Union
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction, AgentActionMessageLog, AgentFinish
from la... | langchain/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py",
"repo_id": "langchain",
"token_count": 5691
} | 446 |
package segments
import (
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
type byPK struct {
r *segcorepb.RetrieveResults
}
func (s *byPK) Len() int {
if s.r == nil {
return 0
}
s.r.GetIds().GetI... | milvus/internal/querynodev2/segments/result_sorter.go/0 | {
"file_path": "milvus/internal/querynodev2/segments/result_sorter.go",
"repo_id": "milvus",
"token_count": 1281
} | 1,876 |
.PHONY: test precommit benchmark_core benchmark_aux common_tests slow_tests test_examples tests_gpu
check_dirs := examples tests trl
ACCELERATE_CONFIG_PATH = `pwd`/examples/accelerate_configs
COMMAND_FILES_PATH = `pwd`/commands
test:
python -m pytest -n auto --dist=loadfile -s -v ./tests/
precommit:
pre-commit ru... | trl/Makefile/0 | {
"file_path": "trl/Makefile",
"repo_id": "trl",
"token_count": 452
} | 775 |
from typing import Any, Optional, Sequence
from llama_index.core.evaluation.base import BaseEvaluator, EvaluationResult
from llama_index.core.prompts.mixin import PromptDictType, PromptMixinType
from tonic_validate.metrics.answer_similarity_metric import (
AnswerSimilarityMetric,
)
from tonic_validate.services.op... | llama_index/llama-index-integrations/evaluation/llama-index-evaluation-tonic-validate/llama_index/evaluation/tonic_validate/answer_similarity.py/0 | {
"file_path": "llama_index/llama-index-integrations/evaluation/llama-index-evaluation-tonic-validate/llama_index/evaluation/tonic_validate/answer_similarity.py",
"repo_id": "llama_index",
"token_count": 811
} | 1,289 |
import threading
import pytest
import time
from base.partition_wrapper import ApiPartitionWrapper
from base.client_base import TestcaseBase
from common import common_func as cf
from common import common_type as ct
from utils.util_log import test_log as log
from common.common_type import CaseLabel, CheckTasks
from comm... | milvus/tests/python_client/testcases/test_partition.py/0 | {
"file_path": "milvus/tests/python_client/testcases/test_partition.py",
"repo_id": "milvus",
"token_count": 24735
} | 1,911 |
from typing import Tuple, Union
from langchain.chains.query_constructor.ir import (
Comparator,
Comparison,
Operation,
Operator,
StructuredQuery,
Visitor,
)
def process_value(value: Union[int, float, str]) -> str:
"""Convert a value to a string and add single quotes if it is a string."""
... | langchain/libs/langchain/langchain/retrievers/self_query/vectara.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/self_query/vectara.py",
"repo_id": "langchain",
"token_count": 926
} | 561 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/text_splitter/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/text_splitter/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,524 |
import logging
from typing import Any, Dict, Optional, Sequence
from llama_index.legacy.multi_modal_llms.base import ChatMessage
from llama_index.legacy.multi_modal_llms.generic_utils import encode_image
from llama_index.legacy.schema import ImageDocument
DEFAULT_OPENAI_API_TYPE = "open_ai"
DEFAULT_OPENAI_API_BASE = ... | llama_index/llama-index-legacy/llama_index/legacy/multi_modal_llms/openai_utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/multi_modal_llms/openai_utils.py",
"repo_id": "llama_index",
"token_count": 1293
} | 1,578 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/speech_to_text_2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/speech_to_text_2.md",
"repo_id": "transformers",
"token_count": 1517
} | 494 |
**NOTE**: This example is outdated and is not longer actively maintained. Please
follow the new instructions of fine-tuning Wav2Vec2 [here](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/README.md)
## Fine-tuning Wav2Vec2
The `run_asr.py` script allows one to fine-tune pret... | transformers/examples/research_projects/wav2vec2/README.md/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/README.md",
"repo_id": "transformers",
"token_count": 3574
} | 580 |
# Denoising Diffusion Policy Optimization
## The why
| Before | After DDPO finetuning |
| --- | --- |
| <div style="text-align: center"><img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/pre_squirrel.png"/></div> | <div style="text-align: center"><img src="https://huggin... | trl/docs/source/ddpo_trainer.mdx/0 | {
"file_path": "trl/docs/source/ddpo_trainer.mdx",
"repo_id": "trl",
"token_count": 2407
} | 816 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/rootcoord/timeticksync.go/0 | {
"file_path": "milvus/internal/rootcoord/timeticksync.go",
"repo_id": "milvus",
"token_count": 4828
} | 2,060 |
<jupyter_start><jupyter_text>Chroma Multi-Modal Demo with LlamaIndex>[Chroma](https://docs.trychroma.com/getting-started) is a AI-native open-source vector database focused on developer productivity and happiness. Chroma is licensed under Apache 2.0. - [Website](https://www.tr... | llama_index/docs/examples/multi_modal/ChromaMultiModalDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/multi_modal/ChromaMultiModalDemo.ipynb",
"repo_id": "llama_index",
"token_count": 2666
} | 1,119 |
import { Group, Header, Stack, Text } from "@mantine/core";
import Image from "next/image";
import Link from "next/link";
import React from "react";
import githubIcon from "../public/github-mark.svg";
import { useMediaQuery } from "@mantine/hooks";
export enum MenuItem {
Demo = "Demo",
Playground = "Playground",
... | auto-evaluator/nextjs/components/HeaderEvaluator.tsx/0 | {
"file_path": "auto-evaluator/nextjs/components/HeaderEvaluator.tsx",
"repo_id": "auto-evaluator",
"token_count": 1422
} | 2 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/models/univnet/modeling_univnet.py/0 | {
"file_path": "transformers/src/transformers/models/univnet/modeling_univnet.py",
"repo_id": "transformers",
"token_count": 11259
} | 757 |
import logging
from pathlib import Path
from typing import Iterator, List, Optional, Sequence, Union
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
logger = logging.getLogger(__name__)
class MWDumpLoader(BaseLoader):
"""Load `MediaWiki` dump from ... | langchain/libs/community/langchain_community/document_loaders/mediawikidump.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/mediawikidump.py",
"repo_id": "langchain",
"token_count": 1764
} | 235 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,639 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/proxy/task_alias_test.go/0 | {
"file_path": "milvus/internal/proxy/task_alias_test.go",
"repo_id": "milvus",
"token_count": 2581
} | 1,832 |
from langchain.chains.openai_tools.extraction import create_extraction_chain_pydantic
__all__ = ["create_extraction_chain_pydantic"]
| langchain/libs/langchain/langchain/chains/openai_tools/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/openai_tools/__init__.py",
"repo_id": "langchain",
"token_count": 43
} | 495 |
# coding=utf-8
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/jukebox/test_modeling_jukebox.py/0 | {
"file_path": "transformers/tests/models/jukebox/test_modeling_jukebox.py",
"repo_id": "transformers",
"token_count": 9327
} | 806 |
# for backwards compatibility
from llama_index.legacy.core.base_retriever import BaseRetriever
__all__ = [
"BaseRetriever",
]
| llama_index/llama-index-legacy/llama_index/legacy/indices/base_retriever.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/base_retriever.py",
"repo_id": "llama_index",
"token_count": 46
} | 1,561 |
import { ChatOpenAI } from "@langchain/openai";
import { initializeAgentExecutorWithOptions } from "langchain/agents";
import { Calculator } from "langchain/tools/calculator";
import { SerpAPI } from "@langchain/community/tools/serpapi";
export const run = async () => {
process.env.LANGCHAIN_HANDLER = "langchain";
... | langchainjs/examples/src/agents/chat_convo_with_tracing.ts/0 | {
"file_path": "langchainjs/examples/src/agents/chat_convo_with_tracing.ts",
"repo_id": "langchainjs",
"token_count": 472
} | 789 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/main_classes/deepspeed.md/0 | {
"file_path": "transformers/docs/source/zh/main_classes/deepspeed.md",
"repo_id": "transformers",
"token_count": 49099
} | 537 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | accelerate/docs/source/package_reference/cli.md/0 | {
"file_path": "accelerate/docs/source/package_reference/cli.md",
"repo_id": "accelerate",
"token_count": 4969
} | 3 |
""" ONNX-runtime validation script
This script was created to verify accuracy and performance of exported ONNX
models running with the onnxruntime. It utilizes the PyTorch dataloader/processing
pipeline for a fair comparison against the originals.
Copyright 2020 Ross Wightman
"""
import argparse
import numpy as np
im... | pytorch-image-models/onnx_validate.py/0 | {
"file_path": "pytorch-image-models/onnx_validate.py",
"repo_id": "pytorch-image-models",
"token_count": 1960
} | 345 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/dinat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dinat.md",
"repo_id": "transformers",
"token_count": 1371
} | 488 |
import {
Serializable,
SerializedConstructor,
SerializedNotImplemented,
SerializedSecret,
get_lc_unique_name,
} from "./serializable.js";
import { optionalImportEntrypoints as defaultOptionalImportEntrypoints } from "./import_constants.js";
import * as coreImportMap from "./import_map.js";
import type { Optio... | langchainjs/langchain-core/src/load/index.ts/0 | {
"file_path": "langchainjs/langchain-core/src/load/index.ts",
"repo_id": "langchainjs",
"token_count": 3057
} | 826 |
# coding=utf-8
# Copyright 2022 UW-Madison and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | transformers/src/transformers/models/nystromformer/configuration_nystromformer.py/0 | {
"file_path": "transformers/src/transformers/models/nystromformer/configuration_nystromformer.py",
"repo_id": "transformers",
"token_count": 2444
} | 708 |
# coding=utf-8
# Copyright 2021 Iz Beltagy, Matthew E. Peters, Arman Cohan and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... | transformers/src/transformers/models/led/configuration_led.py/0 | {
"file_path": "transformers/src/transformers/models/led/configuration_led.py",
"repo_id": "transformers",
"token_count": 2973
} | 704 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py",
"repo_id": "diffusers",
"token_count": 33880
} | 242 |
package coordinator
import (
"context"
"sync"
"github.com/chroma/chroma-coordinator/internal/common"
"github.com/chroma/chroma-coordinator/internal/metastore"
"github.com/chroma/chroma-coordinator/internal/model"
"github.com/chroma/chroma-coordinator/internal/notification"
"github.com/chroma/chroma-coordinator... | chroma/go/coordinator/internal/coordinator/meta.go/0 | {
"file_path": "chroma/go/coordinator/internal/coordinator/meta.go",
"repo_id": "chroma",
"token_count": 5327
} | 47 |
# coding=utf-8
# Copyright 2021 NVIDIA The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | transformers/src/transformers/models/segformer/modeling_segformer.py/0 | {
"file_path": "transformers/src/transformers/models/segformer/modeling_segformer.py",
"repo_id": "transformers",
"token_count": 14945
} | 666 |
package logutil
import (
"context"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap/zapcore"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"github.com/milvus-io/milvus/pkg/log"
)
const (
logLevelRPCMetaKey = "log_level"
clientRequ... | milvus/pkg/util/logutil/grpc_interceptor.go/0 | {
"file_path": "milvus/pkg/util/logutil/grpc_interceptor.go",
"repo_id": "milvus",
"token_count": 918
} | 1,835 |
import logging
import subprocess
from pathlib import Path
from typing import Dict, List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class PDFNougatOCR(BaseReader):
def nougat_ocr(self, file_path: Path) -> str:
cli_command = ["nougat", "--mar... | llama_index/llama-index-integrations/readers/llama-index-readers-nougat-ocr/llama_index/readers/nougat_ocr/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-nougat-ocr/llama_index/readers/nougat_ocr/base.py",
"repo_id": "llama_index",
"token_count": 837
} | 1,493 |
"""Vectara index.
An index that is built on top of Vectara.
"""
import json
import logging
from typing import Any, List, Optional, Tuple
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.indices.managed.types import Managed... | llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/llama_index/indices/managed/vectara/retriever.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/llama_index/indices/managed/vectara/retriever.py",
"repo_id": "llama_index",
"token_count": 5302
} | 1,287 |
from llama_index.core.storage.index_store.keyval_index_store import KVIndexStore
from llama_index.storage.index_store.firestore import FirestoreIndexStore
def test_class():
names_of_base_classes = [b.__name__ for b in FirestoreIndexStore.__mro__]
assert KVIndexStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-firestore/tests/test_storage_index_store_firestore.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-firestore/tests/test_storage_index_store_firestore.py",
"repo_id": "llama_index",
"token_count": 105
} | 1,494 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.apify import ApifyActor, ApifyDataset
def test_class():
names_of_base_classes = [b.__name__ for b in ApifyDataset.__mro__]
assert BaseReader.__name__ in names_of_base_classes
names_of_base_classes = [b.__name__ for b in ApifyAc... | llama_index/llama-index-integrations/readers/llama-index-readers-apify/tests/test_readers_apify.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-apify/tests/test_readers_apify.py",
"repo_id": "llama_index",
"token_count": 145
} | 1,289 |
import ts from "typescript";
import * as fs from "node:fs";
export function identifySecrets(absTsConfigPath: string) {
const secrets = new Set();
const tsConfig = ts.parseJsonConfigFileContent(
ts.readJsonConfigFile(absTsConfigPath, (p) => fs.readFileSync(p, "utf-8")),
ts.sys,
"./src/"
);
// `tsC... | langchainjs/libs/langchain-scripts/src/identify-secrets.ts/0 | {
"file_path": "langchainjs/libs/langchain-scripts/src/identify-secrets.ts",
"repo_id": "langchainjs",
"token_count": 1805
} | 1,044 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "embeddings/hf_transformers",
});
export * from "@langchain/community/embeddings/hf_transformers";
| langchainjs/langchain/src/embeddings/hf_transformers.ts/0 | {
"file_path": "langchainjs/langchain/src/embeddings/hf_transformers.ts",
"repo_id": "langchainjs",
"token_count": 80
} | 888 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-hive/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hive/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,377 |
[tool.poetry]
name = "self-query-supabase"
version = "0.1.0"
description = "QA with Supabase using natural language"
authors = [
"Greg Richardson <greg@supabase.io>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
tiktoken = "^0.5.1"
supabase = "^1.2.0"
l... | langchain/templates/self-query-supabase/pyproject.toml/0 | {
"file_path": "langchain/templates/self-query-supabase/pyproject.toml",
"repo_id": "langchain",
"token_count": 347
} | 682 |
import "./globals.css";
import { Public_Sans } from "next/font/google";
const publicSans = Public_Sans({ subsets: ["latin"] });
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
<title>LangSmith Feedback Example</title>
... | langsmith-cookbook/feedback-examples/nextjs/app/layout.tsx/0 | {
"file_path": "langsmith-cookbook/feedback-examples/nextjs/app/layout.tsx",
"repo_id": "langsmith-cookbook",
"token_count": 615
} | 1,057 |
<jupyter_start><jupyter_text>FLARE Query EngineAdapted from the paper "Active Retrieval Augmented Generation"Currently implements FLARE Instruct, which tells the LLM to generate retrieval instructions. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install l... | llama_index/docs/examples/query_engine/flare_query_engine.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/flare_query_engine.ipynb",
"repo_id": "llama_index",
"token_count": 847
} | 1,139 |
import CodeBlock from "@theme/CodeBlock";
# Google Vertex AI
:::info Experimental
This API is new and may change in future LangChain.js versions.
:::
The `GoogleVertexAIMultimodalEmbeddings` class provides additional methods that are
parallels to the `embedDocuments()` and `embedQuery()` methods:
- `embedImage()` a... | langchainjs/docs/core_docs/docs/modules/data_connection/experimental/multimodal_embeddings/google_vertex_ai.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/experimental/multimodal_embeddings/google_vertex_ai.mdx",
"repo_id": "langchainjs",
"token_count": 693
} | 763 |
chat-langchain/
assets/ | chat-langchain/.dockerignore/0 | {
"file_path": "chat-langchain/.dockerignore",
"repo_id": "chat-langchain",
"token_count": 8
} | 4 |
#!/usr/bin/env python
from argparse import ArgumentParser
from datasets.commands.convert import ConvertCommand
from datasets.commands.dummy_data import DummyDataCommand
from datasets.commands.env import EnvironmentCommand
from datasets.commands.run_beam import RunBeamCommand
from datasets.commands.test import TestComm... | datasets/src/datasets/commands/datasets_cli.py/0 | {
"file_path": "datasets/src/datasets/commands/datasets_cli.py",
"repo_id": "datasets",
"token_count": 473
} | 138 |
from typing import Optional
from llama_index.core.base.base_selector import BaseSelector
from llama_index.core.llms.llm import LLM
from llama_index.core.selectors.llm_selectors import (
LLMMultiSelector,
LLMSingleSelector,
)
from llama_index.core.selectors.pydantic_selectors import (
PydanticMultiSelector,... | llama_index/llama-index-core/llama_index/core/selectors/utils.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/selectors/utils.py",
"repo_id": "llama_index",
"token_count": 409
} | 1,218 |
from typing import Any, Dict, List, Optional, cast
from llama_index.legacy.callbacks.base_handler import BaseCallbackHandler
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
class SimpleLLMHandler(BaseCallbackHandler):
"""Callback handler for printing llms inputs/outputs."""
def __i... | llama_index/llama-index-legacy/llama_index/legacy/callbacks/simple_llm_handler.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/callbacks/simple_llm_handler.py",
"repo_id": "llama_index",
"token_count": 1000
} | 1,693 |
import pytest
@pytest.fixture(scope="module")
def flash_neox_handle(launcher):
with launcher("stabilityai/stablelm-tuned-alpha-3b", num_shard=1) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_neox(flash_neox_handle):
await flash_neox_handle.health(300)
return flash_neox_... | text-generation-inference/integration-tests/models/test_flash_neox.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_neox.py",
"repo_id": "text-generation-inference",
"token_count": 498
} | 381 |
use tokenizers::decoders::wordpiece::WordPiece as WordPieceDecoder;
use tokenizers::models::bpe::BPE;
use tokenizers::models::wordpiece::WordPiece;
use tokenizers::normalizers::bert::BertNormalizer;
use tokenizers::pre_tokenizers::bert::BertPreTokenizer;
use tokenizers::pre_tokenizers::byte_level::ByteLevel;
use tokeni... | tokenizers/tokenizers/tests/common/mod.rs/0 | {
"file_path": "tokenizers/tokenizers/tests/common/mod.rs",
"repo_id": "tokenizers",
"token_count": 771
} | 487 |
"""Simple reader that turns an iterable of strings into a list of Documents."""
from typing import List
from llama_index.core.readers.base import BasePydanticReader
from llama_index.core.schema import Document
class StringIterableReader(BasePydanticReader):
"""String Iterable Reader.
Gets a list of document... | llama_index/llama-index-core/llama_index/core/readers/string_iterable.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/readers/string_iterable.py",
"repo_id": "llama_index",
"token_count": 463
} | 1,293 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,217 |
//go:build ignore
package main
import (
. "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/operand"
. "github.com/mmcloughlin/avo/reg"
)
var unroll = 4
// inspired by the avo example https://github.com/mmcloughlin/avo
// avo is a tool to generate go assembly
func main() {
TEXT("L2", NOSPLIT, "fu... | milvus/pkg/util/distance/asm/l2.go/0 | {
"file_path": "milvus/pkg/util/distance/asm/l2.go",
"repo_id": "milvus",
"token_count": 964
} | 1,834 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["AutoMergingRetrieverPack"]
contains_example = true
import_path = "llama_index.packs.auto_... | llama_index/llama-index-packs/llama-index-packs-auto-merging-retriever/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-auto-merging-retriever/pyproject.toml",
"repo_id": "llama_index",
"token_count": 688
} | 1,645 |
import pickle
import pytest
from tokenizers import NormalizedString, Tokenizer
from tokenizers.models import BPE
from tokenizers.normalizers import BertNormalizer, Lowercase, Normalizer, Sequence, Strip, Prepend
class TestBertNormalizer:
def test_instantiate(self):
assert isinstance(BertNormalizer(), No... | tokenizers/bindings/python/tests/bindings/test_normalizers.py/0 | {
"file_path": "tokenizers/bindings/python/tests/bindings/test_normalizers.py",
"repo_id": "tokenizers",
"token_count": 2354
} | 441 |
from __future__ import annotations
import json
from io import StringIO
from typing import Any, Dict, Iterator, List, Optional
import requests
from langchain_core.callbacks.manager import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.outputs import GenerationChunk
fro... | langchain/libs/community/langchain_community/llms/llamafile.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/llamafile.py",
"repo_id": "langchain",
"token_count": 4397
} | 270 |
import { Fireworks } from "@langchain/community/llms/fireworks";
const model = new Fireworks({
temperature: 0.9,
// In Node.js defaults to process.env.FIREWORKS_API_KEY
fireworksApiKey: "YOUR-API-KEY",
});
| langchainjs/examples/src/models/llm/fireworks.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/fireworks.ts",
"repo_id": "langchainjs",
"token_count": 74
} | 873 |
# coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | transformers/tests/models/bertweet/test_tokenization_bertweet.py/0 | {
"file_path": "transformers/tests/models/bertweet/test_tokenization_bertweet.py",
"repo_id": "transformers",
"token_count": 1124
} | 747 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.intercom import IntercomReader
def test_class():
names_of_base_classes = [b.__name__ for b in IntercomReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-intercom/tests/test_readers_intercom.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-intercom/tests/test_readers_intercom.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,385 |
"""LLM Compiler Output Parser."""
import re
from typing import Any, Dict, List, Sequence
from llama_index.core.tools import BaseTool
from llama_index.core.types import BaseOutputParser
from .schema import JoinerOutput, LLMCompilerParseResult
from .utils import get_graph_dict
THOUGHT_PATTERN = r"Thought: ([^\n]*)"
A... | llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/output_parser.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/output_parser.py",
"repo_id": "llama_index",
"token_count": 1153
} | 1,640 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/prepline_sec_filings/api/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/prepline_sec_filings/api/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,426 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "llms/portkey",
});
export * from "@langchain/community/llms/portkey";
| langchainjs/langchain/src/llms/portkey.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/portkey.ts",
"repo_id": "langchainjs",
"token_count": 72
} | 967 |
<jupyter_start><jupyter_text>Lantern>[Lantern](https://github.com/lanterndata/lantern) is an open-source vector similarity search for `Postgres`It supports:- Exact and approximate nearest neighbor search- L2 squared distance, hamming distance, and cosine distanceThis notebook shows how to use the Postgres vector databa... | langchain/docs/docs/integrations/vectorstores/lantern.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/lantern.ipynb",
"repo_id": "langchain",
"token_count": 1935
} | 192 |
# Vector store-backed memory
`VectorStoreRetrieverMemory` stores memories in a VectorDB and queries the top-K most "salient" docs every time it is called.
This differs from most of the other Memory classes in that it doesn't explicitly track the order of interactions.
In this case, the "docs" are previous conversati... | langchainjs/docs/core_docs/docs/modules/memory/types/vectorstore_retriever_memory.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/memory/types/vectorstore_retriever_memory.mdx",
"repo_id": "langchainjs",
"token_count": 209
} | 735 |
from langchain_community.cache import (
AstraDBCache,
AstraDBSemanticCache,
CassandraCache,
CassandraSemanticCache,
FullLLMCache,
FullMd5LLMCache,
GPTCache,
InMemoryCache,
MomentoCache,
RedisCache,
RedisSemanticCache,
SQLAlchemyCache,
SQLAlchemyMd5Cache,
SQLiteCac... | langchain/libs/langchain/langchain/cache.py/0 | {
"file_path": "langchain/libs/langchain/langchain/cache.py",
"repo_id": "langchain",
"token_count": 320
} | 455 |
export function switchTheme() {
const { classList } = document.querySelector("html") as HTMLElement;
const metaTheme = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement;
if (classList.contains("dark")) {
classList.remove("dark");
metaTheme.setAttribute("content", "rgb(249, 250, 251)");
loc... | chat-ui/src/lib/switchTheme.ts/0 | {
"file_path": "chat-ui/src/lib/switchTheme.ts",
"repo_id": "chat-ui",
"token_count": 164
} | 94 |
package broker
import (
"context"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/internal/proto/rootcoordpb"
"github.com/milvus-io/milvus/internal/types"
"github.com/milv... | milvus/internal/datanode/broker/broker.go/0 | {
"file_path": "milvus/internal/datanode/broker/broker.go",
"repo_id": "milvus",
"token_count": 732
} | 1,691 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-patentsview/llama_index/readers/patentsview/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-patentsview/llama_index/readers/patentsview/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,363 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2024 bram-w, The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | diffusers/examples/research_projects/diffusion_dpo/train_diffusion_dpo.py/0 | {
"file_path": "diffusers/examples/research_projects/diffusion_dpo/train_diffusion_dpo.py",
"repo_id": "diffusers",
"token_count": 17438
} | 224 |
from langchain_community.document_loaders.onedrive_file import (
OneDriveFileLoader,
)
__all__ = ["OneDriveFileLoader"]
| langchain/libs/langchain/langchain/document_loaders/onedrive_file.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/onedrive_file.py",
"repo_id": "langchain",
"token_count": 41
} | 495 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.