text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/proxy/rate_limit_interceptor_test.go/0 | {
"file_path": "milvus/internal/proxy/rate_limit_interceptor_test.go",
"repo_id": "milvus",
"token_count": 3462
} | 2,020 |
<jupyter_start><jupyter_text>Discord Thread ManagementThis notebook walks through the process of managing documents that come from ever-updating data sources.In this example, we have a directory where the issues-and-help channel on the LlamaIndex discord is dumped periodically. We want to ensure our index always has th... | llama_index/docs/examples/discover_llamaindex/document_management/Discord_Thread_Management.ipynb/0 | {
"file_path": "llama_index/docs/examples/discover_llamaindex/document_management/Discord_Thread_Management.ipynb",
"repo_id": "llama_index",
"token_count": 2849
} | 1,131 |
// Ideally shouldn't be needed, see https://github.com/huggingface/chat-ui/pull/88#issuecomment-1523173850
import type { Conversation } from "./Conversation";
import type { Timestamps } from "./Timestamps";
export interface AbortedGeneration extends Timestamps {
conversationId: Conversation["_id"];
}
| chat-ui/src/lib/types/AbortedGeneration.ts/0 | {
"file_path": "chat-ui/src/lib/types/AbortedGeneration.ts",
"repo_id": "chat-ui",
"token_count": 93
} | 109 |
from langchain_community.retrievers.bm25 import (
BM25Retriever,
default_preprocessing_func,
)
__all__ = ["default_preprocessing_func", "BM25Retriever"]
| langchain/libs/langchain/langchain/retrievers/bm25.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/bm25.py",
"repo_id": "langchain",
"token_count": 59
} | 537 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-kibela/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-kibela/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,326 |
# **_Osmmap Loader_**
The Osmmap Loader will fetch map data from the [Overpass](https://wiki.openstreetmap.org/wiki/Main_Page) api for a certain place or area. Version **Overpass API 0.7.60** is used by this loader.
The api will provide you with all the **nodes, relations, and ways** for the particular region when yo... | llama_index/llama-index-integrations/readers/llama-index-readers-maps/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-maps/README.md",
"repo_id": "llama_index",
"token_count": 814
} | 1,477 |
<!--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/using-diffusers/inpaint.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/inpaint.md",
"repo_id": "diffusers",
"token_count": 1656
} | 193 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-dashscope/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-dashscope/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,287 |
# 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/mega/test_modeling_mega.py/0 | {
"file_path": "transformers/tests/models/mega/test_modeling_mega.py",
"repo_id": "transformers",
"token_count": 13179
} | 811 |
<!--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/m2m_100.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/m2m_100.md",
"repo_id": "transformers",
"token_count": 1685
} | 458 |
<jupyter_start><jupyter_text>Airbyte CDK >[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.A lot of source connectors are implemented using th... | langchain/docs/docs/integrations/document_loaders/airbyte_cdk.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/airbyte_cdk.ipynb",
"repo_id": "langchain",
"token_count": 1273
} | 95 |
from typing import TYPE_CHECKING, Any, Optional
from llama_index.legacy.core.base_query_engine import BaseQueryEngine
if TYPE_CHECKING:
from llama_index.legacy.langchain_helpers.agents.tools import (
LlamaIndexTool,
)
from llama_index.legacy.tools.types import AsyncBaseTool, ToolMetadata, ToolOutput
... | llama_index/llama-index-legacy/llama_index/legacy/tools/query_engine.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/tools/query_engine.py",
"repo_id": "llama_index",
"token_count": 1613
} | 1,648 |
# LlamaIndex Integrations
Building LLM applications with LlamaIndex involves building with LlamaIndex
[core](https://github.com/run-llama/llama_index/tree/main/llama-index-core) as well as with the LlamaIndex Integrations required for your application.Integrations are categorized by type and each are their own Python ... | llama_index/llama-index-integrations/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/README.md",
"repo_id": "llama_index",
"token_count": 83
} | 1,257 |
---
sidebar_position: 1
---
# Quickstart
In this guide, we will go over the basic ways to create Chains and Agents that call Tools. Tools can be just about anything โ APIs, functions, databases, etc. Tools allow us to extend the capabilities of a model beyond just outputting text/messages. The key to using models wit... | langchainjs/docs/core_docs/docs/use_cases/tool_use/quickstart.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/tool_use/quickstart.mdx",
"repo_id": "langchainjs",
"token_count": 3247
} | 778 |
try:
from llama_index.readers.imdb_review.scraper import main_scraper
except ImportError:
from scraper import main_scraper
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class IMDBReviews(BaseReader):
def __init__(
self,
... | llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/base.py",
"repo_id": "llama_index",
"token_count": 1383
} | 1,337 |
import json
import os
import tempfile
import datasets
from utils import generate_example_dataset, get_duration
SPEED_TEST_N_EXAMPLES = 500_000
RESULTS_BASEPATH, RESULTS_FILENAME = os.path.split(__file__)
RESULTS_FILE_PATH = os.path.join(RESULTS_BASEPATH, "results", RESULTS_FILENAME.replace(".py", ".json"))
@get_d... | datasets/benchmarks/benchmark_indices_mapping.py/0 | {
"file_path": "datasets/benchmarks/benchmark_indices_mapping.py",
"repo_id": "datasets",
"token_count": 677
} | 107 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/models/tvlt/test_processor_tvlt.py/0 | {
"file_path": "transformers/tests/models/tvlt/test_processor_tvlt.py",
"repo_id": "transformers",
"token_count": 1552
} | 754 |
---
hide_table_of_contents: true
---
# SQL Agent Toolkit
This example shows how to load and use an agent with a SQL toolkit.
## Setup
You'll need to first install `typeorm`:
```bash npm2yarn
npm install typeorm
```
## Usage
import CodeBlock from "@theme/CodeBlock";
import Example from "@examples/agents/sql.ts";
... | langchainjs/docs/core_docs/docs/integrations/toolkits/sql.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/toolkits/sql.mdx",
"repo_id": "langchainjs",
"token_count": 186
} | 716 |
search_performance:
collections:
-
milvus:
db_config.primary_path: /test/milvus/db_data_011/binary_50m_512_jaccard
cache_config.cpu_cache_capacity: 32GB
engine_config.use_blas_threshold: 0
engine_config.gpu_search_threshold: 100
gpu_resource_config.enable: true
... | milvus/tests/benchmark/milvus_benchmark/suites/011_cpu_search_binary.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/011_cpu_search_binary.yaml",
"repo_id": "milvus",
"token_count": 770
} | 1,934 |
import "./App.css";
import { useEffect, useRef, useState } from "react";
import ShareIcon from "./assets/ShareIcon.svg?react";
import { useConfigSchema, useFeedback, useInputSchema } from "./useSchemas";
import { useStreamLog } from "./useStreamLog";
import { AppCallbackContext, useAppStreamCallbacks } from "./useSt... | langserve/langserve/playground/src/App.tsx/0 | {
"file_path": "langserve/langserve/playground/src/App.tsx",
"repo_id": "langserve",
"token_count": 3160
} | 1,085 |
"""Shims for asyncio features that may be missing from older python versions"""
import sys
if sys.version_info[:2] < (3, 11):
from async_timeout import timeout as asyncio_timeout
else:
from asyncio import timeout as asyncio_timeout
__all__ = ["asyncio_timeout"]
| langchain/libs/langchain/langchain/utilities/asyncio.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/asyncio.py",
"repo_id": "langchain",
"token_count": 84
} | 602 |
from llama_index.readers.google.calendar.base import GoogleCalendarReader
from llama_index.readers.google.docs.base import GoogleDocsReader
from llama_index.readers.google.drive.base import GoogleDriveReader
from llama_index.readers.google.gmail.base import GmailReader
from llama_index.readers.google.keep.base import G... | llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/__init__.py",
"repo_id": "llama_index",
"token_count": 183
} | 1,325 |
// 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/querycoordv2/session/cluster_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/session/cluster_test.go",
"repo_id": "milvus",
"token_count": 4713
} | 2,036 |
// Shouldn't be needed if we dove into sveltekit internals, see https://github.com/huggingface/chat-ui/pull/88#issuecomment-1523173850
import { setTimeout } from "node:timers/promises";
import { collections } from "./database";
let closed = false;
process.on("SIGINT", () => {
closed = true;
});
export let abortedGe... | chat-ui/src/lib/server/abortedGenerations.ts/0 | {
"file_path": "chat-ui/src/lib/server/abortedGenerations.ts",
"repo_id": "chat-ui",
"token_count": 267
} | 100 |
import os
from dataclasses import replace
import jax
import wandb
from bigbird_flax import Args, DataCollator, FlaxBigBirdForNaturalQuestions, Trainer, build_tx, train_step, val_step
from datasets import load_dataset
from flax import jax_utils
from transformers import BigBirdTokenizerFast
if __name__ == "__main__":... | transformers/examples/research_projects/jax-projects/big_bird/train.py/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/big_bird/train.py",
"repo_id": "transformers",
"token_count": 1164
} | 588 |
"""Init file."""
| llama_index/llama-index-legacy/llama_index/legacy/readers/github_readers/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/github_readers/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,762 |
<jupyter_start><jupyter_text>Vectara self-querying >[Vectara](https://vectara.com/) is the trusted GenAI platform that provides an easy-to-use API for document indexing and querying. Vectara provides an end-to-end managed service for Retrieval Augmented Generation or [RAG](https://vectara.com/grounded-generation/), whi... | langchain/docs/docs/integrations/retrievers/self_query/vectara_self_query.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/self_query/vectara_self_query.ipynb",
"repo_id": "langchain",
"token_count": 2670
} | 160 |
from plate_chain.chain import chain
__all__ = ["chain"]
| langchain/templates/plate-chain/plate_chain/__init__.py/0 | {
"file_path": "langchain/templates/plate-chain/plate_chain/__init__.py",
"repo_id": "langchain",
"token_count": 18
} | 722 |
[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 = ["IntelEmbedding"]
contains_example = false
import_path = "llama_index.embeddings.huggingfa... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/pyproject.toml",
"repo_id": "llama_index",
"token_count": 738
} | 1,276 |
# coding=utf-8
# Copyright 2023 HUST-VL 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/vitmatte/modeling_vitmatte.py/0 | {
"file_path": "transformers/src/transformers/models/vitmatte/modeling_vitmatte.py",
"repo_id": "transformers",
"token_count": 5253
} | 695 |
# Copyright 2023-present 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 law or... | peft/src/peft/tuners/poly/model.py/0 | {
"file_path": "peft/src/peft/tuners/poly/model.py",
"repo_id": "peft",
"token_count": 2924
} | 321 |
from llama_index.callbacks.arize_phoenix.base import arize_phoenix_callback_handler
__all__ = ["arize_phoenix_callback_handler"]
| llama_index/llama-index-integrations/callbacks/llama-index-callbacks-arize-phoenix/llama_index/callbacks/arize_phoenix/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-arize-phoenix/llama_index/callbacks/arize_phoenix/__init__.py",
"repo_id": "llama_index",
"token_count": 45
} | 1,227 |
# TODO: Deprecated import support for old text splitters
from llama_index.legacy.node_parser.text.code import CodeSplitter
from llama_index.legacy.node_parser.text.sentence import (
SentenceSplitter,
)
from llama_index.legacy.node_parser.text.token import TokenTextSplitter
__all__ = [
"SentenceSplitter",
"... | llama_index/llama-index-legacy/llama_index/legacy/text_splitter/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/text_splitter/__init__.py",
"repo_id": "llama_index",
"token_count": 126
} | 1,778 |
<jupyter_start><jupyter_text>Image captionsBy default, the loader utilizes the pre-trained [Salesforce BLIP image captioning model](https://huggingface.co/Salesforce/blip-image-captioning-base).This notebook shows how to use the `ImageCaptionLoader` to generate a query-able index of image captions<jupyter_code>%pip ins... | langchain/docs/docs/integrations/document_loaders/image_captions.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/image_captions.ipynb",
"repo_id": "langchain",
"token_count": 1086
} | 114 |
# 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/src/transformers/models/speech_to_text/tokenization_speech_to_text.py/0 | {
"file_path": "transformers/src/transformers/models/speech_to_text/tokenization_speech_to_text.py",
"repo_id": "transformers",
"token_count": 5268
} | 695 |
---
sidebar_class_name: hidden
---
# Summarization
A summarization chain can be used to summarize multiple documents. One way is to input multiple smaller documents, after they have been divided into chunks, and operate over them with a MapReduceDocumentsChain. You can also choose instead for the chain that does summ... | langchainjs/docs/core_docs/docs/modules/chains/popular/summarize.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/chains/popular/summarize.mdx",
"repo_id": "langchainjs",
"token_count": 407
} | 739 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/rootcoord/util.go/0 | {
"file_path": "milvus/internal/rootcoord/util.go",
"repo_id": "milvus",
"token_count": 2141
} | 1,867 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/accelerate.md/0 | {
"file_path": "transformers/docs/source/en/accelerate.md",
"repo_id": "transformers",
"token_count": 1516
} | 477 |
import http.client
import json
from typing import Optional
def list_packages(*, contains: Optional[str] = None):
conn = http.client.HTTPSConnection("api.github.com")
headers = {
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
"User-Agent": "langchain-cli... | langchain/libs/cli/langchain_cli/utils/github.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/utils/github.py",
"repo_id": "langchain",
"token_count": 315
} | 218 |
"""Index registry."""
from typing import Dict, Type
from llama_index.core.data_structs.data_structs import (
KG,
EmptyIndexStruct,
IndexDict,
IndexGraph,
IndexList,
IndexStruct,
KeywordTable,
MultiModelIndexDict,
)
from llama_index.core.data_structs.document_summary import IndexDocumen... | llama_index/llama-index-core/llama_index/core/data_structs/registry.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/data_structs/registry.py",
"repo_id": "llama_index",
"token_count": 372
} | 1,169 |
""" Normalization Free Nets. NFNet, NF-RegNet, NF-ResNet (pre-activation) Models
Paper: `Characterizing signal propagation to close the performance gap in unnormalized ResNets`
- https://arxiv.org/abs/2101.08692
Paper: `High-Performance Large-Scale Image Recognition Without Normalization`
- https://arxiv.org/... | pytorch-image-models/timm/models/nfnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/nfnet.py",
"repo_id": "pytorch-image-models",
"token_count": 19131
} | 345 |
"""Models for the Logical Fallacy Chain"""
from langchain_experimental.pydantic_v1 import BaseModel
class LogicalFallacy(BaseModel):
"""Class for a logical fallacy."""
fallacy_critique_request: str
fallacy_revision_request: str
name: str = "Logical Fallacy"
| langchain/libs/experimental/langchain_experimental/fallacy_removal/models.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/fallacy_removal/models.py",
"repo_id": "langchain",
"token_count": 90
} | 430 |
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.chatgpt_plugin import ChatGPTRetrievalPluginClient
def test_class():
names_of_base_classes = [b.__name__ for b in ChatGPTRetrievalPluginClient.__mro__]
assert VectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chatgpt-plugin/tests/test_vector_stores_chatgpt_plugin.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chatgpt-plugin/tests/test_vector_stores_chatgpt_plugin.py",
"repo_id": "llama_index",
"token_count": 103
} | 1,651 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/rootcoord/step.go/0 | {
"file_path": "milvus/internal/rootcoord/step.go",
"repo_id": "milvus",
"token_count": 4996
} | 1,923 |
import argparse
import time
from pathlib import Path
from typing import Any, Dict, Literal
import torch
from diffusers import AsymmetricAutoencoderKL
ASYMMETRIC_AUTOENCODER_KL_x_1_5_CONFIG = {
"in_channels": 3,
"out_channels": 3,
"down_block_types": [
"DownEncoderBlock2D",
"DownEncoderBl... | diffusers/scripts/convert_asymmetric_vqgan_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_asymmetric_vqgan_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 3351
} | 232 |
# Commands to trigger jobs
## Guide
1. The job will be triggered when your comments on pull request matched command.
## Commands
| Command | Description |
| -------------------------|-----------------------------------------------------... | milvus/COMMAND_HELP.md/0 | {
"file_path": "milvus/COMMAND_HELP.md",
"repo_id": "milvus",
"token_count": 229
} | 1,606 |
// 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/common/FieldMeta.h/0 | {
"file_path": "milvus/internal/core/src/common/FieldMeta.h",
"repo_id": "milvus",
"token_count": 3852
} | 1,778 |
export type AgentAction = {
tool: string;
toolInput: string;
log: string;
};
export type AgentFinish = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
returnValues: Record<string, any>;
log: string;
};
export type AgentStep = {
action: AgentAction;
observation: string;
};
| langchainjs/langchain-core/src/agents.ts/0 | {
"file_path": "langchainjs/langchain-core/src/agents.ts",
"repo_id": "langchainjs",
"token_count": 106
} | 849 |
<jupyter_start><jupyter_text>Mix Self-Consistency Notebook In this notebook, we highlight the mix self-consistency method proposed in ["Rethinking Tabular Data Understanding with Large Language Models"](https://arxiv.org/pdf/2312.16702v1.pdf) paper by Liu et al.LLMs can reason over tabular data in 2 main ways:1. textua... | llama_index/llama-index-packs/llama-index-packs-tables/examples/mix_self_consistency.ipynb/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-tables/examples/mix_self_consistency.ipynb",
"repo_id": "llama_index",
"token_count": 3585
} | 1,597 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/image_captioning.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/image_captioning.md",
"repo_id": "transformers",
"token_count": 3779
} | 525 |
<!---
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | transformers/examples/research_projects/mlm_wwm/README.md/0 | {
"file_path": "transformers/examples/research_projects/mlm_wwm/README.md",
"repo_id": "transformers",
"token_count": 1186
} | 606 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/llama_index/vector_stores/azurecosmosmongo/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/llama_index/vector_stores/azurecosmosmongo/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,510 |
# Copyright 2024 Microsoft and 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 require... | diffusers/src/diffusers/schedulers/scheduling_vq_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_vq_diffusion.py",
"repo_id": "diffusers",
"token_count": 12487
} | 242 |
<jupyter_start><jupyter_text>Semantic Retriever BenchmarkIn this notebook, we will compare different Retrieval Strategies including* Google Semantic Retrieval* LlamaIndex Retrieval* Vectara Managed Retrieval* ColBERT-V2 end-to-end Retrieval Installation<jupyter_code>%pip install llama-index-llms-openai
%pip install ll... | llama_index/docs/examples/managed/manage_retrieval_benchmark.ipynb/0 | {
"file_path": "llama_index/docs/examples/managed/manage_retrieval_benchmark.ipynb",
"repo_id": "llama_index",
"token_count": 6471
} | 1,131 |
// 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/componentutil/componentutil_test.go/0 | {
"file_path": "milvus/internal/util/componentutil/componentutil_test.go",
"repo_id": "milvus",
"token_count": 1523
} | 2,070 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/semantic_segmentation.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/semantic_segmentation.md",
"repo_id": "transformers",
"token_count": 14135
} | 563 |
# syntax=docker/dockerfile:1
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM node:20 as builder-production
WORKDIR /app
COPY --link --chown=1000 package-lock.json package.json ./
RUN --mount=type=cache,target=/app/.npm \
... | chat-ui/Dockerfile/0 | {
"file_path": "chat-ui/Dockerfile",
"repo_id": "chat-ui",
"token_count": 351
} | 97 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/examples/research_projects/movement-pruning/masked_run_squad.py/0 | {
"file_path": "transformers/examples/research_projects/movement-pruning/masked_run_squad.py",
"repo_id": "transformers",
"token_count": 21547
} | 582 |
import { distance, similarity } from "ml-distance";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { ChainValues } from "@langchain/core/utils/types";
import { OpenAIEmbeddings } from "@langchain/openai";
import {
CallbackManagerForChainRun,
Callbacks,
BaseCallbackConfig,
} from "@l... | langchainjs/langchain/src/evaluation/embedding_distance/base.ts/0 | {
"file_path": "langchainjs/langchain/src/evaluation/embedding_distance/base.ts",
"repo_id": "langchainjs",
"token_count": 1673
} | 905 |
from typing import Any, Tuple
import pytest
from langchain.chains.query_constructor.ir import (
Comparator,
Comparison,
Operation,
Operator,
)
from langchain.retrievers.self_query.dashvector import DashvectorTranslator
DEFAULT_TRANSLATOR = DashvectorTranslator()
@pytest.mark.parametrize(
"tripl... | langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_dashvector.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_dashvector.py",
"repo_id": "langchain",
"token_count": 614
} | 646 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/model_doc/audio-spectrogram-transformer.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/audio-spectrogram-transformer.md",
"repo_id": "transformers",
"token_count": 2249
} | 491 |
import { logVersion010MigrationWarning } from "../../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/closevector/web",
});
export * from "@langchain/community/vectorstores/closevector/web";
| langchainjs/langchain/src/vectorstores/closevector/web.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/closevector/web.ts",
"repo_id": "langchainjs",
"token_count": 77
} | 921 |
import { LLM, type BaseLLMParams } from "@langchain/core/language_models/llms";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
/**
* Interface for the input parameters specific to the Aleph Alpha LLM.
*/
export interface AlephAlphaInput extends BaseLLMParams {
model: string;
maximum_tokens: ... | langchainjs/libs/langchain-community/src/llms/aleph_alpha.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/aleph_alpha.ts",
"repo_id": "langchainjs",
"token_count": 3780
} | 1,059 |
export * from "@langchain/community/tools/dynamic";
| langchainjs/langchain/src/tools/dynamic.ts/0 | {
"file_path": "langchainjs/langchain/src/tools/dynamic.ts",
"repo_id": "langchainjs",
"token_count": 15
} | 941 |
"""Implementations of key-value stores and storage helpers.
Module provides implementations of various key-value stores that conform
to a simple key-value interface.
The primary goal of these storages is to support implementation of caching.
"""
from langchain_community.storage.astradb import (
AstraDBByteStore,... | langchain/libs/community/langchain_community/storage/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/storage/__init__.py",
"repo_id": "langchain",
"token_count": 238
} | 290 |
import { OpenAI } from "@langchain/openai";
import { ConversationTokenBufferMemory } from "langchain/memory";
const model = new OpenAI({});
const memory = new ConversationTokenBufferMemory({
llm: model,
maxTokenLimit: 10,
});
await memory.saveContext({ input: "hi" }, { output: "whats up" });
await memory.saveCont... | langchainjs/examples/src/memory/token_buffer.ts/0 | {
"file_path": "langchainjs/examples/src/memory/token_buffer.ts",
"repo_id": "langchainjs",
"token_count": 161
} | 799 |
# Hands-on [[hands-on]]
<CourseFloatingBanner classNames="absolute z-10 right-0 top-0"
notebooks={[
{label: "Google Colab", value: "https://colab.research.google.com/github/huggingface/deep-rl-class/blob/main/notebooks/unit2/unit2.ipynb"}
]}
askForHelpUrl="http://hf.co/join/discord"... | deep-rl-class/units/en/unit2/hands-on.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit2/hands-on.mdx",
"repo_id": "deep-rl-class",
"token_count": 13932
} | 164 |
from langchain_community.document_loaders.larksuite import LarkSuiteDocLoader
DOMAIN = ""
ACCESS_TOKEN = ""
DOCUMENT_ID = ""
def test_larksuite_doc_loader() -> None:
"""Test LarkSuite (FeiShu) document loader."""
loader = LarkSuiteDocLoader(DOMAIN, ACCESS_TOKEN, DOCUMENT_ID)
docs = loader.load()
ass... | langchain/libs/community/tests/integration_tests/document_loaders/test_larksuite.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_larksuite.py",
"repo_id": "langchain",
"token_count": 146
} | 325 |
language: node_js
node_js: "10"
script:
- ./node_modules/.bin/webpack
| tokenizers/tokenizers/examples/unstable_wasm/www/.travis.yml/0 | {
"file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/.travis.yml",
"repo_id": "tokenizers",
"token_count": 30
} | 415 |
import {
MessageType,
type BaseMessage,
MessageContent,
AIMessage,
HumanMessage,
HumanMessageChunk,
AIMessageChunk,
} from "@langchain/core/messages";
import { type BaseLanguageModelCallOptions } from "@langchain/core/language_models/base";
import {
type ChatCompletionResult as MistralAIChatCompletionRe... | langchainjs/libs/langchain-mistralai/src/chat_models.ts/0 | {
"file_path": "langchainjs/libs/langchain-mistralai/src/chat_models.ts",
"repo_id": "langchainjs",
"token_count": 4057
} | 995 |
import json
from langchain_community.chat_message_histories import FirestoreChatMessageHistory
from langchain_core.messages import message_to_dict
from langchain.memory import ConversationBufferMemory
def test_memory_with_message_store() -> None:
"""Test the memory with a message store."""
message_history ... | langchain/libs/langchain/tests/integration_tests/memory/test_firestore.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/memory/test_firestore.py",
"repo_id": "langchain",
"token_count": 513
} | 640 |
# Stable Diffusion text-to-image fine-tuning
The `train_text_to_image.py` script shows how to fine-tune stable diffusion model on your own dataset.
___Note___:
___This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. I... | diffusers/examples/text_to_image/README.md/0 | {
"file_path": "diffusers/examples/text_to_image/README.md",
"repo_id": "diffusers",
"token_count": 4855
} | 219 |
from typing import AsyncIterator, Iterable, List, TypeVar, cast
from langchain_core.output_parsers.list import (
CommaSeparatedListOutputParser,
MarkdownListOutputParser,
NumberedListOutputParser,
)
from langchain_core.runnables.utils import aadd, add
def test_single_item() -> None:
"""Test that a st... | langchain/libs/core/tests/unit_tests/output_parsers/test_list_parser.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/output_parsers/test_list_parser.py",
"repo_id": "langchain",
"token_count": 4020
} | 417 |
import os
import shutil
import pytest
from langchain_community.vectorstores import NeuralDBVectorStore
@pytest.fixture(scope="session")
def test_csv(): # type: ignore[no-untyped-def]
csv = "thirdai-test.csv"
with open(csv, "w") as o:
o.write("column_1,column_2\n")
o.write("column one,column... | langchain/libs/community/tests/integration_tests/vectorstores/test_thirdai_neuraldb.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_thirdai_neuraldb.py",
"repo_id": "langchain",
"token_count": 906
} | 358 |
version: '3.9'
networks:
test_net:
driver: bridge
services:
test_server:
build:
context: .
dockerfile: Dockerfile
volumes:
- chroma-data:/chroma/chroma
command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30"
... | chroma/docker-compose.test-auth.yml/0 | {
"file_path": "chroma/docker-compose.test-auth.yml",
"repo_id": "chroma",
"token_count": 459
} | 36 |
import torch
import time
from dataclasses import dataclass
from opentelemetry import trace
from transformers import AutoTokenizer, AutoModelForCausalLM, PreTrainedTokenizerBase
from typing import Optional, Tuple, List, Type, Dict
from text_generation_server.models import Model
from text_generation_server.utils.tokens... | text-generation-inference/server/text_generation_server/models/causal_lm.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/causal_lm.py",
"repo_id": "text-generation-inference",
"token_count": 15102
} | 421 |
package tracer
import (
"context"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"
"github.com/milvus-io/milvus/pkg/log"
)
// SetupSpan add span into ctx values.
// Also setup logger in context with tracerID field.
func SetupSpan(ctx context.Context, span trace.Span) context.Context {
ctx = trace.ContextWith... | milvus/pkg/tracer/util.go/0 | {
"file_path": "milvus/pkg/tracer/util.go",
"repo_id": "milvus",
"token_count": 283
} | 1,830 |
# Doctran
>[Doctran](https://github.com/psychic-api/doctran) is a python package. It uses LLMs and open-source
> NLP libraries to transform raw text into clean, structured, information-dense documents
> that are optimized for vector space retrieval. You can think of `Doctran` as a black box where
> messy strings go... | langchain/docs/docs/integrations/providers/doctran.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/doctran.mdx",
"repo_id": "langchain",
"token_count": 323
} | 146 |
""" Relative Position Vision Transformer (ViT) in PyTorch
NOTE: these models are experimental / WIP, expect changes
Hacked together by / Copyright 2022, Ross Wightman
"""
import logging
import math
from functools import partial
from typing import Optional, Tuple, Type, Union
try:
from typing import Literal
excep... | pytorch-image-models/timm/models/vision_transformer_relpos.py/0 | {
"file_path": "pytorch-image-models/timm/models/vision_transformer_relpos.py",
"repo_id": "pytorch-image-models",
"token_count": 11608
} | 391 |
import { OpenAIEmbeddings } from "@langchain/openai";
import { TurbopufferVectorStore } from "@langchain/community/vectorstores/turbopuffer";
const embeddings = new OpenAIEmbeddings();
const store = new TurbopufferVectorStore(embeddings, {
apiKey: process.env.TURBOPUFFER_API_KEY,
namespace: "my-namespace",
});
c... | langchainjs/examples/src/indexes/vector_stores/turbopuffer.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/turbopuffer.ts",
"repo_id": "langchainjs",
"token_count": 850
} | 810 |
<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-anthropic-functions/extraction_anthropic_functions.ipynb/0 | {
"file_path": "langchain/templates/extraction-anthropic-functions/extraction_anthropic_functions.ipynb",
"repo_id": "langchain",
"token_count": 229
} | 653 |
"""Wrapper around Xinference embedding models."""
from typing import Any, List, Optional
from langchain_core.embeddings import Embeddings
class XinferenceEmbeddings(Embeddings):
"""Xinference embedding models.
To use, you should have the xinference library installed:
.. code-block:: bash
pip ... | langchain/libs/community/langchain_community/embeddings/xinference.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/xinference.py",
"repo_id": "langchain",
"token_count": 1334
} | 260 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-bagel/llama_index/vector_stores/bagel/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-bagel/llama_index/vector_stores/bagel/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,649 |
#include <torch/extension.h>
#include <ATen/ATen.h>
#include "cuda_launch.h"
#include "cuda_kernel.h"
#include <vector>
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
... | transformers/src/transformers/kernels/mra/cuda_launch.cu/0 | {
"file_path": "transformers/src/transformers/kernels/mra/cuda_launch.cu",
"repo_id": "transformers",
"token_count": 1668
} | 612 |
import * as uuid from "uuid";
import { Client, estypes } from "@elastic/elasticsearch";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { VectorStore } from "@langchain/core/vectorstores";
import { Document } from "@langchain/core/documents";
/**
* Type representing the k-nearest neighbor... | langchainjs/libs/langchain-community/src/vectorstores/elasticsearch.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/elasticsearch.ts",
"repo_id": "langchainjs",
"token_count": 3967
} | 1,013 |
"""Test edenai embeddings."""
from langchain_community.embeddings.edenai import EdenAiEmbeddings
def test_edenai_embedding_documents() -> None:
"""Test edenai embeddings with openai."""
documents = ["foo bar", "test text"]
embedding = EdenAiEmbeddings(provider="openai")
output = embedding.embed_docum... | langchain/libs/community/tests/integration_tests/embeddings/test_edenai.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/embeddings/test_edenai.py",
"repo_id": "langchain",
"token_count": 244
} | 334 |
"""
Manage LangChain apps
"""
import shutil
import subprocess
import sys
from pathlib import Path
from typing import Dict, List, Optional, Tuple
import typer
from typing_extensions import Annotated
from langchain_cli.utils.events import create_events
from langchain_cli.utils.git import (
DependencySource,
co... | langchain/libs/cli/langchain_cli/namespaces/app.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/namespaces/app.py",
"repo_id": "langchain",
"token_count": 4923
} | 204 |
[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 = ["BaseOpenAIAgent", "ContextRetrieverOpenAIAgent", "FnRetrieverOpenAIAgent", "OpenAIAgent"]... | llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/pyproject.toml",
"repo_id": "llama_index",
"token_count": 688
} | 1,177 |
# LlamaIndex Retrievers Integration: Bm25 Retriever
| llama_index/llama-index-integrations/retrievers/llama-index-retrievers-bm25/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/retrievers/llama-index-retrievers-bm25/README.md",
"repo_id": "llama_index",
"token_count": 16
} | 1,483 |
from typing import Optional, Type
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_community.tools.slack.base import SlackBaseTool
class SendMessageSchema(BaseModel):
"""Input for SendMessageTool."""
message: str = Field(
... | langchain/libs/community/langchain_community/tools/slack/send_message.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/slack/send_message.py",
"repo_id": "langchain",
"token_count": 458
} | 320 |
#!/usr/bin/env bash
# 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... | milvus/scripts/run_cpp_codecov.sh/0 | {
"file_path": "milvus/scripts/run_cpp_codecov.sh",
"repo_id": "milvus",
"token_count": 1287
} | 2,072 |
import { jest, expect, describe } from "@jest/globals";
import { GmailGetMessage } from "../gmail/index.js";
jest.mock("googleapis", () => ({
google: {
auth: {
JWT: jest.fn().mockImplementation(() => ({})),
},
},
}));
describe("GmailBaseTool using GmailGetMessage", () => {
it("should be setup with... | langchainjs/libs/langchain-community/src/tools/tests/gmail.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/tests/gmail.test.ts",
"repo_id": "langchainjs",
"token_count": 571
} | 961 |
<jupyter_start><jupyter_text>Regex Match[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/regex_match.ipynb)To evaluate chain or runnable string predictions against a custom regex, you can use the `regex_match` evaluator.<jupyter_code>from langchain.evalua... | langchain/docs/docs/guides/evaluation/string/regex_match.ipynb/0 | {
"file_path": "langchain/docs/docs/guides/evaluation/string/regex_match.ipynb",
"repo_id": "langchain",
"token_count": 740
} | 94 |
# Beam Datasets
Some datasets are too large to be processed on a single machine. Instead, you can process them with [Apache Beam](https://beam.apache.org/), a library for parallel data processing. The processing pipeline is executed on a distributed processing backend such as [Apache Flink](https://flink.apache.org/),... | datasets/docs/source/beam.mdx/0 | {
"file_path": "datasets/docs/source/beam.mdx",
"repo_id": "datasets",
"token_count": 562
} | 130 |
import { ChatMistralAI } from "@langchain/mistralai";
import { ChatPromptTemplate } from "@langchain/core/prompts";
const model = new ChatMistralAI({
apiKey: process.env.MISTRAL_API_KEY,
modelName: "mistral-small",
});
const prompt = ChatPromptTemplate.fromMessages([
["system", "You are a helpful assistant"],
... | langchainjs/examples/src/models/chat/chat_mistralai.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/chat_mistralai.ts",
"repo_id": "langchainjs",
"token_count": 529
} | 831 |
<jupyter_start><jupyter_text>Xorbits This notebook shows how to use agents to interact with [Xorbits Pandas](https://doc.xorbits.io/en/latest/reference/pandas/index.html) dataframe and [Xorbits Numpy](https://doc.xorbits.io/en/latest/reference/numpy/index.html) ndarray. It is mostly optimized for question answering.**N... | langchain/docs/docs/integrations/toolkits/xorbits.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/xorbits.ipynb",
"repo_id": "langchain",
"token_count": 825
} | 177 |
package proxy
import (
"context"
"fmt"
"testing"
"github.com/cockroachdb/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-... | milvus/internal/proxy/task_delete_test.go/0 | {
"file_path": "milvus/internal/proxy/task_delete_test.go",
"repo_id": "milvus",
"token_count": 12962
} | 2,023 |
{
"name": "chat-langchain",
"version": "0.1.0",
"private": true,
"packageManager": "yarn@1.22.19",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
},
"dependencies": {
"@chakra-ui/icons": "^2.1.0",
... | chat-langchain/chat-langchain/package.json/0 | {
"file_path": "chat-langchain/chat-langchain/package.json",
"repo_id": "chat-langchain",
"token_count": 683
} | 10 |
from langchain_community.callbacks.trubrics_callback import (
TrubricsCallbackHandler,
)
__all__ = ["TrubricsCallbackHandler"]
| langchain/libs/langchain/langchain/callbacks/trubrics_callback.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/trubrics_callback.py",
"repo_id": "langchain",
"token_count": 42
} | 497 |
# Hugging Face FS Loader
This loader uses Hugging Face Hub's Filesystem API (> 0.14) to
load datasets.
Besides the existing `load_data` function, you may also choose to use
`load_dicts` and `load_df`.
## Usage
To use this loader, you need to pass in a path to a Hugging Face dataset.
```python
from pathlib import P... | llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/README.md",
"repo_id": "llama_index",
"token_count": 351
} | 1,508 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.