text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/auto/test_tokenization_auto.py/0 | {
"file_path": "transformers/tests/models/auto/test_tokenization_auto.py",
"repo_id": "transformers",
"token_count": 8482
} | 730 |
<jupyter_start><jupyter_text>Chat Engine - Condense Question Mode Condense question is a simple chat mode built on top of a query engine over your data. For each chat interaction:* first generate a standalone question from conversation context and last message, then * query the query engine with the condensed question ... | llama_index/docs/examples/chat_engine/chat_engine_condense_question.ipynb/0 | {
"file_path": "llama_index/docs/examples/chat_engine/chat_engine_condense_question.ipynb",
"repo_id": "llama_index",
"token_count": 1023
} | 1,071 |
<jupyter_start><jupyter_text>SearchApiThis notebook shows examples of how to use SearchApi to search the web. Go to [https://www.searchapi.io/](https://www.searchapi.io/) to sign up for a free account and get API key.<jupyter_code>import os
os.environ["SEARCHAPI_API_KEY"] = ""
from langchain_community.utilities import... | langchain/docs/docs/integrations/tools/searchapi.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/tools/searchapi.ipynb",
"repo_id": "langchain",
"token_count": 1510
} | 183 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/latent_diffusion/test_latent_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/latent_diffusion/test_latent_diffusion.py",
"repo_id": "diffusers",
"token_count": 3344
} | 253 |
<jupyter_start><jupyter_text>Together AI EmbeddingsThis notebook shows how to use `Together AI` for embeddings. Together AI provides access to many state-of-the-art embedding models.Visit https://together.ai and sign up to get an API key. Setup If you're opening this Notebook on colab, you will probably need to instal... | llama_index/docs/examples/embeddings/together.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/together.ipynb",
"repo_id": "llama_index",
"token_count": 341
} | 1,135 |
from typing import Optional, Union, TypeVar, List, Dict, Any, Tuple, cast
from numpy.typing import NDArray
import numpy as np
from typing_extensions import Literal, TypedDict, Protocol
import chromadb.errors as errors
from chromadb.types import (
Metadata,
UpdateMetadata,
Vector,
LiteralValue,
Logic... | chroma/chromadb/api/types.py/0 | {
"file_path": "chroma/chromadb/api/types.py",
"repo_id": "chroma",
"token_count": 7901
} | 13 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/chat_engine/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/chat_engine/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,549 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/others/test_utils.py/0 | {
"file_path": "diffusers/tests/others/test_utils.py",
"repo_id": "diffusers",
"token_count": 3326
} | 273 |
/* eslint-disable no-promise-executor-return */
import { test } from "@jest/globals";
import { Redis } from "ioredis";
import { RedisByteStore } from "../ioredis.js";
describe("RedisByteStore", () => {
const client = new Redis({});
afterEach(async () => await client.flushall());
afterAll(() => client.disconne... | langchainjs/libs/langchain-community/src/storage/tests/ioredis.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/storage/tests/ioredis.int.test.ts",
"repo_id": "langchainjs",
"token_count": 727
} | 1,009 |
# LanceDB
This page covers how to use [LanceDB](https://github.com/lancedb/lancedb) within LangChain.
It is broken into two parts: installation and setup, and then references to specific LanceDB wrappers.
## Installation and Setup
- Install the Python SDK with `pip install lancedb`
## Wrappers
### VectorStore
The... | langchain/docs/docs/integrations/providers/lancedb.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/lancedb.mdx",
"repo_id": "langchain",
"token_count": 179
} | 151 |
// 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/typeutil/conversion_test.go/0 | {
"file_path": "milvus/pkg/util/typeutil/conversion_test.go",
"repo_id": "milvus",
"token_count": 1068
} | 1,950 |
from typing import List
import numpy as np
import pandas as pd
from llama_index.legacy.vector_stores.lancedb import _to_llama_similarities
data_stub = {
"id": [1, 2, 3],
"doc_id": ["doc1", "doc2", "doc3"],
"vector": [np.array([0.1, 0.2]), np.array([0.3, 0.4]), np.array([0.5, 0.6])],
"text": ["text1", ... | llama_index/llama-index-legacy/tests/vector_stores/test_lancedb.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/vector_stores/test_lancedb.py",
"repo_id": "llama_index",
"token_count": 769
} | 1,653 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-kuzu/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-kuzu/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,331 |
import { WolframAlphaTool } from "@langchain/community/tools/wolframalpha";
const tool = new WolframAlphaTool({
appid: "YOUR_APP_ID",
});
const res = await tool.invoke("What is 2 * 2?");
console.log(res);
| langchainjs/examples/src/tools/wolframalpha.ts/0 | {
"file_path": "langchainjs/examples/src/tools/wolframalpha.ts",
"repo_id": "langchainjs",
"token_count": 72
} | 819 |
from llama_index.readers.athena.base import AthenaReader
__all__ = ["AthenaReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-athena/llama_index/readers/athena/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-athena/llama_index/readers/athena/__init__.py",
"repo_id": "llama_index",
"token_count": 30
} | 1,265 |
# flake8: noqa
"""Tools for making requests to an API endpoint."""
import json
from typing import Any, Dict, Optional, Union
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_community.utilities.r... | langchain/libs/community/langchain_community/tools/requests/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/requests/tool.py",
"repo_id": "langchain",
"token_count": 2555
} | 318 |
[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 = ["FastEmbedEmbedding"]
contains_example = false
import_path = "llama_index.embeddings.faste... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/pyproject.toml",
"repo_id": "llama_index",
"token_count": 651
} | 1,360 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/models/sam/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/sam/__init__.py",
"repo_id": "transformers",
"token_count": 1152
} | 664 |
# Additional Readings [[additional-readings]]
## An introduction to multi-agents
- [Multi-agent reinforcement learning: An overview](https://www.dcsc.tudelft.nl/~bdeschutter/pub/rep/10_003.pdf)
- [Multiagent Reinforcement Learning, Marc Lanctot](https://rlss.inria.fr/files/2019/07/RLSS_Multiagent.pdf)
- [Example of ... | deep-rl-class/units/en/unit7/additional-readings.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit7/additional-readings.mdx",
"repo_id": "deep-rl-class",
"token_count": 432
} | 173 |
[
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 50278,
"logprob": null,
"text": "<|USER|>"
},
{
"id": 1276,
"logprob": -4.5546875,
"text":... | text-generation-inference/integration-tests/models/__snapshots__/test_neox/test_neox_load.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_neox/test_neox_load.json",
"repo_id": "text-generation-inference",
"token_count": 6296
} | 425 |
<!---
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 ... | transformers/docs/source/ko/installation.md/0 | {
"file_path": "transformers/docs/source/ko/installation.md",
"repo_id": "transformers",
"token_count": 6886
} | 494 |
[
{
"evalQuestionsCount": 5,
"chunkSize": 2000,
"overlap": 0,
"splitMethod": "RecursiveTextSplitter",
"retriever": "SVM",
"embeddingAlgorithm": "OpenAI",
"model": "gpt-3.5-turbo",
"gradingPrompt": "Descriptive",
"numNeighbors": 3,
"avgRelevancyScore": 1,
"avgAnswerScore": 1... | auto-evaluator/nextjs/public/testData/experiments.json/0 | {
"file_path": "auto-evaluator/nextjs/public/testData/experiments.json",
"repo_id": "auto-evaluator",
"token_count": 592
} | 4 |
import pytest
from langchain_community.document_loaders import RSSFeedLoader
@pytest.mark.requires("feedparser", "newspaper")
def test_continue_on_failure_true() -> None:
"""Test exception is not raised when continue_on_failure=True."""
loader = RSSFeedLoader(["badurl.foobar"])
loader.load()
@pytest.ma... | langchain/libs/community/tests/unit_tests/document_loaders/test_rss.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_rss.py",
"repo_id": "langchain",
"token_count": 206
} | 380 |
# Load Test | milvus/tests/python_client/load/README.md/0 | {
"file_path": "milvus/tests/python_client/load/README.md",
"repo_id": "milvus",
"token_count": 3
} | 1,971 |
"""Integration test for Dataforseo API Wrapper."""
from langchain_community.utilities.dataforseo_api_search import DataForSeoAPIWrapper
def test_search_call() -> None:
search = DataForSeoAPIWrapper()
output = search.run("pi value")
assert "3.14159" in output
def test_news_call() -> None:
search = Da... | langchain/libs/community/tests/integration_tests/utilities/test_dataforseo_api.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_dataforseo_api.py",
"repo_id": "langchain",
"token_count": 647
} | 344 |
from langchain_community.vectorstores.redis.schema import (
FlatVectorField,
HNSWVectorField,
NumericFieldSchema,
RedisDistanceMetric,
RedisField,
RedisModel,
RedisVectorField,
TagFieldSchema,
TextFieldSchema,
read_schema,
)
__all__ = [
"RedisDistanceMetric",
"RedisField... | langchain/libs/langchain/langchain/vectorstores/redis/schema.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/redis/schema.py",
"repo_id": "langchain",
"token_count": 219
} | 617 |
from __future__ import annotations
from typing import TYPE_CHECKING, List
from langchain_core.pydantic_v1 import Field
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools import BaseTool
from langchain_community.tools.gmail.create_draft import GmailCreateDraft
from langchai... | langchain/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py",
"repo_id": "langchain",
"token_count": 681
} | 224 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package broker
import (
context "context"
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
datapb "github.com/milvus-io/milvus/internal/proto/datapb"
mock "github.com/stretchr/testify/mock"
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msg... | milvus/internal/datanode/broker/mock_broker.go/0 | {
"file_path": "milvus/internal/datanode/broker/mock_broker.go",
"repo_id": "milvus",
"token_count": 8591
} | 1,834 |
import json
import sys
import pytest
import time
from pymilvus import connections, db
from utils.util_log import test_log as logger
from api.milvus import VectorClient, CollectionClient
from utils.utils import get_data_by_payload
def get_config():
pass
class Base:
name = None
protocol = None
host = ... | milvus/tests/restful_client/base/testbase.py/0 | {
"file_path": "milvus/tests/restful_client/base/testbase.py",
"repo_id": "milvus",
"token_count": 1890
} | 1,977 |
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
--foreground-rgb: 0, 0, 0;
--background-start-... | langchainjs/environment_tests/test-exports-vercel/src/styles/globals.css/0 | {
"file_path": "langchainjs/environment_tests/test-exports-vercel/src/styles/globals.css",
"repo_id": "langchainjs",
"token_count": 1047
} | 753 |
CREATE TABLE embeddings (
id INTEGER PRIMARY KEY,
segment_id TEXT NOT NULL,
embedding_id TEXT NOT NULL,
seq_id BLOB NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE (segment_id, embedding_id)
);
CREATE TABLE embedding_metadata (
id INTEGER REFERENCES embeddings(id),... | chroma/chromadb/migrations/metadb/00001-embedding-metadata.sqlite.sql/0 | {
"file_path": "chroma/chromadb/migrations/metadb/00001-embedding-metadata.sqlite.sql",
"repo_id": "chroma",
"token_count": 241
} | 20 |
from llama_index.vector_stores.azurecosmosmongo.base import (
AzureCosmosDBMongoDBVectorSearch,
)
__all__ = ["AzureCosmosDBMongoDBVectorSearch"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/llama_index/vector_stores/azurecosmosmongo/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/llama_index/vector_stores/azurecosmosmongo/__init__.py",
"repo_id": "llama_index",
"token_count": 55
} | 1,510 |
from langchain_core.runnables.router import RouterInput, RouterRunnable
__all__ = ["RouterInput", "RouterRunnable"]
| langchain/libs/langchain/langchain/schema/runnable/router.py/0 | {
"file_path": "langchain/libs/langchain/langchain/schema/runnable/router.py",
"repo_id": "langchain",
"token_count": 39
} | 567 |
python_sources()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-nomic/llama_index/embeddings/nomic/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-nomic/llama_index/embeddings/nomic/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,369 |
"""Init file."""
| llama_index/llama-index-legacy/llama_index/legacy/readers/google_readers/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/google_readers/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,595 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "embeddings/cohere",
newEntrypointName: "",
newPackageName: "@langchain/cohere",
});
export * from "@langchain/community/embeddings/cohere";
| langchainjs/langchain/src/embeddings/cohere.ts/0 | {
"file_path": "langchainjs/langchain/src/embeddings/cohere.ts",
"repo_id": "langchainjs",
"token_count": 96
} | 979 |
python_tests()
| llama_index/llama-index-packs/llama-index-packs-chroma-autoretrieval/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-chroma-autoretrieval/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,646 |
from llama_index.core.extractors.metadata_extractors import (
BaseExtractor,
KeywordExtractor,
QuestionsAnsweredExtractor,
SummaryExtractor,
TitleExtractor,
)
def load_extractor(
data: dict,
) -> BaseExtractor:
if isinstance(data, BaseExtractor):
return data
extractor_name = d... | llama_index/llama-index-core/llama_index/core/extractors/loading.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/extractors/loading.py",
"repo_id": "llama_index",
"token_count": 356
} | 1,173 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/esm/test_modeling_esm.py/0 | {
"file_path": "transformers/tests/models/esm/test_modeling_esm.py",
"repo_id": "transformers",
"token_count": 5965
} | 800 |
<jupyter_start><jupyter_text>Google Gemini Embeddings If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-gemini
!pip install llama-index 'google-generativeai>=0.3.0' matplotlib
import os
GOOGLE_API_KEY = "" # add your GOOGLE API ... | llama_index/docs/examples/embeddings/gemini.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/gemini.ipynb",
"repo_id": "llama_index",
"token_count": 611
} | 1,078 |
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import * as fs from "fs";
import { formatDocumentsAsString } from "langchain/util/document";
import { PromptTem... | langchainjs/examples/src/chains/conversational_qa.ts/0 | {
"file_path": "langchainjs/examples/src/chains/conversational_qa.ts",
"repo_id": "langchainjs",
"token_count": 907
} | 763 |
import { Runnable, RunnableBatchOptions } from "./base.js";
import type { RunnableConfig } from "./config.js";
import { Document } from "../documents/index.js";
import { CallbackManagerForChainRun } from "../callbacks/manager.js";
import { ChatPromptValue, StringPromptValue } from "../prompt_values.js";
import {
LogS... | langchainjs/langchain-core/src/runnables/remote.ts/0 | {
"file_path": "langchainjs/langchain-core/src/runnables/remote.ts",
"repo_id": "langchainjs",
"token_count": 6100
} | 902 |
import time
from typing import List
from langchain_core.documents import Document
from langchain_community.vectorstores.alibabacloud_opensearch import (
AlibabaCloudOpenSearch,
AlibabaCloudOpenSearchSettings,
)
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
OS_TOKEN_COUNT = 1... | langchain/libs/community/tests/integration_tests/vectorstores/test_alibabacloud_opensearch.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_alibabacloud_opensearch.py",
"repo_id": "langchain",
"token_count": 4286
} | 373 |
# Website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having t... | langchainjs/docs/core_docs/README.md/0 | {
"file_path": "langchainjs/docs/core_docs/README.md",
"repo_id": "langchainjs",
"token_count": 282
} | 722 |
from typing import Generator
import pytest
from llama_index.legacy.storage.kvstore.dynamodb_kvstore import DynamoDBKVStore
from pytest import MonkeyPatch
try:
import boto3
from moto import mock_dynamodb
has_boto_libs = True
except ImportError:
has_boto_libs = False
@pytest.fixture()
def kvstore_fro... | llama_index/llama-index-legacy/tests/storage/kvstore/test_dynamodb_kvstore.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/storage/kvstore/test_dynamodb_kvstore.py",
"repo_id": "llama_index",
"token_count": 1768
} | 1,547 |
"""Unstructured file reader.
A parser for unstructured text files using Unstructured.io.
Supports .txt, .docx, .pptx, .jpg, .png, .eml, .html, and .pdf documents.
"""
from pathlib import Path
from typing import Any, Dict, List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.sche... | llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/unstructured/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/unstructured/base.py",
"repo_id": "llama_index",
"token_count": 1706
} | 1,441 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package dependency
import (
context "context"
msgstream "github.com/milvus-io/milvus/pkg/mq/msgstream"
mock "github.com/stretchr/testify/mock"
paramtable "github.com/milvus-io/milvus/pkg/util/paramtable"
storage "github.com/milvus-io/milvus/internal/storage"
... | milvus/internal/util/dependency/mock_factory.go/0 | {
"file_path": "milvus/internal/util/dependency/mock_factory.go",
"repo_id": "milvus",
"token_count": 3239
} | 1,876 |
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { ChatOpenAI } from "@langchain/openai";
import { createOpenAIFnRunnable } from "langchain/chains/openai_functions";
import { JsonOutputFunctionsParser } from "langchain/output_parsers";
const personDetailsFunction = {
name: "get_person_details",
... | langchainjs/examples/src/chains/openai_multi_functions_runnable.ts/0 | {
"file_path": "langchainjs/examples/src/chains/openai_multi_functions_runnable.ts",
"repo_id": "langchainjs",
"token_count": 730
} | 778 |
from typing import Any, Dict, List, Optional
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
class CohereEmbeddings(BaseModel, Embeddings):
"""Cohere embedding models.
To use, you s... | langchain/libs/community/langchain_community/embeddings/cohere.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/cohere.py",
"repo_id": "langchain",
"token_count": 2112
} | 266 |
try:
import concurrent.futures
import os
import re
import imdb
import pandas as pd
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from ... | llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/scraper.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/scraper.py",
"repo_id": "llama_index",
"token_count": 3919
} | 1,316 |
[tool.poetry]
name = "opengpts"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "app"}]
[tool.poetry.dependencies]
python = "^3.9.0"
sse-starlette = "^1.6.5"
tomli-w = "^1.0.0"
uvicorn = "^0.23.2"
fastapi = "^0.103.2"
langserve = "0.0.32"
# Uncom... | opengpts/backend/pyproject.toml/0 | {
"file_path": "opengpts/backend/pyproject.toml",
"repo_id": "opengpts",
"token_count": 1024
} | 2,200 |
from langchain_community.utilities.github import GitHubAPIWrapper
__all__ = ["GitHubAPIWrapper"]
| langchain/libs/langchain/langchain/utilities/github.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/github.py",
"repo_id": "langchain",
"token_count": 30
} | 594 |
// 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/util/mock/grpc_rootcoord_client.go/0 | {
"file_path": "milvus/internal/util/mock/grpc_rootcoord_client.go",
"repo_id": "milvus",
"token_count": 4694
} | 2,024 |
# Makefile
build_graphdb:
docker build --tag graphdb ./graphdb
start_graphdb:
docker-compose up -d graphdb
down:
docker-compose down -v --remove-orphans
.PHONY: build_graphdb start_graphdb down
| langchain/docker/makefile/0 | {
"file_path": "langchain/docker/makefile",
"repo_id": "langchain",
"token_count": 73
} | 78 |
import { Neo4jGraph } from "@langchain/community/graphs/neo4j_graph";
import { OpenAI } from "@langchain/openai";
import { GraphCypherQAChain } from "langchain/chains/graph_qa/cypher";
/**
* This example uses Neo4j database, which is native graph database.
* To set it up follow the instructions on https://neo4j.com/... | langchainjs/examples/src/chains/graph_db_return_direct.ts/0 | {
"file_path": "langchainjs/examples/src/chains/graph_db_return_direct.ts",
"repo_id": "langchainjs",
"token_count": 339
} | 846 |
from langchain_community.embeddings.clarifai import ClarifaiEmbeddings
__all__ = ["ClarifaiEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/clarifai.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/clarifai.py",
"repo_id": "langchain",
"token_count": 36
} | 496 |
# Share a dataset to the Hub
The [Hub](https://huggingface.co/datasets) is home to an extensive collection of community-curated and popular research datasets. We encourage you to share your dataset to the Hub to help grow the ML community and accelerate progress for everyone. All contributions are welcome; adding a da... | datasets/docs/source/upload_dataset.mdx/0 | {
"file_path": "datasets/docs/source/upload_dataset.mdx",
"repo_id": "datasets",
"token_count": 2010
} | 115 |
from langchain_community.tools.ainetwork.transfer import AINTransfer, TransferSchema
__all__ = ["TransferSchema", "AINTransfer"]
| langchain/libs/langchain/langchain/tools/ainetwork/transfer.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/ainetwork/transfer.py",
"repo_id": "langchain",
"token_count": 37
} | 546 |
# Search index
[FAISS](https://github.com/facebookresearch/faiss) and [Elasticsearch](https://www.elastic.co/elasticsearch/) enables searching for examples in a dataset. This can be useful when you want to retrieve specific examples from a dataset that are relevant to your NLP task. For example, if you are working on ... | datasets/docs/source/faiss_es.mdx/0 | {
"file_path": "datasets/docs/source/faiss_es.mdx",
"repo_id": "datasets",
"token_count": 1830
} | 110 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/evaluation/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/evaluation/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,554 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-youtube-transcript/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-youtube-transcript/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,401 |
import logging
import threading
from typing import Any, Dict, List, Mapping, Optional
import requests
from langchain_core._api.deprecation import deprecated
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.chat_models import BaseChatModel
from langchain_core.messages im... | langchain/libs/community/langchain_community/chat_models/ernie.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_models/ernie.py",
"repo_id": "langchain",
"token_count": 3601
} | 235 |
import logging
import time
from typing import Any, Dict, List, Mapping, Optional
import requests
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import Extra, Field, SecretStr, root_validator
from langchain_core.utils imp... | langchain/libs/community/langchain_community/llms/stochasticai.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/stochasticai.py",
"repo_id": "langchain",
"token_count": 2123
} | 286 |
import inspect
from dataclasses import dataclass
from typing import Callable, List, Optional, Union
import numpy as np
import PIL.Image
import torch
from transformers import (
CLIPImageProcessor,
CLIPTextModel,
CLIPTokenizer,
CLIPVisionModelWithProjection,
GPT2Tokenizer,
)
from ...image_processor ... | diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py",
"repo_id": "diffusers",
"token_count": 31013
} | 268 |
from langchain_community.tools.sql_database.prompt import QUERY_CHECKER
__all__ = ["QUERY_CHECKER"]
| langchain/libs/langchain/langchain/tools/sql_database/prompt.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/sql_database/prompt.py",
"repo_id": "langchain",
"token_count": 34
} | 558 |
// 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/eventlog/handler.go/0 | {
"file_path": "milvus/pkg/eventlog/handler.go",
"repo_id": "milvus",
"token_count": 635
} | 1,892 |
export * from "@langchain/core/utils/testing";
| langchainjs/langchain/src/schema/tests/lib.ts/0 | {
"file_path": "langchainjs/langchain/src/schema/tests/lib.ts",
"repo_id": "langchainjs",
"token_count": 14
} | 949 |
"""Node parser interface."""
import asyncio
from abc import abstractmethod
from copy import deepcopy
from typing import Any, Dict, List, Optional, Sequence, cast
from llama_index.core.bridge.pydantic import Field
from llama_index.core.schema import (
BaseNode,
MetadataMode,
TextNode,
TransformComponent... | llama_index/llama-index-core/llama_index/core/extractors/interface.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/extractors/interface.py",
"repo_id": "llama_index",
"token_count": 2324
} | 1,148 |
import { ToolInterface } from "@langchain/core/tools";
/**
* Abstract base class for toolkits in LangChain. Toolkits are collections
* of tools that agents can use. Subclasses must implement the `tools`
* property to provide the specific tools for the toolkit.
*/
export abstract class Toolkit {
abstract tools: T... | langchainjs/libs/langchain-community/src/agents/toolkits/base.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/agents/toolkits/base.ts",
"repo_id": "langchainjs",
"token_count": 107
} | 959 |
import logging
from typing import Any, Dict, List, Mapping, Optional, cast
import requests
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import Extra, Field, SecretStr, root_validator
from langchain_core.utils import co... | langchain/libs/community/langchain_community/llms/cerebriumai.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/cerebriumai.py",
"repo_id": "langchain",
"token_count": 1693
} | 265 |
python_tests()
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,351 |
# 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/vision_text_dual_encoder/test_modeling_flax_vision_text_dual_encoder.py/0 | {
"file_path": "transformers/tests/models/vision_text_dual_encoder/test_modeling_flax_vision_text_dual_encoder.py",
"repo_id": "transformers",
"token_count": 6782
} | 820 |
"""Init file."""
from llama_index.readers.dad_jokes.base import DadJokesReader
__all__ = ["DadJokesReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-dad-jokes/llama_index/readers/dad_jokes/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-dad-jokes/llama_index/readers/dad_jokes/__init__.py",
"repo_id": "llama_index",
"token_count": 39
} | 1,420 |
from typing import Any, Dict, List
import pandas as pd
from langchain_community.graphs.graph_document import GraphDocument
from langchain_community.graphs.graph_store import GraphStore
from langchain_core.prompts import PromptTemplate
from langchain.chains.graph_qa.cypher import (
GraphCypherQAChain,
construc... | langchain/libs/langchain/tests/unit_tests/chains/test_graph_qa.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/chains/test_graph_qa.py",
"repo_id": "langchain",
"token_count": 4916
} | 603 |
[tool.poetry]
name = "neo4j-generation"
version = "0.0.1"
description = "Knowledge graph extraction with Neo4j AuraDB"
authors = [
"Tomaz Bratanic <tomaz.bratanic@neo4j.com>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
neo4j = "^5.12.0"
[tool.poetry.... | langchain/templates/neo4j-generation/pyproject.toml/0 | {
"file_path": "langchain/templates/neo4j-generation/pyproject.toml",
"repo_id": "langchain",
"token_count": 299
} | 657 |
from pymilvus import connections
from utils import *
def task_1(data_size, host):
"""
task_1:
before reinstall: create collection, insert data, create index and insert data, load and search
after reinstall: get collection, load, search, release, insert data, create index, load, and search
... | milvus/tests/python_client/deploy/scripts/action_before_reinstall.py/0 | {
"file_path": "milvus/tests/python_client/deploy/scripts/action_before_reinstall.py",
"repo_id": "milvus",
"token_count": 630
} | 2,122 |
# coding=utf-8
# Copyright 2022 {{cookiecutter.authors}} 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/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py/0 | {
"file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py",
"repo_id": "transformers",
"token_count": 65421
} | 694 |
<jupyter_start><jupyter_text>Qdrant FastEmbed EmbeddingsLlamaIndex supports [FastEmbed](https://qdrant.github.io/fastembed/) for embeddings generation. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-fastembed
%pip install llama... | llama_index/docs/examples/embeddings/fastembed.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/fastembed.ipynb",
"repo_id": "llama_index",
"token_count": 375
} | 1,100 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,413 |
import { StructuredToolInterface } from "@langchain/core/tools";
import { ChatOpenAI } from "@langchain/openai";
import { ConversationSummaryBufferMemory } from "../../../memory/summary_buffer.js";
import { initializeAgentExecutorWithOptions } from "../../initialize.js";
import { OpenAIAgentTokenBufferMemory } from "./... | langchainjs/langchain/src/agents/toolkits/conversational_retrieval/openai_functions.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/toolkits/conversational_retrieval/openai_functions.ts",
"repo_id": "langchainjs",
"token_count": 698
} | 844 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-cogniswitch/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-cogniswitch/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,479 |
# Timesync -- All The things you should know
`Time Synchronization` is the kernel part of Milvus 2.0; it affects all components of the system. This document describes the detailed design of `Time Synchronization`.
There are 2 kinds of events in Milvus 2.0:
- DDL events
- create collection
- drop collection
- c... | milvus/docs/design_docs/20211215-milvus_timesync.md/0 | {
"file_path": "milvus/docs/design_docs/20211215-milvus_timesync.md",
"repo_id": "milvus",
"token_count": 1981
} | 1,713 |
"""Base classes for chain routing."""
from __future__ import annotations
from abc import ABC
from typing import Any, Dict, List, Mapping, NamedTuple, Optional
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
Callbacks,
)
from langchain_core.pydantic_v1 im... | langchain/libs/langchain/langchain/chains/router/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/router/base.py",
"repo_id": "langchain",
"token_count": 1869
} | 466 |
# LlamaIndex Vector_Stores Integration: Zep
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,548 |
<jupyter_start><jupyter_code>import os
import torch
from transformers import (
AutoTokenizer,
default_data_collator,
AutoModelForSeq2SeqLM,
Seq2SeqTrainingArguments,
Seq2SeqTrainer,
GenerationConfig,
)
from peft import get_peft_model, PromptTuningInit, PromptTuningConfig, TaskType
from datasets... | peft/examples/conditional_generation/peft_prompt_tuning_seq2seq_with_generate.ipynb/0 | {
"file_path": "peft/examples/conditional_generation/peft_prompt_tuning_seq2seq_with_generate.ipynb",
"repo_id": "peft",
"token_count": 2021
} | 327 |
from unittest.mock import MagicMock, patch
import pytest
from llama_index.legacy.core.response.schema import Response
from llama_index.legacy.schema import Document
try:
import google.ai.generativelanguage as genai
has_google = True
except ImportError:
has_google = False
from llama_index.legacy.indices.... | llama_index/llama-index-legacy/tests/indices/managed/test_google.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/indices/managed/test_google.py",
"repo_id": "llama_index",
"token_count": 3402
} | 1,799 |
<jupyter_start><jupyter_text>ChatGPT If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-llms-openai
!pip install llama-index
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(... | llama_index/docs/examples/customization/llms/SimpleIndexDemo-ChatGPT.ipynb/0 | {
"file_path": "llama_index/docs/examples/customization/llms/SimpleIndexDemo-ChatGPT.ipynb",
"repo_id": "llama_index",
"token_count": 947
} | 1,072 |
[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 = ["DeepMemoryRetrieverPack"]
contains_example = false
import_path = "llama_index.packs.deepl... | llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/pyproject.toml",
"repo_id": "llama_index",
"token_count": 714
} | 1,839 |
<jupyter_start><jupyter_text>Simple Vector Store If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>!pip install llama-index
import os
import openai
os.environ["OPENAI_API_KEY"] = "sk-..."
openai.api_key = os.environ["OPENAI_API_KEY"]<jupyter_output><empty_output><j... | llama_index/docs/examples/vector_stores/SimpleIndexDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/SimpleIndexDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1959
} | 1,134 |
# Facebook Chat
>[Messenger](https://en.wikipedia.org/wiki/Messenger_(software)) is an American proprietary instant messaging app and
> platform developed by `Meta Platforms`. Originally developed as `Facebook Chat` in 2008, the company revamped its
> messaging service in 2010.
## Installation and Setup
First, you ... | langchain/docs/docs/integrations/providers/facebook_chat.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/facebook_chat.mdx",
"repo_id": "langchain",
"token_count": 153
} | 147 |
# 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/maskformer/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/maskformer/__init__.py",
"repo_id": "transformers",
"token_count": 1073
} | 662 |
/* eslint-disable spaced-comment */
import {
ChatPromptTemplate,
SystemMessagePromptTemplate,
HumanMessagePromptTemplate,
PromptTemplate,
} from "@langchain/core/prompts";
import {
ConditionalPromptSelector,
isChatModel,
} from "@langchain/core/example_selectors";
export const DEFAULT_QA_PROMPT = /*#__PURE... | langchainjs/langchain/src/chains/question_answering/stuff_prompts.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/question_answering/stuff_prompts.ts",
"repo_id": "langchainjs",
"token_count": 386
} | 893 |
"""Methods for creating chains that use OpenAI function-calling APIs."""
from typing import (
Any,
Callable,
Dict,
Optional,
Sequence,
Type,
Union,
)
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers im... | langchain/libs/langchain/langchain/chains/openai_functions/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/openai_functions/base.py",
"repo_id": "langchain",
"token_count": 4045
} | 488 |
from typing import Dict, Optional, Type
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_community.tools.gmail.base import GmailBaseTool
class GetThreadSchema(BaseModel):
"""Input for GetMessageTool."""
# From https://supp... | langchain/libs/community/langchain_community/tools/gmail/get_thread.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/gmail/get_thread.py",
"repo_id": "langchain",
"token_count": 628
} | 299 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/fsmt.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/fsmt.md",
"repo_id": "transformers",
"token_count": 739
} | 505 |
# 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/hubert/configuration_hubert.py/0 | {
"file_path": "transformers/src/transformers/models/hubert/configuration_hubert.py",
"repo_id": "transformers",
"token_count": 5769
} | 650 |
# coding=utf-8
# 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 requir... | transformers/tests/models/xmod/test_modeling_xmod.py/0 | {
"file_path": "transformers/tests/models/xmod/test_modeling_xmod.py",
"repo_id": "transformers",
"token_count": 13211
} | 827 |
<jupyter_start><jupyter_text>CogniswitchQueryEngine**Use CogniSwitch to build production ready applications that can consume, organize and retrieve knowledge flawlessly. Using the framework of your choice, in this case LlamaIndex, CogniSwitch helps alleviate the stress of decision making when it comes to choosing the r... | llama_index/docs/examples/query_engine/cogniswitch_query_engine.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/cogniswitch_query_engine.ipynb",
"repo_id": "llama_index",
"token_count": 664
} | 1,076 |
"""Base classes for comparing the output of two models."""
from __future__ import annotations
import logging
import re
from typing import Any, Dict, List, Optional, Union
from langchain_community.chat_models.azure_openai import AzureChatOpenAI
from langchain_community.chat_models.openai import ChatOpenAI
from langcha... | langchain/libs/langchain/langchain/evaluation/comparison/eval_chain.py/0 | {
"file_path": "langchain/libs/langchain/langchain/evaluation/comparison/eval_chain.py",
"repo_id": "langchain",
"token_count": 6769
} | 502 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-myscale/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-myscale/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.