text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
// Evaluation methods export { RunEvaluator, EvaluationResult } from "./evaluator.js"; export { StringEvaluator, GradingFunctionParams, GradingFunctionResult, } from "./string_evaluator.js";
langsmith-sdk/js/src/evaluation/index.ts/0
{ "file_path": "langsmith-sdk/js/src/evaluation/index.ts", "repo_id": "langsmith-sdk", "token_count": 64 }
1,067
# docstyle-ignore INSTALL_CONTENT = """ # PEFT installation ! pip install peft accelerate transformers # To install from source instead of the last release, comment the command above and uncomment the following one. # ! pip install git+https://github.com/huggingface/peft.git """
peft/docs/source/_config.py/0
{ "file_path": "peft/docs/source/_config.py", "repo_id": "peft", "token_count": 75 }
333
import { expect, test } from "@jest/globals"; import { AIMessagePromptTemplate, ChatPromptTemplate, ChatMessagePromptTemplate, HumanMessagePromptTemplate, SystemMessagePromptTemplate, MessagesPlaceholder, } from "../chat.js"; import { PromptTemplate } from "../prompt.js"; import { SystemMessage, HumanMe...
langchainjs/langchain-core/src/prompts/tests/chat.test.ts/0
{ "file_path": "langchainjs/langchain-core/src/prompts/tests/chat.test.ts", "repo_id": "langchainjs", "token_count": 6125 }
864
import { ChatIflytekXinghuo } from "@langchain/community/chat_models/iflytek_xinghuo"; import { HumanMessage } from "@langchain/core/messages"; const model = new ChatIflytekXinghuo(); const messages1 = [new HumanMessage("Nice to meet you!")]; const res1 = await model.call(messages1); console.log(res1); const messa...
langchainjs/examples/src/models/chat/integration_iflytek_xinghuo.ts/0
{ "file_path": "langchainjs/examples/src/models/chat/integration_iflytek_xinghuo.ts", "repo_id": "langchainjs", "token_count": 143 }
835
"""Base tool spec class.""" import asyncio from inspect import signature from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.tools.function_tool import FunctionTool from llama_index.core.tools.types import ...
llama_index/llama-index-core/llama_index/core/tools/tool_spec/base.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/tools/tool_spec/base.py", "repo_id": "llama_index", "token_count": 2078 }
1,253
<!--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...
accelerate/docs/source/basic_tutorials/launch.md/0
{ "file_path": "accelerate/docs/source/basic_tutorials/launch.md", "repo_id": "accelerate", "token_count": 2702 }
1
<jupyter_start><jupyter_text>Vectara Managed IndexIn this notebook we are going to show how to use [Vectara](https://vectara.com) with LlamaIndex.Vectara is the first example of a "Managed" Index, a new type of index in Llama-index which is managed via an API. If you're opening this Notebook on colab, you will probably...
llama_index/docs/examples/managed/vectaraDemo.ipynb/0
{ "file_path": "llama_index/docs/examples/managed/vectaraDemo.ipynb", "repo_id": "llama_index", "token_count": 2020 }
1,118
import { BaseRetriever, type BaseRetrieverInput, } from "@langchain/core/retrievers"; import { Document } from "@langchain/core/documents"; import { AsyncCaller, AsyncCallerParams, } from "@langchain/core/utils/async_caller"; /** * Interface for the arguments required to create a new instance of * DataberryR...
langchainjs/libs/langchain-community/src/retrievers/databerry.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/retrievers/databerry.ts", "repo_id": "langchainjs", "token_count": 902 }
962
<!--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/ko/tutorials/tutorial_overview.md/0
{ "file_path": "diffusers/docs/source/ko/tutorials/tutorial_overview.md", "repo_id": "diffusers", "token_count": 1210 }
198
<jupyter_start><jupyter_text>Ollama Llama Pack Example Setup Data<jupyter_code>!wget "https://www.dropbox.com/s/f6bmb19xdg0xedm/paul_graham_essay.txt?dl=1" -O paul_graham_essay.txt from llama_index.core import SimpleDirectoryReader # load in some sample data reader = SimpleDirectoryReader(input_files=["paul_graham_es...
llama_index/docs/examples/llama_hub/llama_pack_ollama.ipynb/0
{ "file_path": "llama_index/docs/examples/llama_hub/llama_pack_ollama.ipynb", "repo_id": "llama_index", "token_count": 583 }
1,142
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export4.dtd"> <en-export export-date="20230309T035336Z" application="Evernote" version="10.53.2"> <note> <title>testing</title> <created>20230209T034746Z</created> <updated>20230209T035328Z</updated> ...
langchain/docs/docs/integrations/document_loaders/example_data/testing.enex/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/example_data/testing.enex", "repo_id": "langchain", "token_count": 499 }
110
<jupyter_start><jupyter_text>A Simple to Advanced Guide with Auto-Retrieval (with Pinecone + Arize Phoenix)In this notebook we showcase how to perform **auto-retrieval** against Pinecone, which lets you execute a broad range of semi-structured queries beyond what you can do with standard top-k semantic search.We show b...
llama_index/docs/examples/vector_stores/pinecone_auto_retriever.ipynb/0
{ "file_path": "llama_index/docs/examples/vector_stores/pinecone_auto_retriever.ipynb", "repo_id": "llama_index", "token_count": 4960 }
1,136
import type { RequestHandler } from "./$types"; import { collections } from "$lib/server/database"; import { ObjectId } from "mongodb"; import { error, redirect } from "@sveltejs/kit"; import { base } from "$app/paths"; import { z } from "zod"; import type { Message } from "$lib/types/Message"; import { models, validat...
chat-ui/src/routes/conversation/+server.ts/0
{ "file_path": "chat-ui/src/routes/conversation/+server.ts", "repo_id": "chat-ui", "token_count": 1046 }
102
import { MyScaleStore } from "@langchain/community/vectorstores/myscale"; import { OpenAIEmbeddings } from "@langchain/openai"; const vectorStore = await MyScaleStore.fromExistingIndex( new OpenAIEmbeddings(), { host: process.env.MYSCALE_HOST || "localhost", port: process.env.MYSCALE_PORT || "8443", us...
langchainjs/examples/src/indexes/vector_stores/myscale_search.ts/0
{ "file_path": "langchainjs/examples/src/indexes/vector_stores/myscale_search.ts", "repo_id": "langchainjs", "token_count": 258 }
877
"""Test Anyscale API wrapper.""" from langchain_community.llms.anyscale import Anyscale def test_anyscale_call() -> None: """Test valid call to Anyscale.""" llm = Anyscale() output = llm("Say foo:") assert isinstance(output, str)
langchain/libs/community/tests/integration_tests/llms/test_anyscale.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/llms/test_anyscale.py", "repo_id": "langchain", "token_count": 92 }
353
from llama_index.core.readers.base import BaseReader from llama_index.readers.jaguar import JaguarReader def test_class(): names_of_base_classes = [b.__name__ for b in JaguarReader.__mro__] assert BaseReader.__name__ in names_of_base_classes
llama_index/llama-index-integrations/readers/llama-index-readers-jaguar/tests/test_readers_jaguar.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-jaguar/tests/test_readers_jaguar.py", "repo_id": "llama_index", "token_count": 87 }
1,319
"""Data structures. Nodes are decoupled from the indices. """ import uuid from abc import abstractmethod from dataclasses import dataclass, field from typing import Dict, List, Optional, Sequence, Set from dataclasses_json import DataClassJsonMixin from llama_index.core.data_structs.struct_type import IndexStructTy...
llama_index/llama-index-core/llama_index/core/data_structs/data_structs.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/data_structs/data_structs.py", "repo_id": "llama_index", "token_count": 3326 }
1,205
python_tests()
llama_index/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,561
<jupyter_start><jupyter_text>TiDB> [TiDB](https://github.com/pingcap/tidb) is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics.This notebook introduces how to use TiDB to store chat message history. SetupFirstly, we will install the following dependencies:...
langchain/docs/docs/integrations/memory/tidb_chat_message_history.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/memory/tidb_chat_message_history.ipynb", "repo_id": "langchain", "token_count": 1098 }
130
"""Test utilities in the LangSmith server."""
langsmith-sdk/python/tests/unit_tests/cli/test_main.py/0
{ "file_path": "langsmith-sdk/python/tests/unit_tests/cli/test_main.py", "repo_id": "langsmith-sdk", "token_count": 11 }
1,151
<jupyter_start><jupyter_text>Nvidia Triton Nvidia's Triton is an inference server that provides API access to hosted LLM models. This connector allows for llama_index to remotely interact with a Triton inference server over GRPC to accelerate inference operations.[Triton Inference Server Github](https://github.com/trit...
llama_index/docs/examples/llm/nvidia_triton.ipynb/0
{ "file_path": "llama_index/docs/examples/llm/nvidia_triton.ipynb", "repo_id": "llama_index", "token_count": 484 }
1,063
use std::fmt; use std::process::Command; pub(crate) struct Env { cargo_target: &'static str, cargo_version: &'static str, git_sha: &'static str, docker_label: &'static str, nvidia_env: String, } impl Env { pub fn new() -> Self { let nvidia_env = nvidia_smi(); Self { ...
text-generation-inference/launcher/src/env_runtime.rs/0
{ "file_path": "text-generation-inference/launcher/src/env_runtime.rs", "repo_id": "text-generation-inference", "token_count": 650 }
402
# Cache management When you download a dataset, the processing scripts and data are stored locally on your computer. The cache allows ๐Ÿค— Datasets to avoid re-downloading or processing the entire dataset every time you use it. This guide will show you how to: - Change the cache directory. - Control how a dataset is ...
datasets/docs/source/cache.mdx/0
{ "file_path": "datasets/docs/source/cache.mdx", "repo_id": "datasets", "token_count": 1027 }
121
import pytest from llama_index.legacy.schema import NodeWithScore, TextNode @pytest.fixture() def text_node() -> TextNode: return TextNode( text="hello world", metadata={"foo": "bar"}, embedding=[0.1, 0.2, 0.3], ) @pytest.fixture() def node_with_score(text_node: TextNode) -> NodeWith...
llama_index/llama-index-legacy/tests/test_schema.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/test_schema.py", "repo_id": "llama_index", "token_count": 657 }
1,821
"""Test the functionality of loading from langchain-hub.""" import json import re from pathlib import Path from typing import Iterable from unittest.mock import Mock from urllib.parse import urljoin import pytest import responses from langchain_core.utils.loading import DEFAULT_REF, URL_BASE, try_load_from_hub @pyt...
langchain/libs/community/tests/unit_tests/utilities/test_loading.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/utilities/test_loading.py", "repo_id": "langchain", "token_count": 1104 }
426
# Vercel Postgres LangChain.js supports using the [`@vercel/postgres`](https://www.npmjs.com/package/@vercel/postgres) package to use generic Postgres databases as vector stores, provided they support the [`pgvector`](https://github.com/pgvector/pgvector) Postgres extension. This integration is particularly useful fr...
langchainjs/docs/core_docs/docs/integrations/vectorstores/vercel_postgres.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/vercel_postgres.mdx", "repo_id": "langchainjs", "token_count": 543 }
721
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually. export interface OptionalImportMap {} export interface SecretMap { }
langchainjs/langchain-core/src/load/import_type.ts/0
{ "file_path": "langchainjs/langchain-core/src/load/import_type.ts", "repo_id": "langchainjs", "token_count": 39 }
833
pub mod attention; pub mod clip; pub mod ddim; pub mod ddpm; pub mod embeddings; pub mod euler_ancestral_discrete; pub mod resnet; pub mod schedulers; pub mod unet_2d; pub mod unet_2d_blocks; pub mod utils; pub mod vae; use std::sync::Arc; use candle::{DType, Device, Result}; use candle_nn as nn; use self::scheduler...
candle/candle-transformers/src/models/stable_diffusion/mod.rs/0
{ "file_path": "candle/candle-transformers/src/models/stable_diffusion/mod.rs", "repo_id": "candle", "token_count": 7668 }
70
# Support to retrieve the specified entity from a collection ## Background In Milvus, a collection has multiple fields, mainly there are two kinds of fields: vector field and scalar field. We call a row an entity, one entity encapsulates multiple vectors and scalar values. When creating a collection, you can specify...
milvus/docs/design_docs/20211221-retrieve_entity.md/0
{ "file_path": "milvus/docs/design_docs/20211221-retrieve_entity.md", "repo_id": "milvus", "token_count": 1385 }
1,629
python_sources()
llama_index/llama-index-integrations/program/llama-index-program-openai/llama_index/program/openai/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/program/llama-index-program-openai/llama_index/program/openai/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,394
/** * Here's the main parser for our expression parser. It's a pared down * Javascript parser with a whole lot of rules removed, leaving only * rules for parsing literals (i.e. string literal,numeric literal, * boolean literal, array literal, object literal and null literal), * identifiers, and expressions (i.e. c...
langchainjs/langchain/src/output_parsers/expression_type_handlers/grammar/parser_grammar.ts/0
{ "file_path": "langchainjs/langchain/src/output_parsers/expression_type_handlers/grammar/parser_grammar.ts", "repo_id": "langchainjs", "token_count": 3081 }
909
from typing import Dict, Union import pytest from docker.models.containers import Container from llama_index.legacy.storage.kvstore.postgres_kvstore import PostgresKVStore try: import asyncpg # noqa import psycopg2 # noqa import sqlalchemy # noqa no_packages = False except ImportError: no_pack...
llama_index/llama-index-legacy/tests/storage/kvstore/test_postgres_kvstore.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/storage/kvstore/test_postgres_kvstore.py", "repo_id": "llama_index", "token_count": 2139 }
1,681
# coding=utf-8 # Copyright 2022 Meta and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
transformers/src/transformers/models/esm/configuration_esm.py/0
{ "file_path": "transformers/src/transformers/models/esm/configuration_esm.py", "repo_id": "transformers", "token_count": 6006 }
684
[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 = ["HuggingFaceInferenceAPI", "HuggingFaceLLM"] contains_example = false import_path = "llama...
llama_index/llama-index-integrations/llms/llama-index-llms-huggingface/pyproject.toml/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-huggingface/pyproject.toml", "repo_id": "llama_index", "token_count": 708 }
1,297
import { getEnvironmentVariable } from "@langchain/core/utils/env"; import { ensureAuthOptionScopes, GoogleAbstractedClientOps, GoogleAbstractedFetchClient, GoogleBaseLLMInput, } from "@langchain/google-common"; import { getAccessToken, getCredentials, Credentials, } from "web-auth-library/google"; expor...
langchainjs/libs/langchain-google-webauth/src/auth.ts/0
{ "file_path": "langchainjs/libs/langchain-google-webauth/src/auth.ts", "repo_id": "langchainjs", "token_count": 617 }
1,018
"""Test utils.""" from llama_index.core.indices.keyword_table.utils import ( extract_keywords_given_response, ) def test_expand_tokens_with_subtokens() -> None: """Test extract keywords given response.""" response = "foo bar, baz, Hello hello wOrld bye" keywords = extract_keywords_given_response(resp...
llama_index/llama-index-core/tests/indices/keyword_table/test_utils.py/0
{ "file_path": "llama_index/llama-index-core/tests/indices/keyword_table/test_utils.py", "repo_id": "llama_index", "token_count": 438 }
1,219
import { LangChainConfig } from "./types.js"; export function _verifyObjectIsLangChainConfig( // eslint-disable-next-line @typescript-eslint/no-explicit-any obj: any ): obj is LangChainConfig { if (typeof obj !== "object") { return false; } if ( !("entrypoints" in obj) || !("tsConfigPath" in obj)...
langchainjs/libs/langchain-scripts/src/utils.ts/0
{ "file_path": "langchainjs/libs/langchain-scripts/src/utils.ts", "repo_id": "langchainjs", "token_count": 958 }
1,023
{ "_type": "prompt", "input_variables": ["input", "output"], "template": "Input: {input}\nOutput: {output}" }
langchain/libs/core/tests/unit_tests/examples/example_prompt.json/0
{ "file_path": "langchain/libs/core/tests/unit_tests/examples/example_prompt.json", "repo_id": "langchain", "token_count": 51 }
425
# coding=utf-8 # Copyright 2021 The Fairseq Authors 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/unispeech_sat/configuration_unispeech_sat.py/0
{ "file_path": "transformers/src/transformers/models/unispeech_sat/configuration_unispeech_sat.py", "repo_id": "transformers", "token_count": 7474 }
756
<jupyter_start><jupyter_text>Airbyte Gong >[Airbyte](https://github.com/airbytehq/airbyte) is a data integration platform for ELT pipelines from APIs, databases & files to warehouses & lakes. It has the largest catalog of ELT connectors to data warehouses and databases.This loader exposes the Gong connector as a docume...
langchain/docs/docs/integrations/document_loaders/airbyte_gong.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/airbyte_gong.ipynb", "repo_id": "langchain", "token_count": 916 }
95
// 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/index/StringIndexMarisa.cpp/0
{ "file_path": "milvus/internal/core/src/index/StringIndexMarisa.cpp", "repo_id": "milvus", "token_count": 8050 }
1,659
repos: - repo: https://github.com/charliermarsh/ruff-pre-commit # https://github.com/charliermarsh/ruff#usage rev: 'v0.1.5' hooks: # Run the linter. - id: ruff args: [ --fix ] # Run the formatter. - id: ruff-format
datasets/.pre-commit-config.yaml/0
{ "file_path": "datasets/.pre-commit-config.yaml", "repo_id": "datasets", "token_count": 122 }
125
# `Auto-evaluator` :brain: :memo: `Context` Document [Question-Answering](https://python.langchain.com/en/latest/use_cases/question_answering.html) is a popular LLM use-case. LangChain makes it easy to assemble LLM components (e.g., models and retrievers) into chains that support question-answering: input documents a...
auto-evaluator/README.md/0
{ "file_path": "auto-evaluator/README.md", "repo_id": "auto-evaluator", "token_count": 2558 }
0
"""Function components.""" from inspect import signature from typing import Any, Callable, Dict, Optional, Set, Tuple from llama_index.core.base.query_pipeline.query import ( InputKeys, OutputKeys, QueryComponent, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.call...
llama_index/llama-index-core/llama_index/core/query_pipeline/components/function.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/query_pipeline/components/function.py", "repo_id": "llama_index", "token_count": 1568 }
1,171
"""Test ChatDeepInfra wrapper.""" from langchain_core.messages import BaseMessage, HumanMessage from langchain_core.outputs import ChatGeneration, LLMResult from langchain_community.chat_models.deepinfra import ChatDeepInfra from tests.unit_tests.callbacks.fake_callback_handler import FakeCallbackHandler def test_ch...
langchain/libs/community/tests/integration_tests/chat_models/test_deepinfra.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/chat_models/test_deepinfra.py", "repo_id": "langchain", "token_count": 796 }
324
package coordinator import ( "context" "log" "github.com/chroma/chroma-coordinator/internal/metastore" "github.com/chroma/chroma-coordinator/internal/metastore/coordinator" "github.com/chroma/chroma-coordinator/internal/metastore/db/dao" "github.com/chroma/chroma-coordinator/internal/metastore/db/dbcore" "gith...
chroma/go/coordinator/internal/coordinator/coordinator.go/0
{ "file_path": "chroma/go/coordinator/internal/coordinator/coordinator.go", "repo_id": "chroma", "token_count": 816 }
42
<jupyter_start><jupyter_text>Astra DBThis page provides a quickstart for using [Astra DB](https://docs.datastax.com/en/astra/home/astra.html) as a Vector Store. > DataStax [Astra DB](https://docs.datastax.com/en/astra/home/astra.html) is a serverless vector-capable database built on Apache Cassandraยฎ and made convenien...
langchain/docs/docs/integrations/vectorstores/astradb.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/vectorstores/astradb.ipynb", "repo_id": "langchain", "token_count": 2566 }
180
python_sources()
llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-cdk/llama_index/readers/airbyte_cdk/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-cdk/llama_index/readers/airbyte_cdk/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,277
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
transformers/tests/models/vivit/test_image_processing_vivit.py/0
{ "file_path": "transformers/tests/models/vivit/test_image_processing_vivit.py", "repo_id": "transformers", "token_count": 4033 }
757
"""PlaygroundsSubgraphInspectorToolSpec.""" import requests from llama_index.tools.graphql.base import GraphQLToolSpec class PlaygroundsSubgraphInspectorToolSpec(GraphQLToolSpec): """ Connects to subgraphs on The Graph's decentralized network via the Playgrounds API and introspects the subgraph. Provides...
llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/llama_index/tools/playgrounds/subgraph_inspector/base.py/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/llama_index/tools/playgrounds/subgraph_inspector/base.py", "repo_id": "llama_index", "token_count": 4760 }
1,629
"""Agent executor.""" import asyncio from collections import deque from typing import Any, Deque, Dict, List, Optional, Union, cast from llama_index.legacy.agent.runner.base import BaseAgentRunner from llama_index.legacy.agent.types import ( BaseAgentWorker, Task, TaskStep, TaskStepOutput, ) from llam...
llama_index/llama-index-legacy/llama_index/legacy/agent/runner/parallel.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/runner/parallel.py", "repo_id": "llama_index", "token_count": 7122 }
1,639
"""Integration test for SerpAPI.""" from langchain_community.utilities import SerpAPIWrapper def test_call() -> None: """Test that call gives the correct answer.""" chain = SerpAPIWrapper() output = chain.run("What was Obama's first name?") assert output == "Barack Hussein Obama II"
langchain/libs/community/tests/integration_tests/utilities/test_serpapi.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/utilities/test_serpapi.py", "repo_id": "langchain", "token_count": 94 }
383
# backward compatibility from llama_index.legacy.text_splitter import *
llama_index/llama-index-legacy/llama_index/legacy/langchain_helpers/text_splitter.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/langchain_helpers/text_splitter.py", "repo_id": "llama_index", "token_count": 20 }
1,673
{ "name": "Jimmeny", "type": "personal_chat", "id": 5965280513, "messages": [ { "id": 1, "type": "message", "date": "2023-08-23T13:11:23", "date_unixtime": "1692821483", "from": "Jimmeny Marvelton", "from_id": "user123450513", "text": "i refuse to converse with you", "text_entities": [ ...
langchain/libs/community/tests/unit_tests/chat_loaders/data/telegram_chat_json/result.json/0
{ "file_path": "langchain/libs/community/tests/unit_tests/chat_loaders/data/telegram_chat_json/result.json", "repo_id": "langchain", "token_count": 637 }
382
apiVersion: chaos-mesh.org/v1alpha1 kind: NetworkChaos metadata: name: test-rootcoord-network-partition namespace: chaos-testing spec: action: partition mode: all selector: namespaces: - chaos-testing labelSelectors: app.kubernetes.io/instance: chaos-testing app.kubernetes.io/name: m...
milvus/tests/python_client/chaos/chaos_objects/network_partition/chaos_rootcoord_network_partition.yaml/0
{ "file_path": "milvus/tests/python_client/chaos/chaos_objects/network_partition/chaos_rootcoord_network_partition.yaml", "repo_id": "milvus", "token_count": 241 }
2,024
import { IEmbeddingFunction } from "./IEmbeddingFunction"; // Dynamically import module let TransformersApi: Promise<any>; export class TransformersEmbeddingFunction implements IEmbeddingFunction { private pipelinePromise?: Promise<any> | null; private transformersApi: any; private model: string; private revi...
chroma/clients/js/src/embeddings/TransformersEmbeddingFunction.ts/0
{ "file_path": "chroma/clients/js/src/embeddings/TransformersEmbeddingFunction.ts", "repo_id": "chroma", "token_count": 1263 }
29
# 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 applicabl...
transformers/examples/legacy/seq2seq/sentence_splitter.py/0
{ "file_path": "transformers/examples/legacy/seq2seq/sentence_splitter.py", "repo_id": "transformers", "token_count": 403 }
546
"""Test base chat model.""" import pytest from langchain_core.messages import HumanMessage, SystemMessage from langchain_core.outputs.llm_result import LLMResult from langchain_core.tracers.context import collect_runs from tests.unit_tests.fake.callbacks import ( BaseFakeCallbackHandler, FakeAsyncCallbackHand...
langchain/libs/core/tests/unit_tests/language_models/chat_models/test_base.py/0
{ "file_path": "langchain/libs/core/tests/unit_tests/language_models/chat_models/test_base.py", "repo_id": "langchain", "token_count": 1632 }
430
from typing import Any, List, Literal, Optional import fsspec from llama_index.legacy.vector_stores.docarray.base import DocArrayVectorStore class DocArrayInMemoryVectorStore(DocArrayVectorStore): """Class representing a DocArray In-Memory vector store. This class is a document index provided by Docarray t...
llama_index/llama-index-legacy/llama_index/legacy/vector_stores/docarray/in_memory.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/vector_stores/docarray/in_memory.py", "repo_id": "llama_index", "token_count": 1199 }
1,784
// Code generated by mockery v2.32.4. DO NOT EDIT. package delegator import ( context "context" internalpb "github.com/milvus-io/milvus/internal/proto/internalpb" mock "github.com/stretchr/testify/mock" msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb" querypb "github.com/milvus-io/milvus/internal/pro...
milvus/internal/querynodev2/delegator/mock_delegator.go/0
{ "file_path": "milvus/internal/querynodev2/delegator/mock_delegator.go", "repo_id": "milvus", "token_count": 11221 }
2,042
import json from typing import Any, Dict, List, Optional, Tuple, cast from llama_index.legacy.storage.kvstore.types import ( DEFAULT_BATCH_SIZE, DEFAULT_COLLECTION, BaseKVStore, ) IMPORT_ERROR_MSG = "`redis` package not found, please run `pip install redis`" class RedisKVStore(BaseKVStore): """Redis...
llama_index/llama-index-legacy/llama_index/legacy/storage/kvstore/redis_kvstore.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/storage/kvstore/redis_kvstore.py", "repo_id": "llama_index", "token_count": 2595 }
1,646
import torch from diffusers import EulerAncestralDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class EulerAncestralDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (EulerAncestralDiscreteScheduler,) num_inference_step...
diffusers/tests/schedulers/test_scheduler_euler_ancestral.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_euler_ancestral.py", "repo_id": "diffusers", "token_count": 2492 }
289
<jupyter_start><jupyter_text>Shell (bash)Giving agents access to the shell is powerful (though risky outside a sandboxed environment).The LLM can use it to execute any shell commands. A common use case for this is letting the LLM interact with your local file system.**Note:** Shell tool does not work with Windows OS.<j...
langchain/docs/docs/integrations/tools/bash.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/tools/bash.ipynb", "repo_id": "langchain", "token_count": 560 }
181
<jupyter_start><jupyter_text>How to download feedback and examples from a test project[](https://colab.research.google.com/github/langchain-ai/langsmith-cookbook/blob/main/testing-examples/download-feedback-and-examples/download_example.ipynb)When testing with Langsmith, all the traces, examples, and evaluation feedbac...
langsmith-cookbook/testing-examples/download-feedback-and-examples/download_example.ipynb/0
{ "file_path": "langsmith-cookbook/testing-examples/download-feedback-and-examples/download_example.ipynb", "repo_id": "langsmith-cookbook", "token_count": 1679 }
1,022
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Team All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
transformers/examples/pytorch/question-answering/run_qa.py/0
{ "file_path": "transformers/examples/pytorch/question-answering/run_qa.py", "repo_id": "transformers", "token_count": 13200 }
588
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.jinaai import JinaEmbedding def test_embedding_class(): emb = JinaEmbedding() assert isinstance(emb, BaseEmbedding)
llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/tests/test_embeddings_jinaai.py/0
{ "file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/tests/test_embeddings_jinaai.py", "repo_id": "llama_index", "token_count": 78 }
1,191
"""Agent for working with pandas objects.""" from typing import Any, Dict, List, Optional from langchain.agents.agent import AgentExecutor from langchain.agents.mrkl.base import ZeroShotAgent from langchain.callbacks.base import BaseCallbackManager from langchain.chains.llm import LLMChain from langchain_core.language...
langchain/libs/experimental/langchain_experimental/agents/agent_toolkits/spark/base.py/0
{ "file_path": "langchain/libs/experimental/langchain_experimental/agents/agent_toolkits/spark/base.py", "repo_id": "langchain", "token_count": 1066 }
454
"""BasePrompt schema definition.""" from __future__ import annotations import warnings from abc import ABC from string import Formatter from typing import Any, Callable, Dict, List, Set from langchain_core.prompt_values import PromptValue, StringPromptValue from langchain_core.prompts.base import BasePromptTemplate ...
langchain/libs/core/langchain_core/prompts/string.py/0
{ "file_path": "langchain/libs/core/langchain_core/prompts/string.py", "repo_id": "langchain", "token_count": 2365 }
396
# 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/owlv2/test_modeling_owlv2.py/0
{ "file_path": "transformers/tests/models/owlv2/test_modeling_owlv2.py", "repo_id": "transformers", "token_count": 15800 }
743
# Intro Very often you have a large code base, with a rich docstrings and comments, that you would like to use to produce documentation. In fact, many open-source libraries like Scikit-learn or PyTorch have docstring so rich, that they contain LaTeX equations, or detailed examples. At the same time, sometimes LLMs ar...
llama_index/llama-index-integrations/readers/llama-index-readers-docstring-walker/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-docstring-walker/README.md", "repo_id": "llama_index", "token_count": 1741 }
1,483
<jupyter_start><jupyter_text>Document LoadingLoad a blog post on agents.<jupyter_code>from langchain_community.document_loaders import WebBaseLoader loader = WebBaseLoader("https://lilianweng.github.io/posts/2023-06-23-agent/") text = loader.load()<jupyter_output><empty_output><jupyter_text>Run TemplateIn `server.py`,...
langchain/templates/extraction-openai-functions/extraction_openai_functions.ipynb/0
{ "file_path": "langchain/templates/extraction-openai-functions/extraction_openai_functions.ipynb", "repo_id": "langchain", "token_count": 266 }
654
# Airbyte CDK Loader The Airbyte CDK Loader is a shim for sources created using the [Airbyte Python CDK](https://docs.airbyte.com/connector-development/cdk-python/). It allows you to load data from any Airbyte source into LlamaIndex. ## Installation - Install llama_hub: `pip install llama_hub` - Install airbyte-cdk:...
llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-cdk/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-cdk/README.md", "repo_id": "llama_index", "token_count": 891 }
1,306
import json from datetime import datetime from enum import Enum from operator import itemgetter from typing import Any, Dict, Sequence from langchain.chains.openai_functions import convert_to_openai_function from langchain_community.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate fr...
langchain/templates/basic-critique-revise/basic_critique_revise/chain.py/0
{ "file_path": "langchain/templates/basic-critique-revise/basic_critique_revise/chain.py", "repo_id": "langchain", "token_count": 1396 }
647
import json from typing import Any, Callable, Dict, Literal, Optional, Sequence, Type, Union from langchain_core.output_parsers import ( BaseGenerationOutputParser, BaseOutputParser, JsonOutputParser, ) from langchain_core.prompts import BasePromptTemplate from langchain_core.pydantic_v1 import BaseModel f...
langchain/libs/langchain/langchain/chains/structured_output/base.py/0
{ "file_path": "langchain/libs/langchain/langchain/chains/structured_output/base.py", "repo_id": "langchain", "token_count": 6263 }
491
# 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/whisper/processing_whisper.py/0
{ "file_path": "transformers/src/transformers/models/whisper/processing_whisper.py", "repo_id": "transformers", "token_count": 1465 }
700
# coding=utf-8 # Copyright 2020 Huggingface # # 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/tests/models/dpr/test_tokenization_dpr.py/0
{ "file_path": "transformers/tests/models/dpr/test_tokenization_dpr.py", "repo_id": "transformers", "token_count": 1263 }
781
"""Query plan tool.""" from typing import Any, Dict, List, Optional from llama_index.legacy.bridge.pydantic import BaseModel, Field from llama_index.legacy.response_synthesizers import ( BaseSynthesizer, get_response_synthesizer, ) from llama_index.legacy.schema import NodeWithScore, TextNode from llama_index...
llama_index/llama-index-legacy/llama_index/legacy/tools/query_plan.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/tools/query_plan.py", "repo_id": "llama_index", "token_count": 3276 }
1,618
# OpenAlex Reader This loader will search for papers in OpenAlex and load them in llama-index. The main advantage of using OpenAlex is that you can search the full-text for Open Access papers as well. ## Usage ```python from llama_hub.openalex_loader import OpenAlexReader openalex_reader = OpenAlexReader(email="sha...
llama_index/llama-index-integrations/readers/llama-index-readers-openalex/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-openalex/README.md", "repo_id": "llama_index", "token_count": 878 }
1,496
# Zapier Tool This tool connects to a Zapier account and allows access to the natural langauge actions API. You can learn more about and enable the NLA API here: https://nla.zapier.com/start/ ## Usage This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/lla...
llama_index/llama-index-integrations/tools/llama-index-tools-zapier/README.md/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-zapier/README.md", "repo_id": "llama_index", "token_count": 357 }
1,446
python_tests()
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-pgvecto-rs/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-pgvecto-rs/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,532
python_sources()
llama_index/llama-index-core/llama_index/core/indices/managed/BUILD/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/indices/managed/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,218
python_sources()
llama_index/llama-index-integrations/readers/llama-index-readers-discord/llama_index/readers/discord/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-discord/llama_index/readers/discord/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,351
from typing import Any, Optional from langchain_core.language_models import BaseLanguageModel from langchain_core.prompts import ChatPromptTemplate from langchain.chains.base import Chain from langchain.chains.llm import LLMChain from langchain.chains.openai_functions.utils import _convert_schema, get_llm_kwargs from...
langchain/libs/langchain/langchain/chains/openai_functions/tagging.py/0
{ "file_path": "langchain/libs/langchain/langchain/chains/openai_functions/tagging.py", "repo_id": "langchain", "token_count": 1007 }
462
"""Experimental implementation of jsonformer wrapped LLM.""" from __future__ import annotations import json from typing import TYPE_CHECKING, Any, List, Optional, cast from langchain.callbacks.manager import CallbackManagerForLLMRun from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline from l...
langchain/libs/experimental/langchain_experimental/llms/jsonformer_decoder.py/0
{ "file_path": "langchain/libs/experimental/langchain_experimental/llms/jsonformer_decoder.py", "repo_id": "langchain", "token_count": 846 }
432
python_tests()
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-elasticsearch/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-elasticsearch/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,462
import { BabyAGI } from "langchain/experimental/babyagi"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { OpenAIEmbeddings, OpenAI } from "@langchain/openai"; const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings()); const babyAGI = BabyAGI.fromLLM({ llm: new OpenAI({ temperatur...
langchainjs/examples/src/experimental/babyagi/weather.ts/0
{ "file_path": "langchainjs/examples/src/experimental/babyagi/weather.ts", "repo_id": "langchainjs", "token_count": 680 }
803
<!--- Copyright 2022 The Microsoft 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/LICENSE-2.0 Unless re...
transformers/examples/research_projects/tapex/README.md/0
{ "file_path": "transformers/examples/research_projects/tapex/README.md", "repo_id": "transformers", "token_count": 3719 }
546
from langchain_community.tools.file_management.list_dir import ( DirectoryListingInput, ListDirectoryTool, ) __all__ = ["DirectoryListingInput", "ListDirectoryTool"]
langchain/libs/langchain/langchain/tools/file_management/list_dir.py/0
{ "file_path": "langchain/libs/langchain/langchain/tools/file_management/list_dir.py", "repo_id": "langchain", "token_count": 54 }
558
"""LlamaPack class.""" from typing import Any, Dict from llama_index.core.llama_pack.base import BaseLlamaPack DEFAULT_TAXONOMY = """01: Violence and Hate. Should not - Help people plan or engage in violence. - Encourage people to engage in violence. - Express hateful, derogatory, or demeaning sentiments against peo...
llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/llama_index/packs/llama_guard_moderator/base.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/llama_index/packs/llama_guard_moderator/base.py", "repo_id": "llama_index", "token_count": 1973 }
1,852
# Zendesk Loader This loader fetches the text from Zendesk help articles using the Zendesk API. It also uses the BeautifulSoup library to parse the HTML and extract the text from the articles. ## Usage To use this loader, you need to pass in the subdomain of a Zendesk account. No authentication is required. You can ...
llama_index/llama-index-integrations/readers/llama-index-readers-zendesk/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-zendesk/README.md", "repo_id": "llama_index", "token_count": 273 }
1,463
ann_accuracy: collections: - source_file: /test/milvus/ann_hdf5/sift-128-euclidean.hdf5 collection_name: sift_128_euclidean index_file_sizes: [1024] index_types: ['flat', 'ivf_sq8'] index_params: nlist: [16384] top_ks: [10] nqs: [10000] search_params: ...
milvus/tests/benchmark/milvus_benchmark/suites/shards_ann_debug.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/shards_ann_debug.yaml", "repo_id": "milvus", "token_count": 353 }
1,875
# coding=utf-8 # Copyright 2023 The Bigcode team and HuggingFace Inc. team. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
transformers/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py/0
{ "file_path": "transformers/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py", "repo_id": "transformers", "token_count": 31067 }
671
--- sidebar_position: 1 --- # Contribute Code To contribute to this project, please follow the ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow. Please do not try to push directly to this repo unless you are a maintainer. Please follow the checked-in pull ...
langchain/docs/docs/contributing/code.mdx/0
{ "file_path": "langchain/docs/docs/contributing/code.mdx", "repo_id": "langchain", "token_count": 2398 }
88
{ "modelname": "PTNewENCDEC", "uppercase_modelname": "PT_NEW_ENC_DEC", "lowercase_modelname": "pt_new_enc_dec_template", "camelcase_modelname": "PtNewEncDec", "authors": "The HuggingFace Team", "checkpoint_identifier": "pt-new-enc-dec-base", "tokenizer_type": "Based on BART", "generate_tensorflow_pytorc...
transformers/templates/adding_a_new_model/tests/pt-seq-2-seq-bart-tokenizer.json/0
{ "file_path": "transformers/templates/adding_a_new_model/tests/pt-seq-2-seq-bart-tokenizer.json", "repo_id": "transformers", "token_count": 158 }
701
<jupyter_start><jupyter_text>Brave SearchThis notebook goes over how to use the Brave Search tool.Go to the [Brave Website](https://brave.com/search/api/) to sign up for a free account and get an API key.<jupyter_code>from langchain.tools import BraveSearch api_key = "API KEY" tool = BraveSearch.from_api_key(api_key=ap...
langchain/docs/docs/integrations/tools/brave_search.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/tools/brave_search.ipynb", "repo_id": "langchain", "token_count": 136 }
167
"""Tree Index inserter.""" from typing import Optional, Sequence from llama_index.core.data_structs.data_structs import IndexGraph from llama_index.core.indices.tree.utils import get_numbered_text_from_nodes from llama_index.core.indices.utils import ( extract_numbers_given_response, get_sorted_node_list, ) f...
llama_index/llama-index-core/llama_index/core/indices/tree/inserter.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/indices/tree/inserter.py", "repo_id": "llama_index", "token_count": 3669 }
1,182
/* * 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...
milvus/pkg/util/requestutil/getter_test.go/0
{ "file_path": "milvus/pkg/util/requestutil/getter_test.go", "repo_id": "milvus", "token_count": 4849 }
2,066
# (Gluon) ResNeXt A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformatio...
pytorch-image-models/docs/models/gloun-resnext.md/0
{ "file_path": "pytorch-image-models/docs/models/gloun-resnext.md", "repo_id": "pytorch-image-models", "token_count": 2706 }
368
#[cfg(feature = "mkl")] extern crate intel_mkl_src; #[cfg(feature = "accelerate")] extern crate accelerate_src; use candle_transformers::object_detection::{non_maximum_suppression, Bbox}; mod darknet; use anyhow::Result; use candle::{DType, Device, Tensor}; use candle_nn::{Module, VarBuilder}; use clap::Parser; use ...
candle/candle-examples/examples/yolo-v3/main.rs/0
{ "file_path": "candle/candle-examples/examples/yolo-v3/main.rs", "repo_id": "candle", "token_count": 3180 }
59
from typing import List, Tuple from langchain_community.chat_models import ChatOpenAI from langchain_core.messages import AIMessage, HumanMessage from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.pydantic_v1 import B...
langchain/templates/pii-protected-chatbot/pii_protected_chatbot/chain.py/0
{ "file_path": "langchain/templates/pii-protected-chatbot/pii_protected_chatbot/chain.py", "repo_id": "langchain", "token_count": 821 }
683