text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
# coding=utf-8 # Copyright 2023 the Falcon authors and 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/LICE...
transformers/src/transformers/models/falcon/__init__.py/0
{ "file_path": "transformers/src/transformers/models/falcon/__init__.py", "repo_id": "transformers", "token_count": 786 }
604
import { expect, test } from "@jest/globals"; import { ChatMessage, HumanMessage, SystemMessage, } from "@langchain/core/messages"; import { LLMResult } from "@langchain/core/outputs"; import { CallbackManager } from "@langchain/core/callbacks/manager"; import { ChatPromptTemplate, HumanMessagePromptTemplate,...
langchainjs/libs/langchain-community/src/chat_models/tests/minimax.int.test.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/chat_models/tests/minimax.int.test.ts", "repo_id": "langchainjs", "token_count": 3291 }
995
"""VGG Adapted from https://github.com/pytorch/vision 'vgg.py' (BSD-3-Clause) with a few changes for timm functionality. Copyright 2021 Ross Wightman """ from typing import Union, List, Dict, Any, cast import torch import torch.nn as nn import torch.nn.functional as F from timm.data import IMAGENET_DEFAULT_MEAN, IM...
pytorch-image-models/timm/models/vgg.py/0
{ "file_path": "pytorch-image-models/timm/models/vgg.py", "repo_id": "pytorch-image-models", "token_count": 5201 }
348
import { expect, test } from "@jest/globals"; import { CheerioWebBaseLoader } from "../web/cheerio.js"; test("Test cheerio web scraper loader", async () => { const loader = new CheerioWebBaseLoader( "https://news.ycombinator.com/item?id=34817881" ); await loader.load(); }); test("Test cheerio web scraper lo...
langchainjs/langchain/src/document_loaders/tests/cheerio.int.test.ts/0
{ "file_path": "langchainjs/langchain/src/document_loaders/tests/cheerio.int.test.ts", "repo_id": "langchainjs", "token_count": 352 }
903
<!--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/internal/generation_utils.md/0
{ "file_path": "transformers/docs/source/en/internal/generation_utils.md", "repo_id": "transformers", "token_count": 3160 }
451
<jupyter_start><jupyter_text>Going Production: Auto-scale Hugging Face Transformer Endpoints with Amazon SageMaker Welcome to this getting started guide, we will use the new Hugging Face Inference DLCs and Amazon SageMaker Python SDK to deploy a transformer model for real-time inference. In this example we are going to...
notebooks/sagemaker/13_deploy_and_autoscaling_transformers/sagemaker-notebook.ipynb/0
{ "file_path": "notebooks/sagemaker/13_deploy_and_autoscaling_transformers/sagemaker-notebook.ipynb", "repo_id": "notebooks", "token_count": 2793 }
331
<!--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/perf_infer_gpu_many.md/0
{ "file_path": "transformers/docs/source/ja/perf_infer_gpu_many.md", "repo_id": "transformers", "token_count": 2561 }
533
import { Metadata } from "@opensearch-project/opensearch/api/types.js"; import { DataSource, DataSourceOptions, EntitySchema } from "typeorm"; import type { EmbeddingsInterface } from "@langchain/core/embeddings"; import { VectorStore } from "@langchain/core/vectorstores"; import { Document } from "@langchain/core/docu...
langchainjs/libs/langchain-community/src/vectorstores/typeorm.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/vectorstores/typeorm.ts", "repo_id": "langchainjs", "token_count": 3245 }
1,091
<jupyter_start><jupyter_text>ReAct Agent with Query Engine (RAG) ToolsIn this section, we show how to setup an agent powered by the ReAct loop for financial analysis.The agent has access to two "tools": one to query the 2021 Lyft 10-K and the other to query the 2021 Uber 10-K.We try two different LLMs:- gpt-3.5-turbo- ...
llama_index/docs/examples/agent/react_agent_with_query_engine.ipynb/0
{ "file_path": "llama_index/docs/examples/agent/react_agent_with_query_engine.ipynb", "repo_id": "llama_index", "token_count": 2642 }
1,171
// 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/pkg/util/funcutil/slice.go/0
{ "file_path": "milvus/pkg/util/funcutil/slice.go", "repo_id": "milvus", "token_count": 615 }
2,052
python_tests()
llama_index/llama-index-packs/llama-index-packs-self-rag/tests/BUILD/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-self-rag/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,604
import functools import math import os # noqa: F401 from random import choice, randint from time import time import datasets # noqa: F401 import faiss # noqa: F401 import numpy as np import pandas as pd import torch import torch.utils.checkpoint as checkpoint from elasticsearch import Elasticsearch # noqa: F401 fr...
transformers/examples/research_projects/longform-qa/eli5_utils.py/0
{ "file_path": "transformers/examples/research_projects/longform-qa/eli5_utils.py", "repo_id": "transformers", "token_count": 13301 }
566
// 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/core/src/storage/DataCodec.cpp/0
{ "file_path": "milvus/internal/core/src/storage/DataCodec.cpp", "repo_id": "milvus", "token_count": 2258 }
1,772
insert_search_performance: collections: - milvus: db_config.primary_path: /test/milvus/distribued/sift_10w_128_l2_ivf_flat cache_config.cpu_cache_capacity: 8GB engine_config.use_blas_threshold: 0 engine_config.gpu_search_threshold: 200 gpu_resource_config.enable: true...
milvus/tests/benchmark/milvus_benchmark/suites/2_insert_search_sift10m.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/2_insert_search_sift10m.yaml", "repo_id": "milvus", "token_count": 489 }
2,004
import pytest from llama_index.core.data_structs.data_structs import IndexGraph from llama_index.storage.index_store.postgres import ( PostgresIndexStore, ) from llama_index.storage.kvstore.postgres import PostgresKVStore try: import asyncpg # noqa import psycopg2 # noqa import sqlalchemy # noqa ...
llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-postgres/tests/test_postgres.py/0
{ "file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-postgres/tests/test_postgres.py", "repo_id": "llama_index", "token_count": 336 }
1,554
<jupyter_start><jupyter_text>BGE on Hugging Face>[BGE models on the HuggingFace](https://huggingface.co/BAAI/bge-large-en) are [the best open-source embedding models](https://huggingface.co/spaces/mteb/leaderboard).>BGE model is created by the [Beijing Academy of Artificial Intelligence (BAAI)](https://www.baai.ac.cn/e...
langchain/docs/docs/integrations/text_embedding/bge_huggingface.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/text_embedding/bge_huggingface.ipynb", "repo_id": "langchain", "token_count": 325 }
162
"""Test Weaviate functionality.""" import logging import os import uuid from typing import Generator, Union import pytest from langchain_core.documents import Document from langchain_community.embeddings.openai import OpenAIEmbeddings from langchain_community.vectorstores.weaviate import Weaviate from tests.integrati...
langchain/libs/community/tests/integration_tests/vectorstores/test_weaviate.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_weaviate.py", "repo_id": "langchain", "token_count": 4226 }
359
#!/usr/bin/env bash set -euxo pipefail export CI=true # enable extended globbing for omitting build artifacts shopt -s extglob # avoid copying build artifacts from the host cp -r ../package/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) . mkdir ../langchain-core cp -r ../langchain-core-workspace/!(node_...
langchainjs/environment_tests/scripts/docker-bun-ci-entrypoint.sh/0
{ "file_path": "langchainjs/environment_tests/scripts/docker-bun-ci-entrypoint.sh", "repo_id": "langchainjs", "token_count": 437 }
759
- title: Course introduction sections: - local: unit0/1 title: Introduction - title: 1. Introduction to diffusion models sections: - local: unit1/1 title: Overview - local: unit1/2 title: Implementation with 🤗 Diffusers - local: unit1/3 title: Implementation from scratch - title: 2. Fine-...
diffusion-models-class/units/en/_toctree.yml/0
{ "file_path": "diffusion-models-class/units/en/_toctree.yml", "repo_id": "diffusion-models-class", "token_count": 424 }
293
"""String distance evaluators based on the RapidFuzz library.""" from enum import Enum from typing import Any, Callable, Dict, List, Optional from langchain_core.pydantic_v1 import Field, root_validator from langchain.callbacks.manager import ( AsyncCallbackManagerForChainRun, CallbackManagerForChainRun, ...
langchain/libs/langchain/langchain/evaluation/string_distance/base.py/0
{ "file_path": "langchain/libs/langchain/langchain/evaluation/string_distance/base.py", "repo_id": "langchain", "token_count": 6088 }
539
use anyhow::Result; use candle::{Device, Tensor}; use clap::{Parser, Subcommand}; #[derive(Subcommand, Debug, Clone)] enum Command { Print { #[arg(long)] file: String, }, SimpleEval { #[arg(long)] file: String, }, } #[derive(Parser, Debug)] #[command(author, version, a...
candle/candle-examples/examples/onnx_basics.rs/0
{ "file_path": "candle/candle-examples/examples/onnx_basics.rs", "repo_id": "candle", "token_count": 2016 }
47
<!--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/imagegpt.md/0
{ "file_path": "transformers/docs/source/en/model_doc/imagegpt.md", "repo_id": "transformers", "token_count": 1915 }
485
accuracy: collections: - milvus: db_config.primary_path: /test/milvus/db_data_011/sift_10m_128_l2_sq8 cache_config.cpu_cache_capacity: 32GB engine_config.use_blas_threshold: 1100 engine_config.gpu_search_threshold: 1 gpu_resource_config.enable: true gpu_resour...
milvus/tests/benchmark/milvus_benchmark/suites/011_gpu_accuracy.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/011_gpu_accuracy.yaml", "repo_id": "milvus", "token_count": 987 }
1,873
// 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/querynodev2/delegator/snapshot_test.go/0
{ "file_path": "milvus/internal/querynodev2/delegator/snapshot_test.go", "repo_id": "milvus", "token_count": 2466 }
1,905
from llama_index.readers.azstorage_blob.base import AzStorageBlobReader __all__ = ["AzStorageBlobReader"]
llama_index/llama-index-integrations/readers/llama-index-readers-azstorage-blob/llama_index/readers/azstorage_blob/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-azstorage-blob/llama_index/readers/azstorage_blob/__init__.py", "repo_id": "llama_index", "token_count": 36 }
1,326
"""Shopify tool spec.""" from llama_index.core.tools.tool_spec.base import BaseToolSpec class ShopifyToolSpec(BaseToolSpec): """Shopify tool spec.""" spec_functions = ["run_graphql_query"] def __init__(self, shop_url: str, api_version: str, admin_api_key: str): # Currently only supports Admin ...
llama_index/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/base.py/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/base.py", "repo_id": "llama_index", "token_count": 524 }
1,453
# Metric Card for BLEU ## Metric Description BLEU (Bilingual Evaluation Understudy) is an algorithm for evaluating the quality of text which has been machine-translated from one natural language to another. Quality is considered to be the correspondence between a machine's output and that of a human: "the closer a ma...
datasets/metrics/bleu/README.md/0
{ "file_path": "datasets/metrics/bleu/README.md", "repo_id": "datasets", "token_count": 1990 }
122
// 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/storage/binlog_iterator_test.go/0
{ "file_path": "milvus/internal/storage/binlog_iterator_test.go", "repo_id": "milvus", "token_count": 3122 }
1,859
# order by contributions reviewers: - czs007 - XuanYang-cn - bigsheeper approvers: - maintainers
milvus/internal/allocator/OWNERS/0
{ "file_path": "milvus/internal/allocator/OWNERS", "repo_id": "milvus", "token_count": 38 }
1,740
<jupyter_start><jupyter_text>Weights & BiasesThis notebook goes over how to track your LangChain experiments into one centralized Weights and Biases dashboard. To learn more about prompt engineering and the callback please refer to this Report which explains both alongside the resultant dashboards you can expect to see...
langchain/docs/docs/integrations/providers/wandb_tracking.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/providers/wandb_tracking.ipynb", "repo_id": "langchain", "token_count": 1880 }
152
<jupyter_start><jupyter_text>Outline>[Outline](https://www.getoutline.com/) is an open-source collaborative knowledge base platform designed for team information sharing.This notebook shows how to retrieve documents from your Outline instance into the Document format that is used downstream. Setup<jupyter_code>%pip in...
langchain/docs/docs/integrations/retrievers/outline.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/retrievers/outline.ipynb", "repo_id": "langchain", "token_count": 602 }
157
// 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/meta_cache.go/0
{ "file_path": "milvus/internal/proxy/meta_cache.go", "repo_id": "milvus", "token_count": 11994 }
2,017
# coding=utf-8 # Copyright 2023 Authors: Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, # Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao 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...
transformers/src/transformers/models/pvt/convert_pvt_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/pvt/convert_pvt_to_pytorch.py", "repo_id": "transformers", "token_count": 4511 }
658
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 3735, "logprob": -12.9140625, "text": "Test" }, { "id": 2...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json", "repo_id": "text-generation-inference", "token_count": 1041 }
424
{ "opsets": { "1": [ "Abs", "Add", "AddV2", "ArgMax", "ArgMin", "AvgPool", "AvgPool3D", "BatchMatMul", "BatchMatMulV2", "BatchToSpaceND", "BiasAdd", "BiasAddV1", ...
transformers/utils/tf_ops/onnx.json/0
{ "file_path": "transformers/utils/tf_ops/onnx.json", "repo_id": "transformers", "token_count": 4081 }
872
from llama_index.core.vector_stores.types import BasePydanticVectorStore from llama_index.vector_stores.elasticsearch import ElasticsearchStore def test_class(): names_of_base_classes = [b.__name__ for b in ElasticsearchStore.__mro__] assert BasePydanticVectorStore.__name__ in names_of_base_classes
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-elasticsearch/tests/test_vector_stores_elasticsearch.py/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-elasticsearch/tests/test_vector_stores_elasticsearch.py", "repo_id": "llama_index", "token_count": 99 }
1,605
""" NAdamW Optimizer Based on simplified algorithm in https://github.com/mlcommons/algorithmic-efficiency/tree/main/baselines/nadamw Added multi-tensor (foreach) path. """ import math from typing import List, Optional import torch from torch import Tensor # Modified from github.com/pytorch/pytorch/blob/v1.12.1/tor...
pytorch-image-models/timm/optim/nadamw.py/0
{ "file_path": "pytorch-image-models/timm/optim/nadamw.py", "repo_id": "pytorch-image-models", "token_count": 5958 }
351
import logging from string import Template from typing import Any, Dict, Optional logger = logging.getLogger(__name__) rel_query = Template( """ MATCH ()-[e:`$edge_type`]->() WITH e limit 1 MATCH (m)-[:`$edge_type`]->(n) WHERE id(m) == src(e) AND id(n) == dst(e) RETURN "(:" + tags(m)[0] + ")-[:$edge_type]->(:" ...
langchain/libs/community/langchain_community/graphs/nebula_graph.py/0
{ "file_path": "langchain/libs/community/langchain_community/graphs/nebula_graph.py", "repo_id": "langchain", "token_count": 3742 }
275
"""Logger class.""" from typing import Any, Dict, List, Set class LlamaLogger: """Logger class.""" def __init__(self) -> None: """Init params.""" self._logs: List[Dict] = [] self._metadata: Dict[str, Any] = {} def reset(self) -> None: """Reset logs.""" self._logs...
llama_index/llama-index-legacy/llama_index/legacy/logger/base.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/logger/base.py", "repo_id": "llama_index", "token_count": 438 }
1,581
from llama_index.core.vector_stores.types import VectorStore from llama_index.vector_stores.tair import TairVectorStore def test_class(): names_of_base_classes = [b.__name__ for b in TairVectorStore.__mro__] assert VectorStore.__name__ in names_of_base_classes
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-tair/tests/test_vector_stores_tair.py/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-tair/tests/test_vector_stores_tair.py", "repo_id": "llama_index", "token_count": 92 }
1,539
poetry_requirements( name="poetry", )
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/BUILD", "repo_id": "llama_index", "token_count": 18 }
1,523
# coding=utf-8 # Copyright 2023 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/persimmon/test_modeling_persimmon.py/0
{ "file_path": "transformers/tests/models/persimmon/test_modeling_persimmon.py", "repo_id": "transformers", "token_count": 8403 }
805
// 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/pkg/mq/msgdispatcher/dispatcher.go/0
{ "file_path": "milvus/pkg/mq/msgdispatcher/dispatcher.go", "repo_id": "milvus", "token_count": 3257 }
1,886
# coding=utf-8 # Copyright 2021 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/deberta/test_modeling_tf_deberta.py/0
{ "file_path": "transformers/tests/models/deberta/test_modeling_tf_deberta.py", "repo_id": "transformers", "token_count": 4967 }
794
"""Test the public API of the tools package.""" from langchain_community.tools import __all__ as public_api _EXPECTED = [ "AINAppOps", "AINOwnerOps", "AINRuleOps", "AINTransfer", "AINValueOps", "AIPluginTool", "APIOperation", "ArxivQueryRun", "AzureCogsFormRecognizerTool", "Azur...
langchain/libs/community/tests/unit_tests/tools/test_public_api.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/tools/test_public_api.py", "repo_id": "langchain", "token_count": 1399 }
415
import { loadEvaluator } from "langchain/evaluation"; const chain = await loadEvaluator("labeled_pairwise_string", { criteria: "correctness", }); const res = await chain.evaluateStringPairs({ prediction: "there are three dogs", predictionB: "4", input: "how many dogs are in the park?", reference: "four", })...
langchainjs/examples/src/guides/evaluation/comparision_evaluator/pairwise_string_with_reference.ts/0
{ "file_path": "langchainjs/examples/src/guides/evaluation/comparision_evaluator/pairwise_string_with_reference.ts", "repo_id": "langchainjs", "token_count": 216 }
817
from langchain import prompts from tests.unit_tests import assert_all_importable EXPECTED_ALL = [ "AIMessagePromptTemplate", "BaseChatPromptTemplate", "BasePromptTemplate", "ChatMessagePromptTemplate", "ChatPromptTemplate", "FewShotPromptTemplate", "FewShotPromptWithTemplates", "HumanMe...
langchain/libs/langchain/tests/unit_tests/prompts/test_imports.py/0
{ "file_path": "langchain/libs/langchain/tests/unit_tests/prompts/test_imports.py", "repo_id": "langchain", "token_count": 306 }
610
/* eslint-disable no-process-env */ import { test } from "@jest/globals"; import * as fs from "node:fs"; import * as path from "node:path"; import * as os from "node:os"; import { LocalFileStore } from "../file_system.js"; describe("LocalFileStore", () => { const keys = ["key1", "key2"]; const tempDir = fs.mkdtem...
langchainjs/langchain/src/storage/tests/file_system.test.ts/0
{ "file_path": "langchainjs/langchain/src/storage/tests/file_system.test.ts", "repo_id": "langchainjs", "token_count": 1277 }
951
import uuid from enum import Enum from pathlib import Path from typing import Any, Generic, Iterable, List, Optional, Type, TypeVar, cast from llama_index.core.bridge.pydantic import BaseModel, Field, GenericModel from llama_index.core.readers.base import BasePydanticReader, ReaderConfig from llama_index.core.schema i...
llama_index/llama-index-core/llama_index/core/ingestion/data_sources.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/ingestion/data_sources.py", "repo_id": "llama_index", "token_count": 5226 }
1,186
# coding=utf-8 # Copyright 2023 Mistral AI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
transformers/src/transformers/models/mixtral/modeling_mixtral.py/0
{ "file_path": "transformers/src/transformers/models/mixtral/modeling_mixtral.py", "repo_id": "transformers", "token_count": 32165 }
713
# coding=utf-8 # Copyright 2021, 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 ...
transformers/tests/models/blenderbot_small/test_modeling_blenderbot_small.py/0
{ "file_path": "transformers/tests/models/blenderbot_small/test_modeling_blenderbot_small.py", "repo_id": "transformers", "token_count": 10061 }
721
# coding=utf-8 # Copyright 2023 Snapchat Research 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/LI...
transformers/src/transformers/models/efficientformer/modeling_tf_efficientformer.py/0
{ "file_path": "transformers/src/transformers/models/efficientformer/modeling_tf_efficientformer.py", "repo_id": "transformers", "token_count": 21601 }
680
export type { LangChainConfig } from "./types.js";
langchainjs/libs/langchain-scripts/src/index.ts/0
{ "file_path": "langchainjs/libs/langchain-scripts/src/index.ts", "repo_id": "langchainjs", "token_count": 15 }
1,022
python_sources()
llama_index/llama-index-legacy/llama_index/legacy/node_parser/BUILD/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/node_parser/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,529
<jupyter_start><jupyter_text>OpenAI Pydantic Program This guide shows you how to generate structured data with [new OpenAI API](https://openai.com/blog/function-calling-and-other-api-updates) via LlamaIndex. The user just needs to specify a Pydantic object.We demonstrate two settings:- Extraction into an `Album` object...
llama_index/docs/examples/output_parsing/openai_pydantic_program.ipynb/0
{ "file_path": "llama_index/docs/examples/output_parsing/openai_pydantic_program.ipynb", "repo_id": "llama_index", "token_count": 3064 }
1,205
package resource import ( "sync" "time" ) const ( NoExpiration time.Duration = -1 DefaultCheckInterval = 2 * time.Second DefaultExpiration = 4 * time.Second ) type Resource interface { Type() string Name() string Get() any Close() // KeepAliveTime returns the time dur...
milvus/pkg/util/resource/resource_manager.go/0
{ "file_path": "milvus/pkg/util/resource/resource_manager.go", "repo_id": "milvus", "token_count": 2582 }
1,979
from llama_index.llms.vertex.base import Vertex __all__ = ["Vertex"]
llama_index/llama-index-integrations/llms/llama-index-llms-vertex/llama_index/llms/vertex/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-vertex/llama_index/llms/vertex/__init__.py", "repo_id": "llama_index", "token_count": 27 }
1,241
<!--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/pt/fast_tokenizers.md/0
{ "file_path": "transformers/docs/source/pt/fast_tokenizers.md", "repo_id": "transformers", "token_count": 937 }
546
/* eslint-disable no-process-env */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import rockset from "@rockset/client"; import { test, expect } from "@jest/globals"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; import { RocksetStore, Simila...
langchainjs/libs/langchain-community/src/vectorstores/tests/rockset.int.test.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/rockset.int.test.ts", "repo_id": "langchainjs", "token_count": 960 }
1,000
python_tests()
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,618
- name: etcd volume docker_volume: name: etcd_volume - name: etcd docker_container: name: etcd image: quay.io/coreos/etcd:v3.5.5 volumes: - etcd_volume:/etcd command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd env: ...
milvus/deployments/docker/cluster-distributed-deployment/roles/deploy-etcd/tasks/main.yml/0
{ "file_path": "milvus/deployments/docker/cluster-distributed-deployment/roles/deploy-etcd/tasks/main.yml", "repo_id": "milvus", "token_count": 245 }
1,708
# Paged CSV Loader This loader extracts the text from a local .csv file by formatting each row in an LLM-friendly way and inserting it into a separate Document. A single local file is passed in each time you call `load_data`. For example, a Document might look like: ``` First Name: Bruce Last Name: Wayne Age: 28 Occu...
llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/paged_csv/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/paged_csv/README.md", "repo_id": "llama_index", "token_count": 296 }
1,492
# 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...
transformers/src/transformers/models/plbart/convert_plbart_original_checkpoint_to_torch.py/0
{ "file_path": "transformers/src/transformers/models/plbart/convert_plbart_original_checkpoint_to_torch.py", "repo_id": "transformers", "token_count": 1325 }
646
""" Convert weights from https://github.com/google-research/nested-transformer NOTE: You'll need https://github.com/google/CommonLoopUtils, not included in requirements.txt """ import sys import numpy as np import torch from clu import checkpoint arch_depths = { 'nest_base': [2, 2, 20], 'nest_small': [2, 2...
pytorch-image-models/convert/convert_nest_flax.py/0
{ "file_path": "pytorch-image-models/convert/convert_nest_flax.py", "repo_id": "pytorch-image-models", "token_count": 2670 }
340
# CnosDB > [CnosDB](https://github.com/cnosdb/cnosdb) is an open-source distributed time series database with high performance, high compression rate and high ease of use. ## Installation and Setup ```python pip install cnos-connector ``` ## Connecting to CnosDB You can connect to CnosDB using the `SQLDatabase.from_...
langchain/docs/docs/integrations/providers/cnosdb.mdx/0
{ "file_path": "langchain/docs/docs/integrations/providers/cnosdb.mdx", "repo_id": "langchain", "token_count": 1427 }
133
import os from typing import List, Tuple from langchain.agents import AgentExecutor from langchain.agents.format_scratchpad import format_to_openai_function_messages from langchain.agents.output_parsers import OpenAIFunctionsAgentOutputParser from langchain.callbacks.manager import CallbackManagerForRetrieverRun from ...
langchain/templates/retrieval-agent/retrieval_agent/chain.py/0
{ "file_path": "langchain/templates/retrieval-agent/retrieval_agent/chain.py", "repo_id": "langchain", "token_count": 1656 }
711
[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.mypy] disallow_untyped_defs = true # Remove venv skip when integrated with pre-commit exclude = ["_static", "bu...
llama_index/llama-index-integrations/tools/llama-index-tools-yahoo-finance/pyproject.toml/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-yahoo-finance/pyproject.toml", "repo_id": "llama_index", "token_count": 585 }
1,641
<!--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...
peft/docs/source/developer_guides/mixed_models.md/0
{ "file_path": "peft/docs/source/developer_guides/mixed_models.md", "repo_id": "peft", "token_count": 770 }
322
from langchain.agents import agent_toolkits from tests.unit_tests import assert_all_importable EXPECTED_ALL = [ "AINetworkToolkit", "AmadeusToolkit", "AzureCognitiveServicesToolkit", "FileManagementToolkit", "GmailToolkit", "JiraToolkit", "JsonToolkit", "MultionToolkit", "NasaToolki...
langchain/libs/langchain/tests/unit_tests/agents/agent_toolkits/test_imports.py/0
{ "file_path": "langchain/libs/langchain/tests/unit_tests/agents/agent_toolkits/test_imports.py", "repo_id": "langchain", "token_count": 452 }
616
<!--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/training/controlnet.md/0
{ "file_path": "diffusers/docs/source/en/training/controlnet.md", "repo_id": "diffusers", "token_count": 4988 }
186
// 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/segcore/load_index_c.h/0
{ "file_path": "milvus/internal/core/src/segcore/load_index_c.h", "repo_id": "milvus", "token_count": 934 }
1,669
from langchain_community.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate _prompt = ChatPromptTemplate.from_messages( [ ( "system", "Translate user input into pirate speak", ), ("human", "{text}"), ] ) _model = ChatOpenAI() # i...
langchain/templates/pirate-speak/pirate_speak/chain.py/0
{ "file_path": "langchain/templates/pirate-speak/pirate_speak/chain.py", "repo_id": "langchain", "token_count": 178 }
707
python_sources()
llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-hubspot/llama_index/readers/airbyte_hubspot/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-hubspot/llama_index/readers/airbyte_hubspot/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,366
python_sources()
llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-falkordb/llama_index/graph_stores/falkordb/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-falkordb/llama_index/graph_stores/falkordb/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,379
--- sidebar_position: 3 --- # Tool use An exciting use case for LLMs is building natural language interfaces for other "tools", whether those are APIs, functions, databases, etc. LangChain is great for building such interfaces because it has: - Good model output parsing, which makes it easy to extract JSON, XML, Ope...
langchainjs/docs/core_docs/docs/use_cases/tool_use/index.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/use_cases/tool_use/index.mdx", "repo_id": "langchainjs", "token_count": 225 }
745
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, 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 Lice...
transformers/src/transformers/models/deprecated/transfo_xl/tokenization_transfo_xl.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/transfo_xl/tokenization_transfo_xl.py", "repo_id": "transformers", "token_count": 15131 }
632
export * from "./src/core.js"; export * from "./src/duplex.js"; export { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent, } from "./src/helpers.js"; /** * Default export for backwards compat */ import * as core from "./src/core.js"; import { PatchError as ...
langchainjs/langchain-core/src/utils/fast-json-patch/index.ts/0
{ "file_path": "langchainjs/langchain-core/src/utils/fast-json-patch/index.ts", "repo_id": "langchainjs", "token_count": 195 }
908
# neo4j-vector-memory This template allows you to integrate an LLM with a vector-based retrieval system using Neo4j as the vector store. Additionally, it uses the graph capabilities of the Neo4j database to store and retrieve the dialogue history of a specific user's session. Having the dialogue history stored as a g...
langchain/templates/neo4j-vector-memory/README.md/0
{ "file_path": "langchain/templates/neo4j-vector-memory/README.md", "repo_id": "langchain", "token_count": 835 }
679
import { test } from "@jest/globals"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { MemoryVectorStore } from "../../vectorstores/memory.js"; import { createHistoryAwareRetriever } from "../history_aware_retriever.js"; const QUES...
langchainjs/langchain/src/chains/tests/history_aware_retriever.int.test.ts/0
{ "file_path": "langchainjs/langchain/src/chains/tests/history_aware_retriever.int.test.ts", "repo_id": "langchainjs", "token_count": 610 }
897
--- sidebar_position: 3 --- # Vector stores :::info Head to [Integrations](/docs/integrations/vectorstores/) for documentation on built-in integrations with 3rd-party vector stores. ::: One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and...
langchain/docs/docs/modules/data_connection/vectorstores/index.mdx/0
{ "file_path": "langchain/docs/docs/modules/data_connection/vectorstores/index.mdx", "repo_id": "langchain", "token_count": 3101 }
202
package common import ( "testing" "github.com/stretchr/testify/assert" "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" ) func TestCloneKeyDataPairs(t *testing.T) { type args struct { pairs KeyDataPairs } tests := []struct { name string args args }{ { args: args{ pairs: nil, }, }, ...
milvus/pkg/common/key_data_pairs_test.go/0
{ "file_path": "milvus/pkg/common/key_data_pairs_test.go", "repo_id": "milvus", "token_count": 364 }
1,813
from typing import Optional, Type from langchain.callbacks.manager import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, ) # Import things that are needed generically from langchain.pydantic_v1 import BaseModel, Field from langchain.tools import BaseTool from neo4j_semantic_ollama.utils import ...
langchain/templates/neo4j-semantic-ollama/neo4j_semantic_ollama/memory_tool.py/0
{ "file_path": "langchain/templates/neo4j-semantic-ollama/neo4j_semantic_ollama/memory_tool.py", "repo_id": "langchain", "token_count": 785 }
678
poetry_requirements( name="poetry", ) python_requirements( name="reqs", )
llama_index/llama-index-integrations/readers/llama-index-readers-web/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/BUILD", "repo_id": "llama_index", "token_count": 36 }
1,442
python_sources()
llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/llama_index/packs/multidoc_autoretrieval/BUILD/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/llama_index/packs/multidoc_autoretrieval/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,800
from __future__ import annotations from abc import ABC, abstractmethod from typing import List, Literal, Sequence, cast from typing_extensions import TypedDict from langchain_core.load.serializable import Serializable from langchain_core.messages import ( AnyMessage, BaseMessage, HumanMessage, get_bu...
langchain/libs/core/langchain_core/prompt_values.py/0
{ "file_path": "langchain/libs/core/langchain_core/prompt_values.py", "repo_id": "langchain", "token_count": 1208 }
404
# Minio File or Directory Loader ## Boto This loader parses any file stored on Minio, or the entire Bucket (with an optional prefix filter) if no particular file is specified. When initializing `BotoMinioReader`, you may pass in your `minio_access_key` and `minio_secret_key` as `aws_access_id` and `aws_access_secret`...
llama_index/llama-index-integrations/readers/llama-index-readers-minio/llama_index/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-minio/llama_index/README.md", "repo_id": "llama_index", "token_count": 890 }
1,353
# (Tensorflow) EfficientNet **EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly scal...
pytorch-image-models/docs/models/tf-efficientnet.md/0
{ "file_path": "pytorch-image-models/docs/models/tf-efficientnet.md", "repo_id": "pytorch-image-models", "token_count": 7984 }
373
# coding=utf-8 # Copyright 2022 Sea AI Labs 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-...
transformers/src/transformers/models/poolformer/configuration_poolformer.py/0
{ "file_path": "transformers/src/transformers/models/poolformer/configuration_poolformer.py", "repo_id": "transformers", "token_count": 2243 }
708
from llama_index.readers.firestore.base import FirestoreReader __all__ = ["FirestoreReader"]
llama_index/llama-index-integrations/readers/llama-index-readers-firestore/llama_index/readers/firestore/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-firestore/llama_index/readers/firestore/__init__.py", "repo_id": "llama_index", "token_count": 29 }
1,323
OPENAI_API_KEY="YOUR_API_KEY" # Required for agent example # SERPAPI_API_KEY="YOUR_API_KEY" # Required for retrieval examples # SUPABASE_PRIVATE_KEY="YOUR_SUPABASE_PRIVATE_KEY" # SUPABASE_URL="YOUR_SUPABASE_URL" # Optional: For Tracing with LangSmith # LANGCHAIN_TRACING_V2=true # LANGCHAIN_API_KEY=YOUR_API_KEY # LAN...
langchain-nextjs-template/.env.example/0
{ "file_path": "langchain-nextjs-template/.env.example", "repo_id": "langchain-nextjs-template", "token_count": 195 }
67
poetry_requirements( name="poetry", ) python_requirements( name="reqs", )
llama_index/llama-index-packs/llama-index-packs-rag-cli-local/BUILD/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-rag-cli-local/BUILD", "repo_id": "llama_index", "token_count": 36 }
1,599
FROM node:18 AS builder WORKDIR /frontend COPY ./frontend/package.json ./frontend/yarn.lock ./ RUN yarn --network-timeout 600000 --frozen-lockfile COPY ./frontend ./ RUN rm -rf .env RUN yarn build # Backend Dockerfile FROM python:3.11 # Install system dependencies RUN apt-get update && apt-get install -y libmag...
opengpts/Dockerfile/0
{ "file_path": "opengpts/Dockerfile", "repo_id": "opengpts", "token_count": 221 }
2,052
import { jest, test } from "@jest/globals"; import { GithubFile, GithubRepoLoader } from "../web/github.js"; import { GithubLoaderApis } from "./example_data/github_api_responses.js"; describe("GithubRepoLoader recursion", () => { let callCount = 0; beforeAll(() => { global.fetch = jest.fn().mockImplementation...
langchainjs/langchain/src/document_loaders/tests/github.test.ts/0
{ "file_path": "langchainjs/langchain/src/document_loaders/tests/github.test.ts", "repo_id": "langchainjs", "token_count": 812 }
971
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.29289 5.29289C8.68342 4.90237 9.31658 4.90237 9.70711 5.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L9.70711 18.7071C9.31658 19.0976 8.68342 ...
langserve/langserve/playground/src/assets/ChevronRight.svg/0
{ "file_path": "langserve/langserve/playground/src/assets/ChevronRight.svg", "repo_id": "langserve", "token_count": 251 }
1,029
"""Task fetching unit. Taken from https://github.com/SqueezeAILab/LLMCompiler/blob/main/src/llm_compiler/task_fetching_unit.py """ import asyncio from typing import Any, Collection, Dict, List, Set, Tuple, Union from llama_index.core.utils import print_text from pydantic import BaseModel from .schema import LLMCom...
llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/task_fetching_unit.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/task_fetching_unit.py", "repo_id": "llama_index", "token_count": 2919 }
1,770
##################################################################### # THIS FILE IS AUTOMATICALLY GENERATED BY UNSTRUCTURED API TOOLS. # DO NOT MODIFY DIRECTLY ##################################################################### import gzip import io import json import mimetypes import os import secrets from base64 ...
llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/prepline_sec_filings/api/section.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/prepline_sec_filings/api/section.py", "repo_id": "llama_index", "token_count": 6521 }
1,376
import type { OpenAIClient } from "@langchain/openai"; import { AgentAction, AgentFinish } from "@langchain/core/agents"; import { BaseMessage, isBaseMessage } from "@langchain/core/messages"; import { ChatGeneration } from "@langchain/core/outputs"; import { OutputParserException } from "@langchain/core/output_parsers...
langchainjs/langchain/src/agents/openai_functions/output_parser.ts/0
{ "file_path": "langchainjs/langchain/src/agents/openai_functions/output_parser.ts", "repo_id": "langchainjs", "token_count": 1271 }
851
/* eslint-disable no-undef */ /** @type {import('tailwindcss').Config} */ import defaultTheme from "tailwindcss/defaultTheme"; export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], theme: { extend: { fontFamily: { sans: ["Inter var", ...defaultTheme.fontFamily.sans], }, ...
opengpts/frontend/tailwind.config.js/0
{ "file_path": "opengpts/frontend/tailwind.config.js", "repo_id": "opengpts", "token_count": 161 }
2,143
from typing import List, Optional from langchain.output_parsers.openai_functions import JsonKeyOutputFunctionsParser from langchain.utils.openai_functions import convert_pydantic_to_openai_function from langchain_core.prompts import ChatPromptTemplate from langchain_core.pydantic_v1 import BaseModel from langchain_exp...
langchain/templates/extraction-anthropic-functions/extraction_anthropic_functions/chain.py/0
{ "file_path": "langchain/templates/extraction-anthropic-functions/extraction_anthropic_functions/chain.py", "repo_id": "langchain", "token_count": 384 }
643
package indexparamcheck import ( "fmt" ) type binIVFFlatChecker struct { binaryVectorBaseChecker } func (c binIVFFlatChecker) StaticCheck(params map[string]string) error { if !CheckStrByValues(params, Metric, BinIvfMetrics) { return fmt.Errorf("metric type %s not found or not supported, supported: %v", params[M...
milvus/pkg/util/indexparamcheck/bin_ivf_flat_checker.go/0
{ "file_path": "milvus/pkg/util/indexparamcheck/bin_ivf_flat_checker.go", "repo_id": "milvus", "token_count": 269 }
2,054