text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-deeplake-multimodal-retrieval/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-deeplake-multimodal-retrieval/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,581 |
from langchain_community.document_loaders.mediawikidump import MWDumpLoader
__all__ = ["MWDumpLoader"]
| langchain/libs/langchain/langchain/document_loaders/mediawikidump.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/mediawikidump.py",
"repo_id": "langchain",
"token_count": 33
} | 484 |
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
| llama_index/.vscode/settings.json/0 | {
"file_path": "llama_index/.vscode/settings.json",
"repo_id": "llama_index",
"token_count": 123
} | 1,152 |
"""Util that calls Bing Search.
In order to set this up, follow instructions at:
https://levelup.gitconnected.com/api-tutorial-how-to-use-bing-web-search-api-in-python-4165d5592a7e
"""
from typing import Dict, List
import requests
from langchain_core.pydantic_v1 import BaseModel, Extra, Field, root_validator
from lan... | langchain/libs/community/langchain_community/utilities/bing_search.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/bing_search.py",
"repo_id": "langchain",
"token_count": 1564
} | 317 |
package kv
import (
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
type mockSnapshotKV struct {
SnapShotKV
SaveFunc func(key string, value string, ts typeutil.Timestamp) error
LoadFunc func(key string, ts typeutil.Timestamp) (string, error)
MultiSaveFunc ... | milvus/internal/kv/mock_snapshot_kv.go/0 | {
"file_path": "milvus/internal/kv/mock_snapshot_kv.go",
"repo_id": "milvus",
"token_count": 667
} | 1,993 |
# Wikipedia Tool
This tool fetches content from wikipedia and makes it available to the agent as a Tool. You can search for pages or load pages directly.
## Usage
This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/noteb... | llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/README.md",
"repo_id": "llama_index",
"token_count": 311
} | 1,463 |
/* eslint-disable no-process-env */
// eslint-disable-next-line import/no-extraneous-dependencies
import { BaseClient } from "@xata.io/client";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { XataVectorSearch } from "../xata.js";
// Tests require a ... | langchainjs/libs/langchain-community/src/vectorstores/tests/xata.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/xata.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1903
} | 1,002 |
from typing import Dict, Tuple
import pytest
from langchain_community.vectorstores.redis.filters import (
RedisFilterExpression,
RedisNum,
RedisTag,
RedisText,
)
from langchain_community.vectorstores.redis.schema import (
NumericFieldSchema,
RedisModel,
TagFieldSchema,
TextFieldSchema,
... | langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_redis.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_redis.py",
"repo_id": "langchain",
"token_count": 1541
} | 637 |
from typing import TYPE_CHECKING
from langchain_community.document_loaders.parsers.language.tree_sitter_segmenter import ( # noqa: E501
TreeSitterSegmenter,
)
if TYPE_CHECKING:
from tree_sitter import Language
CHUNK_QUERY = """
[
(function_definition_statement
name: (identifier)) @f... | langchain/libs/community/langchain_community/document_loaders/parsers/language/lua.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/parsers/language/lua.py",
"repo_id": "langchain",
"token_count": 315
} | 245 |
poetry_requirements(
name="poetry",
module_mapping={"instructorembedding": ["InstructorEmbedding"]}
)
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-instructor/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-instructor/BUILD",
"repo_id": "llama_index",
"token_count": 43
} | 1,265 |
"""Test functionality related to natbot."""
from typing import Any, Dict, List, Optional
from langchain_core.language_models.llms import LLM
from langchain.callbacks.manager import CallbackManagerForLLMRun
from langchain.chains.natbot.base import NatBotChain
class FakeLLM(LLM):
"""Fake LLM wrapper for testing ... | langchain/libs/langchain/tests/unit_tests/chains/test_natbot.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/chains/test_natbot.py",
"repo_id": "langchain",
"token_count": 666
} | 593 |
import pytest
from base.client_base import TestcaseBase
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
from utils.util_pymilvus import *
config_nodes = 8
class TestResourceGroupParams(TestcaseBase):
@pytest.fixture(scope="function"... | milvus/tests/python_client/testcases/test_resourcegroup.py/0 | {
"file_path": "milvus/tests/python_client/testcases/test_resourcegroup.py",
"repo_id": "milvus",
"token_count": 50829
} | 2,129 |
"""Utils for OpenAI agent."""
from typing import List, Union
from llama_index.core.tools import BaseTool
def get_function_by_name(tools: List[BaseTool], name: str) -> BaseTool:
"""Get function by name."""
name_to_tool = {tool.metadata.name: tool for tool in tools}
if name not in name_to_tool:
ra... | llama_index/llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/utils.py/0 | {
"file_path": "llama_index/llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/utils.py",
"repo_id": "llama_index",
"token_count": 266
} | 1,242 |
use serde::{Deserialize, Serialize};
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior};
use crate::utils::macro_rules_attribute;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[non_exhaustive]
#[macro_rules_attribute(impl_serde_type!)]
pub struct CharDelimiterSplit {
pub deli... | tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs",
"repo_id": "tokenizers",
"token_count": 296
} | 421 |
from langchain.schema.runnable.passthrough import __all__
EXPECTED_ALL = ["RunnableAssign", "RunnablePassthrough", "aidentity", "identity"]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/langchain/tests/unit_tests/schema/runnable/test_passthrough.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/schema/runnable/test_passthrough.py",
"repo_id": "langchain",
"token_count": 85
} | 615 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/custom_tools.md/0 | {
"file_path": "transformers/docs/source/ja/custom_tools.md",
"repo_id": "transformers",
"token_count": 15514
} | 477 |
/* eslint-disable no-process-env */
import { PromptTemplate } from "@langchain/core/prompts";
import * as hub from "../hub.js";
test("Test LangChain Hub client pushing a new repo", async () => {
const prompt = PromptTemplate.fromTemplate(
`You are a parrot. The current date is ${new Date().toISOString()}\n{inpu... | langchainjs/langchain/src/tests/hub.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/tests/hub.int.test.ts",
"repo_id": "langchainjs",
"token_count": 234
} | 954 |
# mypy: disable-error-code=no-untyped-def
# Because Python >3.9 doesn't support ast.unparse,
# we copied the unparse functionality from here:
# https://github.com/python/cpython/blob/3.8/Tools/parser/unparse.py
"Usage: unparse.py <path to source file>"
import ast
import io
import sys
import tokenize
# Large float and ... | langchain/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py",
"repo_id": "langchain",
"token_count": 11059
} | 295 |
"""Merriam-Webster API toolkit."""
| langchain/libs/community/langchain_community/tools/merriam_webster/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/merriam_webster/__init__.py",
"repo_id": "langchain",
"token_count": 13
} | 313 |
<!--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 applicable law or agreed... | diffusers/docs/source/en/api/pipelines/stable_diffusion/latent_upscale.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/latent_upscale.md",
"repo_id": "diffusers",
"token_count": 543
} | 186 |
# coding=utf-8
# Copyright 2022 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
#
# Unless r... | transformers/tests/models/data2vec/test_modeling_tf_data2vec_vision.py/0 | {
"file_path": "transformers/tests/models/data2vec/test_modeling_tf_data2vec_vision.py",
"repo_id": "transformers",
"token_count": 9984
} | 716 |
# Summary
[Introduction](README.md)
# User Guide
- [Installation](guide/installation.md)
- [Hello World - MNIST](guide/hello_world.md)
- [PyTorch cheatsheet](guide/cheatsheet.md)
# Reference Guide
- [Running a model](inference/inference.md)
- [Using the hub](inference/hub.md)
- [Error management](error_manage.... | candle/candle-book/src/SUMMARY.md/0 | {
"file_path": "candle/candle-book/src/SUMMARY.md",
"repo_id": "candle",
"token_count": 274
} | 23 |
from llama_index.storage.index_store.dynamodb.base import DynamoDBIndexStore
__all__ = ["DynamoDBIndexStore"]
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-dynamodb/llama_index/storage/index_store/dynamodb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-dynamodb/llama_index/storage/index_store/dynamodb/__init__.py",
"repo_id": "llama_index",
"token_count": 42
} | 1,597 |
import { MongoClient, ObjectId } from "mongodb";
import { BufferMemory } from "langchain/memory";
import { ChatOpenAI } from "@langchain/openai";
import { ConversationChain } from "langchain/chains";
import { MongoDBChatMessageHistory } from "@langchain/community/stores/message/mongodb";
const client = new MongoClient... | langchainjs/examples/src/memory/mongodb.ts/0 | {
"file_path": "langchainjs/examples/src/memory/mongodb.ts",
"repo_id": "langchainjs",
"token_count": 439
} | 816 |
# coding=utf-8
# 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 requir... | transformers/tests/models/clip/test_tokenization_clip.py/0 | {
"file_path": "transformers/tests/models/clip/test_tokenization_clip.py",
"repo_id": "transformers",
"token_count": 4004
} | 753 |
from typing import List
from langchain_core.messages import (
AIMessage,
BaseMessage,
ChatMessage,
HumanMessage,
SystemMessage,
)
def _convert_one_message_to_text_llama(message: BaseMessage) -> str:
if isinstance(message, ChatMessage):
message_text = f"\n\n{message.role.capitalize()}:... | langchain/libs/community/langchain_community/chat_models/meta.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_models/meta.py",
"repo_id": "langchain",
"token_count": 368
} | 237 |
from __future__ import annotations
from typing import Optional, Type
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel
from langchain_community.tools.playwright.base import BaseBrowserTool
from langchain_commun... | langchain/libs/community/langchain_community/tools/playwright/current_page.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/playwright/current_page.py",
"repo_id": "langchain",
"token_count": 501
} | 290 |
"""Default query for SQLStructStoreIndex."""
import logging
from abc import abstractmethod
from typing import Any, Dict, List, Optional, Tuple, Union, cast
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import Response
from llama_index.core.indices.struct... | llama_index/llama-index-core/llama_index/core/indices/struct_store/sql_query.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/indices/struct_store/sql_query.py",
"repo_id": "llama_index",
"token_count": 8847
} | 1,131 |
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: test-datanode-container-kill
namespace: chaos-testing
spec:
action: container-kill
mode: one
containerName: 'datanode'
selector:
namespaces:
- chaos-testing # target namespace of milvus deployment
labelSelectors:
... | milvus/tests/python_client/chaos/chaos_objects/container_kill/chaos_datanode_container_kill.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/container_kill/chaos_datanode_container_kill.yaml",
"repo_id": "milvus",
"token_count": 186
} | 1,892 |
label: 'LangChain Expression Language'
position: 1 | langchainjs/docs/core_docs/docs/expression_language/_category_.yml/0 | {
"file_path": "langchainjs/docs/core_docs/docs/expression_language/_category_.yml",
"repo_id": "langchainjs",
"token_count": 13
} | 767 |
<!--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 applicable law or agreed... | transformers/docs/source/en/attention.md/0 | {
"file_path": "transformers/docs/source/en/attention.md",
"repo_id": "transformers",
"token_count": 958
} | 433 |
from langchain_community.utilities.graphql import GraphQLAPIWrapper
__all__ = ["GraphQLAPIWrapper"]
| langchain/libs/langchain/langchain/utilities/graphql.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/graphql.py",
"repo_id": "langchain",
"token_count": 31
} | 575 |
# This is a sample to deploy a milvus cluster using pulsar with minimum cost of resources.
apiVersion: milvus.io/v1beta1
kind: Milvus
metadata:
name: operator-demo
namespace: chaos-testing
labels:
app: milvus
spec:
mode: standalone
config:
dataNode:
memory:
forceSyncEnable: false
... | milvus/tests/python_client/deploy/milvus_crd.yaml/0 | {
"file_path": "milvus/tests/python_client/deploy/milvus_crd.yaml",
"repo_id": "milvus",
"token_count": 2668
} | 2,001 |
use crate::quantized_nn::{layer_norm, linear, linear_no_bias, Embedding, Linear};
pub use crate::quantized_var_builder::VarBuilder;
use candle::{DType, Device, Module, Result, Tensor, D};
use candle_nn::{Activation, LayerNorm};
use std::sync::Arc;
pub use crate::models::stable_lm::Config;
use crate::models::stable_lm:... | candle/candle-transformers/src/models/quantized_stable_lm.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_stable_lm.rs",
"repo_id": "candle",
"token_count": 5389
} | 73 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,461 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2022 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/LI... | transformers/examples/pytorch/image-pretraining/run_mae.py/0 | {
"file_path": "transformers/examples/pytorch/image-pretraining/run_mae.py",
"repo_id": "transformers",
"token_count": 6396
} | 513 |
python_sources()
| llama_index/llama-index-integrations/llms/llama-index-llms-portkey/llama_index/llms/portkey/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-portkey/llama_index/llms/portkey/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,276 |
# 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/utils/state_dict_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/state_dict_utils.py",
"repo_id": "diffusers",
"token_count": 5701
} | 271 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 1,
"logprob": null,
"text": "<s>"
},
{
"id": 1724,
"logprob": -10.734375,
"text": "What"
},
{
"id": 33... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_simple.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_simple.json",
"repo_id": "text-generation-inference",
"token_count": 1227
} | 363 |
from langchain_community.llms.fireworks import (
Fireworks,
)
__all__ = [
"Fireworks",
]
| langchain/libs/langchain/langchain/llms/fireworks.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/fireworks.py",
"repo_id": "langchain",
"token_count": 40
} | 538 |
// Copyright (C) 2019-2020 Zilliz. 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 l... | milvus/internal/core/src/indexbuilder/ScalarIndexCreator.cpp/0 | {
"file_path": "milvus/internal/core/src/indexbuilder/ScalarIndexCreator.cpp",
"repo_id": "milvus",
"token_count": 941
} | 1,729 |
import { MONGODB_URL, MONGODB_DB_NAME, MONGODB_DIRECT_CONNECTION } from "$env/static/private";
import { GridFSBucket, MongoClient } from "mongodb";
import type { Conversation } from "$lib/types/Conversation";
import type { SharedConversation } from "$lib/types/SharedConversation";
import type { AbortedGeneration } from... | chat-ui/src/lib/server/database.ts/0 | {
"file_path": "chat-ui/src/lib/server/database.ts",
"repo_id": "chat-ui",
"token_count": 1275
} | 90 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-fusion-retriever/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-fusion-retriever/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,669 |
# 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... | trl/tests/test_core.py/0 | {
"file_path": "trl/tests/test_core.py",
"repo_id": "trl",
"token_count": 568
} | 778 |
#!/usr/bin/env python
# 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
#
# Unles... | accelerate/src/accelerate/commands/config/cluster.py/0 | {
"file_path": "accelerate/src/accelerate/commands/config/cluster.py",
"repo_id": "accelerate",
"token_count": 14546
} | 10 |
from langchain_community.embeddings.sentence_transformer import (
SentenceTransformerEmbeddings,
)
__all__ = ["SentenceTransformerEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/sentence_transformer.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/sentence_transformer.py",
"repo_id": "langchain",
"token_count": 47
} | 526 |
import { ChatCohere } from "@langchain/cohere";
import { ChatPromptTemplate } from "@langchain/core/prompts";
const model = new ChatCohere({
apiKey: process.env.COHERE_API_KEY, // Default
model: "command", // Default
});
const prompt = ChatPromptTemplate.fromMessages([
["ai", "You are a helpful assistant"],
["... | langchainjs/examples/src/models/chat/cohere/chat_cohere.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/cohere/chat_cohere.ts",
"repo_id": "langchainjs",
"token_count": 518
} | 843 |
# Copyright (C) 2019-2020 Zilliz. 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 ag... | milvus/tests/python_client/chaos/scripts/verify_all_collections.py/0 | {
"file_path": "milvus/tests/python_client/chaos/scripts/verify_all_collections.py",
"repo_id": "milvus",
"token_count": 1910
} | 2,031 |
"""Test in memory docstore."""
from langchain.output_parsers.combining import CombiningOutputParser
from langchain.output_parsers.regex import RegexParser
from langchain.output_parsers.structured import ResponseSchema, StructuredOutputParser
DEF_EXPECTED_RESULT = {
"answer": "Paris",
"source": "https://en.wiki... | langchain/libs/langchain/tests/unit_tests/output_parsers/test_combining_parser.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/output_parsers/test_combining_parser.py",
"repo_id": "langchain",
"token_count": 619
} | 608 |
locust_search_performance:
collections:
-
milvus:
cache_config.cpu_cache_capacity: 8GB
cache_config.insert_buffer_size: 2GB
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 1
gpu_resource_config.enable: false
gpu_resource_config.cach... | milvus/tests/benchmark/milvus_benchmark/suites/2_locust_search.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/2_locust_search.yaml",
"repo_id": "milvus",
"token_count": 672
} | 2,005 |
---
sidebar_position: 0
---
# Quickstart
The quick start will cover the basics of working with language models.
It will introduce the two different types of models - LLMs and ChatModels.
It will then cover how to use PromptTemplates to format the inputs to these models, and how to use Output Parsers to work with the ... | langchainjs/docs/core_docs/docs/modules/model_io/quick_start.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/model_io/quick_start.mdx",
"repo_id": "langchainjs",
"token_count": 2396
} | 821 |
#!/usr/bin/env bash
if ! [ -f ./dev.txt ]; then
echo "Download dev dataset...."
curl -L -o ./dev.txt 'https://github.com/UniversalDependencies/UD_English-EWT/raw/master/en_ewt-ud-dev.conllu'
fi
if ! [ -f ./test.txt ]; then
echo "Download test dataset...."
curl -L -o ./test.txt 'https://github.com/UniversalDepe... | transformers/examples/legacy/pytorch-lightning/run_pos.sh/0 | {
"file_path": "transformers/examples/legacy/pytorch-lightning/run_pos.sh",
"repo_id": "transformers",
"token_count": 440
} | 541 |
"""Code Interpreter tool spec."""
import subprocess
import sys
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class CodeInterpreterToolSpec(BaseToolSpec):
"""Code Interpreter tool spec.
WARNING: This tool provides the Agent access to the `subprocess.run` command.
Arbitrary code executio... | llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/base.py",
"repo_id": "llama_index",
"token_count": 437
} | 1,482 |
"""Test SmartLLM."""
from langchain.prompts.prompt import PromptTemplate
from langchain_community.chat_models import FakeListChatModel
from langchain_community.llms import FakeListLLM
from langchain_experimental.smart_llm import SmartLLMChain
def test_ideation() -> None:
# test that correct responses are returne... | langchain/libs/experimental/tests/unit_tests/test_smartllm.py/0 | {
"file_path": "langchain/libs/experimental/tests/unit_tests/test_smartllm.py",
"repo_id": "langchain",
"token_count": 1722
} | 429 |
<jupyter_start><jupyter_text>RequestsThe web contains a lot of information that LLMs do not have access to. In order to easily let LLMs interact with that information, we provide a wrapper around the Python Requests module that takes in a URL and fetches data from that URL.<jupyter_code>from langchain.agents import loa... | langchain/docs/docs/integrations/tools/requests.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/tools/requests.ipynb",
"repo_id": "langchain",
"token_count": 408
} | 189 |
// 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/meta_table_test.go/0 | {
"file_path": "milvus/internal/rootcoord/meta_table_test.go",
"repo_id": "milvus",
"token_count": 23569
} | 1,786 |
import functools
import logging
import re
from pathlib import Path
from typing import Any, Dict, List
import yaml
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
logger = logging.getLogger(__name__)
class ObsidianLoader(BaseLoader):
"""Load `Obsidi... | langchain/libs/community/langchain_community/document_loaders/obsidian.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/obsidian.py",
"repo_id": "langchain",
"token_count": 2860
} | 252 |
# 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/tests/models/mistral/test_modeling_flax_mistral.py/0 | {
"file_path": "transformers/tests/models/mistral/test_modeling_flax_mistral.py",
"repo_id": "transformers",
"token_count": 4641
} | 774 |
// Copyright (C) 2019-2020 Zilliz. 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 l... | milvus/internal/core/unittest/test_expr.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_expr.cpp",
"repo_id": "milvus",
"token_count": 122785
} | 1,684 |
# MongoDB Atlas
>[MongoDB Atlas](https://www.mongodb.com/docs/atlas/) is a fully-managed cloud
> database available in AWS, Azure, and GCP. It now has support for native
> Vector Search on the MongoDB document data.
## Installation and Setup
See [detail configuration instructions](/docs/integrations/vectorstores/m... | langchain/docs/docs/integrations/providers/mongodb_atlas.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/mongodb_atlas.mdx",
"repo_id": "langchain",
"token_count": 178
} | 139 |
<jupyter_start><jupyter_text>Alibaba Cloud OpenSearch>[Alibaba Cloud Opensearch](https://www.alibabacloud.com/product/opensearch) is a one-stop platform to develop intelligent search services. `OpenSearch` was built on the large-scale distributed search engine developed by `Alibaba`. `OpenSearch` serves more than 500 b... | langchain/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb",
"repo_id": "langchain",
"token_count": 2404
} | 188 |
"""
Adapted from
https://github.com/maxfischer2781/asyncstdlib/blob/master/asyncstdlib/itertools.py
MIT License
"""
from collections import deque
from typing import (
Any,
AsyncContextManager,
AsyncGenerator,
AsyncIterator,
Awaitable,
Callable,
Deque,
Generic,
Iterator,
List,
... | langchain/libs/core/langchain_core/utils/aiter.py/0 | {
"file_path": "langchain/libs/core/langchain_core/utils/aiter.py",
"repo_id": "langchain",
"token_count": 2982
} | 399 |
# coding=utf-8
# Copyright 2022 The 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 applicable... | transformers/src/transformers/models/donut/convert_donut_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/donut/convert_donut_to_pytorch.py",
"repo_id": "transformers",
"token_count": 4042
} | 608 |
# coding=utf-8
# Copyright 2022 The 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 applicable... | transformers/src/transformers/models/bit/convert_bit_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/bit/convert_bit_to_pytorch.py",
"repo_id": "transformers",
"token_count": 2309
} | 572 |
# 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/tests/deepspeed/test_deepspeed.py/0 | {
"file_path": "accelerate/tests/deepspeed/test_deepspeed.py",
"repo_id": "accelerate",
"token_count": 25112
} | 17 |
# Tracing with Graphsignal
[Graphsignal](https://graphsignal.com/) provides observability for AI agents and LLM-powered applications. It helps developers ensure AI applications run as expected and users have the best experience.
Graphsignal **automatically** traces and monitors LlamaIndex. Traces and metrics provide ... | llama_index/docs/community/integrations/graphsignal.md/0 | {
"file_path": "llama_index/docs/community/integrations/graphsignal.md",
"repo_id": "llama_index",
"token_count": 649
} | 1,044 |
<!--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/ko/multilingual.md/0 | {
"file_path": "transformers/docs/source/ko/multilingual.md",
"repo_id": "transformers",
"token_count": 5628
} | 495 |
# 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/tests/models/bloom/test_modeling_flax_bloom.py/0 | {
"file_path": "transformers/tests/models/bloom/test_modeling_flax_bloom.py",
"repo_id": "transformers",
"token_count": 4307
} | 723 |
<jupyter_start><jupyter_text>Chat Engine - Simple Mode REPL If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-llms-openai
!pip install llama-index<jupyter_output><empty_output><jupyter_text>Get started in 3 lines of code Using GPT3 ("text-da... | llama_index/docs/examples/chat_engine/chat_engine_repl.ipynb/0 | {
"file_path": "llama_index/docs/examples/chat_engine/chat_engine_repl.ipynb",
"repo_id": "llama_index",
"token_count": 801
} | 1,126 |
[Unit]
Description=Etcd of Milvus Standalone Server
After=network.target syslog.target
PartOf=milvus.service
[Install]
WantedBy=multi-user.target
Alias=milvus-etcd.service
[Service]
StandardOutput=journal
StandardError=inherit
Restart=always
# Start main service
ExecStart=/usr/bin/milvus-etcd --data-dir /var/lib/mil... | milvus/build/deb/scripts/milvus-etcd.service/0 | {
"file_path": "milvus/build/deb/scripts/milvus-etcd.service",
"repo_id": "milvus",
"token_count": 121
} | 1,714 |
# coding=utf-8
# Copyright 2022 Meta Platforms, Inc. 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... | transformers/src/transformers/models/mask2former/modeling_mask2former.py/0 | {
"file_path": "transformers/src/transformers/models/mask2former/modeling_mask2former.py",
"repo_id": "transformers",
"token_count": 50679
} | 689 |
[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 = ["SemanticChunkingQueryEnginePack"]
contains_example = false
import_path = "llama_index.pac... | llama_index/llama-index-packs/llama-index-packs-node-parser-semantic-chunking/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-node-parser-semantic-chunking/pyproject.toml",
"repo_id": "llama_index",
"token_count": 684
} | 1,804 |
# coding=utf-8
# Copyright 2021 The Open AI Team Authors and The 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
#
# ... | transformers/src/transformers/models/clip/tokenization_clip.py/0 | {
"file_path": "transformers/src/transformers/models/clip/tokenization_clip.py",
"repo_id": "transformers",
"token_count": 9519
} | 633 |
<!--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/ja/model_doc/bert-generation.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bert-generation.md",
"repo_id": "transformers",
"token_count": 1962
} | 492 |
# Reference:
# https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/#sample-docker-composeyml
version: "3"
services:
opensearch:
image: opensearchproject/opensearch:2.6.0
container_name: opensearch
environment:
- cluster.name=opensearch
- node.name=opensearch
... | langchainjs/examples/src/indexes/vector_stores/opensearch/docker-compose.yml/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/opensearch/docker-compose.yml",
"repo_id": "langchainjs",
"token_count": 584
} | 816 |
from langchain_community.document_transformers.openai_functions import (
OpenAIMetadataTagger,
create_metadata_tagger,
)
__all__ = ["OpenAIMetadataTagger", "create_metadata_tagger"]
| langchain/libs/langchain/langchain/document_transformers/openai_functions.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_transformers/openai_functions.py",
"repo_id": "langchain",
"token_count": 67
} | 498 |
import json
from typing import Any, AsyncIterator, Iterator, Tuple
import pytest
from langchain_core.output_parsers.json import (
SimpleJsonOutputParser,
parse_json_markdown,
parse_partial_json,
)
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.utils.function_calling import convert_to... | langchain/libs/core/tests/unit_tests/output_parsers/test_json.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/output_parsers/test_json.py",
"repo_id": "langchain",
"token_count": 6138
} | 407 |
# coding=utf-8
# Copyright 2022 The OpenAI Team Authors 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
#
# Unles... | transformers/src/transformers/models/jukebox/configuration_jukebox.py/0 | {
"file_path": "transformers/src/transformers/models/jukebox/configuration_jukebox.py",
"repo_id": "transformers",
"token_count": 11079
} | 653 |
import torch
import torch.distributed
from mamba_ssm.ops.triton.selective_state_update import selective_state_update
from mamba_ssm.ops.selective_scan_interface import selective_scan_fn
from torch import nn
from typing import Optional, Tuple, Any
from transformers.configuration_utils import PretrainedConfig
import tor... | text-generation-inference/server/text_generation_server/models/custom_modeling/mamba_modeling.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/mamba_modeling.py",
"repo_id": "text-generation-inference",
"token_count": 3925
} | 423 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use candle_transformers::models::bert::{BertModel, Config, HiddenAct, DTYPE};
use anyhow::{Error as E, Result};
use candle::Tensor;
use candle_nn::VarBuilder;
use clap::Parser;
use hf_hub::{api::sync::Api, ... | candle/candle-examples/examples/bert/main.rs/0 | {
"file_path": "candle/candle-examples/examples/bert/main.rs",
"repo_id": "candle",
"token_count": 3527
} | 41 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
# Copyright 2021 NVIDIA Corporation. 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
#
# htt... | transformers/examples/research_projects/quantization-qdqbert/trainer_quant_qa.py/0 | {
"file_path": "transformers/examples/research_projects/quantization-qdqbert/trainer_quant_qa.py",
"repo_id": "transformers",
"token_count": 3717
} | 570 |
# rag-redis
This template performs RAG using Redis (vector database) and OpenAI (LLM) on financial 10k filings docs for Nike.
It relies on the sentence transformer `all-MiniLM-L6-v2` for embedding chunks of the pdf and user questions.
## Environment Setup
Set the `OPENAI_API_KEY` environment variable to access the... | langchain/templates/rag-redis/README.md/0 | {
"file_path": "langchain/templates/rag-redis/README.md",
"repo_id": "langchain",
"token_count": 1105
} | 684 |
// Copyright (C) 2019-2020 Zilliz. 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 l... | milvus/internal/core/unittest/test_growing.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_growing.cpp",
"repo_id": "milvus",
"token_count": 4717
} | 1,902 |
package datanode
import (
"fmt"
"sync"
"github.com/samber/lo"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
"github.com/milvus-io/milvus/pkg/metrics"
"github.com/milvus-io/milvus/pkg/mq/msgstream"
"github.com/milvus-io/milvus/pkg/util/commonpbutil"... | milvus/internal/datanode/stats_updater.go/0 | {
"file_path": "milvus/internal/datanode/stats_updater.go",
"repo_id": "milvus",
"token_count": 1172
} | 1,790 |
from langchain_community.llms.opaqueprompts import OpaquePrompts
__all__ = ["OpaquePrompts"]
| langchain/libs/langchain/langchain/llms/opaqueprompts.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/opaqueprompts.py",
"repo_id": "langchain",
"token_count": 35
} | 523 |
/**
* Abstract class representing a transformer used for masking and rehydrating messages.
*/
export abstract class MaskingTransformer {
abstract transform(
message: string,
state?: Map<string, string>
): Promise<[string, Map<string, string>]>;
abstract rehydrate(
message: string,
state: Map<st... | langchainjs/langchain/src/experimental/masking/transformer.ts/0 | {
"file_path": "langchainjs/langchain/src/experimental/masking/transformer.ts",
"repo_id": "langchainjs",
"token_count": 108
} | 989 |
from langchain_community.embeddings.huggingface import HuggingFaceInferenceAPIEmbeddings
def test_hugginggface_inferenceapi_embedding_documents_init() -> None:
"""Test huggingface embeddings."""
embedding = HuggingFaceInferenceAPIEmbeddings(api_key="abcd123")
assert "abcd123" not in repr(embedding)
| langchain/libs/community/tests/unit_tests/embeddings/test_huggingface.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/embeddings/test_huggingface.py",
"repo_id": "langchain",
"token_count": 108
} | 396 |
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseGen,
MessageRole,
)
from llama_index.core.types import TokenGen
def response_gen_from_query_engine(response_gen: TokenGen) -> ChatResponseGen:
response_str = ""
for token in response_gen:
response_str... | llama_index/llama-index-core/llama_index/core/chat_engine/utils.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/chat_engine/utils.py",
"repo_id": "llama_index",
"token_count": 188
} | 1,249 |
// 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/datanode/cache.go/0 | {
"file_path": "milvus/internal/datanode/cache.go",
"repo_id": "milvus",
"token_count": 570
} | 1,772 |
[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 = ["RemoteReader"]
contains_example = false
import_path = "llama_index.readers.remote"
[tool... | llama_index/llama-index-integrations/readers/llama-index-readers-remote/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-remote/pyproject.toml",
"repo_id": "llama_index",
"token_count": 677
} | 1,368 |
<!---
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 ... | transformers/docs/source/en/contributing.md/0 | {
"file_path": "transformers/docs/source/en/contributing.md",
"repo_id": "transformers",
"token_count": 5137
} | 449 |
# DadJoke Loader
This loader fetches a joke from icanhazdadjoke.
## Usage
To use this loader, load it.
```python
from llama_index import download_loader
DadJokesReader = download_loader("DadJokesReader")
loader = DadJokesReader()
documents = loader.load_data()
```
This loader is designed to be used as a way to l... | llama_index/llama-index-integrations/readers/llama-index-readers-dad-jokes/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-dad-jokes/README.md",
"repo_id": "llama_index",
"token_count": 195
} | 1,280 |
# LlamaIndex Vector_Stores Integration: Neo4Jvector
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/README.md",
"repo_id": "llama_index",
"token_count": 15
} | 1,491 |
package httpserver
type CreateCollectionReq struct {
DbName string `json:"dbName"`
CollectionName string `json:"collectionName" validate:"required"`
Dimension int32 `json:"dimension" validate:"required"`
Description string `json:"description"`
MetricType string `json:"metr... | milvus/internal/distributed/proxy/httpserver/request.go/0 | {
"file_path": "milvus/internal/distributed/proxy/httpserver/request.go",
"repo_id": "milvus",
"token_count": 1259
} | 1,709 |
import {
Client,
TextChannel,
GatewayIntentBits,
Message,
ChannelType,
} from "discord.js";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Tool } from "@langchain/core/tools";
/**
* Base tool parameters for the Discord tools
*/
interface DiscordToolParams {
botToken?: string... | langchainjs/libs/langchain-community/src/tools/discord.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/discord.ts",
"repo_id": "langchainjs",
"token_count": 3901
} | 1,004 |
<!--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/en/model_doc/blenderbot-small.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/blenderbot-small.md",
"repo_id": "transformers",
"token_count": 1170
} | 457 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-zephyr-query-engine/llama_index/packs/zephyr_query_engine/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-zephyr-query-engine/llama_index/packs/zephyr_query_engine/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,880 |
# coding=utf-8
# Copyright 2021 The 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 applicable... | transformers/src/transformers/models/perceiver/tokenization_perceiver.py/0 | {
"file_path": "transformers/src/transformers/models/perceiver/tokenization_perceiver.py",
"repo_id": "transformers",
"token_count": 3437
} | 678 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,516 |
#!/usr/bin/env python
"""An example that uses Fast API global dependencies.
This approach can be used if the same authentication logic can be used
for all endpoints in the application.
This may be a reasonable approach for simple applications.
See:
* https://fastapi.tiangolo.com/tutorial/dependencies/global-depende... | langserve/examples/auth/global_deps/server.py/0 | {
"file_path": "langserve/examples/auth/global_deps/server.py",
"repo_id": "langserve",
"token_count": 425
} | 1,080 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.