text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/controlling_generation.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/controlling_generation.md",
"repo_id": "diffusers",
"token_count": 6311
} | 184 |
# coding=utf-8
# Copyright 2021 NVIDIA 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/segformer/configuration_segformer.py/0 | {
"file_path": "transformers/src/transformers/models/segformer/configuration_segformer.py",
"repo_id": "transformers",
"token_count": 3011
} | 728 |
# coding=utf-8
# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/rag/configuration_rag.py/0 | {
"file_path": "transformers/src/transformers/models/rag/configuration_rag.py",
"repo_id": "transformers",
"token_count": 3331
} | 720 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/pgvector",
});
export * from "@langchain/community/vectorstores/pgvector";
| langchainjs/langchain/src/vectorstores/pgvector.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/pgvector.ts",
"repo_id": "langchainjs",
"token_count": 72
} | 923 |
# Copyright 2024 Google Brain 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 requ... | diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py",
"repo_id": "diffusers",
"token_count": 1693
} | 250 |
python_sources()
| llama_index/llama-index-integrations/callbacks/llama-index-callbacks-arize-phoenix/llama_index/callbacks/arize_phoenix/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-arize-phoenix/llama_index/callbacks/arize_phoenix/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,209 |
"""Utils for LLM Tests."""
from langchain_core.language_models.llms import BaseLLM
def assert_llm_equality(llm: BaseLLM, loaded_llm: BaseLLM) -> None:
"""Assert LLM Equality for tests."""
# Check that they are the same type.
assert type(llm) == type(loaded_llm)
# Client field can be session based, so... | langchain/libs/community/tests/integration_tests/llms/utils.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/utils.py",
"repo_id": "langchain",
"token_count": 241
} | 346 |
from .beit import *
from .byoanet import *
from .byobnet import *
from .cait import *
from .coat import *
from .convit import *
from .convmixer import *
from .convnext import *
from .crossvit import *
from .cspnet import *
from .davit import *
from .deit import *
from .densenet import *
from .dla import *
from .dpn imp... | pytorch-image-models/timm/models/__init__.py/0 | {
"file_path": "pytorch-image-models/timm/models/__init__.py",
"repo_id": "pytorch-image-models",
"token_count": 1077
} | 369 |
import pytest
from langchain import chat_models, prompts
from langchain.schema import output_parser, runnable
from langsmith import schemas as langsmith_schemas
from utils import langsmith_unit_test
@pytest.fixture
def classification_chain() -> runnable.Runnable:
# Defines the chain you want to run.
prompt = ... | langsmith-cookbook/testing-examples/pytest-ut/test_model_ut.py/0 | {
"file_path": "langsmith-cookbook/testing-examples/pytest-ut/test_model_ut.py",
"repo_id": "langsmith-cookbook",
"token_count": 920
} | 1,139 |
""" Lion Optimizer
Paper: `Symbolic Discovery of Optimization Algorithms` - https://arxiv.org/abs/2302.06675
Original Impl: https://github.com/google/automl/tree/master/lion
"""
# Copyright 2023 Google Research. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | pytorch-image-models/timm/optim/lion.py/0 | {
"file_path": "pytorch-image-models/timm/optim/lion.py",
"repo_id": "pytorch-image-models",
"token_count": 3257
} | 393 |
import { test, expect } from "@jest/globals";
import {
BaseMessage,
SystemMessage,
HumanMessage,
AIMessage,
} from "@langchain/core/messages";
import { ChatExample, ChatGoogleVertexAI } from "../googlevertexai/index.js";
test("Google messages", async () => {
const messages: BaseMessage[] = [
new HumanMes... | langchainjs/libs/langchain-community/src/chat_models/tests/chatgooglevertexai.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/chat_models/tests/chatgooglevertexai.test.ts",
"repo_id": "langchainjs",
"token_count": 1213
} | 994 |
from langchain_community.llms.mlflow_ai_gateway import MlflowAIGateway
__all__ = ["MlflowAIGateway"]
| langchain/libs/langchain/langchain/llms/mlflow_ai_gateway.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/mlflow_ai_gateway.py",
"repo_id": "langchain",
"token_count": 41
} | 515 |
from typing import Optional
import torch
from PIL import Image
from tqdm.auto import tqdm
from transformers import CLIPTextModel, CLIPTokenizer
from diffusers import AutoencoderKL, DDIMScheduler, DiffusionPipeline, UNet2DConditionModel
from diffusers.image_processor import VaeImageProcessor
from diffusers.utils impor... | diffusers/examples/community/edict_pipeline.py/0 | {
"file_path": "diffusers/examples/community/edict_pipeline.py",
"repo_id": "diffusers",
"token_count": 4669
} | 204 |
<jupyter_start><jupyter_text>viking DB>[viking DB](https://www.volcengine.com/docs/6459/1163946) is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.This notebook shows how to use functionality related to the VikingDB vector ... | langchain/docs/docs/integrations/vectorstores/vikingdb.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/vikingdb.ipynb",
"repo_id": "langchain",
"token_count": 767
} | 200 |
"""Utilities for Spider module."""
import json
import os
from typing import Dict, Tuple
from llama_index import LLMPredictor, SQLDatabase
from llama_index.indices import SQLStructStoreIndex
from llama_index.llms.openai import OpenAI
from sqlalchemy import create_engine, text
def load_examples(spider_dir: str) -> Tu... | llama_index/benchmarks/struct_indices/spider/spider_utils.py/0 | {
"file_path": "llama_index/benchmarks/struct_indices/spider/spider_utils.py",
"repo_id": "llama_index",
"token_count": 703
} | 1,033 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-pdb/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pdb/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,402 |
from langchain_community.chat_message_histories import StreamlitChatMessageHistory
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables.history import RunnableWithMessageHistory
from langchain_openai import ChatOpenAI
import streamlit as st
st.set_page_config(page_t... | streamlit-agent/streamlit_agent/basic_memory.py/0 | {
"file_path": "streamlit-agent/streamlit_agent/basic_memory.py",
"repo_id": "streamlit-agent",
"token_count": 870
} | 2,002 |
from __future__ import annotations
import asyncio
import copy
import json
import logging
import weakref
from concurrent.futures import ThreadPoolExecutor
from functools import lru_cache
from typing import (
Any,
AsyncIterator,
Dict,
Iterator,
List,
Optional,
Sequence,
Tuple,
Union,
... | langserve/langserve/client.py/0 | {
"file_path": "langserve/langserve/client.py",
"repo_id": "langserve",
"token_count": 15311
} | 1,061 |
[tool.poetry]
name = "weblangchain"
version = "0.1.0"
description = ""
authors = ["SN <6432132+samnoyes@users.noreply.github.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
openai = "^0.28.0"
fastapi = "^0.103.1"
pydantic = "1.10"
langchain = "^0.0.324"
uvicorn = "^0.23.2"
tiktoken = "^0.4.0"
t... | weblangchain/pyproject.toml/0 | {
"file_path": "weblangchain/pyproject.toml",
"repo_id": "weblangchain",
"token_count": 340
} | 2,007 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/storage/remote_chunk_manager.go/0 | {
"file_path": "milvus/internal/storage/remote_chunk_manager.go",
"repo_id": "milvus",
"token_count": 5201
} | 2,067 |
# Ingest Documents into a Zep Collection
import os
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_community.document_loaders import WebBaseLoader
from langchain_community.embeddings import FakeEmbeddings
from langchain_community.vectorstores.zep import CollectionConfig, ZepVectorStor... | langchain/templates/rag-conversation-zep/ingest.py/0 | {
"file_path": "langchain/templates/rag-conversation-zep/ingest.py",
"repo_id": "langchain",
"token_count": 433
} | 714 |
<jupyter_start><jupyter_text>*FineTuning* et guidageDans ce *notebook*, nous allons couvrir deux approches principales pour adapter les modèles de diffusion existants :* Avec le *finetuning*, nous entraînons de nouveau les modèles existants sur de nouvelles données dans le but de modifier le résultat qu'ils produisent... | diffusion-models-class/units/fr/unit2/finetuning_and_guidance.ipynb/0 | {
"file_path": "diffusion-models-class/units/fr/unit2/finetuning_and_guidance.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 15878
} | 304 |
10
| milvus/build/deb/debian/compat/0 | {
"file_path": "milvus/build/deb/debian/compat",
"repo_id": "milvus",
"token_count": 2
} | 1,693 |
<jupyter_start><jupyter_text>Plan-and-ExecuteThis notebook shows how to create a "plan-and-execute" style agent. This is heavily inspired by the [Plan-and-Solve](https://arxiv.org/abs/2305.04091) paper as well as the [Baby-AGI](https://github.com/yoheinakajima/babyagi) project.The core idea is to first come up with a m... | langgraph/examples/plan-and-execute/plan-and-execute.ipynb/0 | {
"file_path": "langgraph/examples/plan-and-execute/plan-and-execute.ipynb",
"repo_id": "langgraph",
"token_count": 3045
} | 1,016 |
<jupyter_start><jupyter_text>You.com RetrieverThe [you.com API](https://api.you.com) is a suite of tools designed to help developers ground the output of LLMs in the most recent, most accurate, most relevant information that may not have been included in their training dataset. Setup The retriever lives in the `langch... | langchain/docs/docs/integrations/retrievers/you-retriever.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/you-retriever.ipynb",
"repo_id": "langchain",
"token_count": 2373
} | 160 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-sharepoint/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-sharepoint/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,429 |
//! ResNet implementation.
//!
//! See "Deep Residual Learning for Image Recognition" He et al. 2015
//! <https://arxiv.org/abs/1512.03385>
use candle::{Result, D};
use candle_nn::{batch_norm, Conv2d, Func, VarBuilder};
fn conv2d(
c_in: usize,
c_out: usize,
ksize: usize,
padding: usize,
stride: usi... | candle/candle-transformers/src/models/resnet.rs/0 | {
"file_path": "candle/candle-transformers/src/models/resnet.rs",
"repo_id": "candle",
"token_count": 3959
} | 81 |
# coding=utf-8
# Copyright 2022 Snapchat Research and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | transformers/src/transformers/models/efficientformer/modeling_efficientformer.py/0 | {
"file_path": "transformers/src/transformers/models/efficientformer/modeling_efficientformer.py",
"repo_id": "transformers",
"token_count": 13902
} | 598 |
import { Redis, type RedisConfigNodejs } from "@upstash/redis";
import { BaseListChatMessageHistory } from "@langchain/core/chat_history";
import {
BaseMessage,
StoredMessage,
mapChatMessagesToStoredMessages,
mapStoredMessagesToChatMessages,
} from "@langchain/core/messages";
/**
* Type definition for the inp... | langchainjs/libs/langchain-community/src/stores/message/upstash_redis.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/stores/message/upstash_redis.ts",
"repo_id": "langchainjs",
"token_count": 959
} | 982 |
from typing import List
from langchain_core.documents import Document
from langchain_community.document_loaders.web_base import WebBaseLoader
class CollegeConfidentialLoader(WebBaseLoader):
"""Load `College Confidential` webpages."""
def load(self) -> List[Document]:
"""Load webpages as Documents."... | langchain/libs/community/langchain_community/document_loaders/college_confidential.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/college_confidential.py",
"repo_id": "langchain",
"token_count": 176
} | 244 |
import asyncio
import json
import warnings
from abc import ABC
from typing import (
Any,
AsyncGenerator,
AsyncIterator,
Dict,
Iterator,
List,
Mapping,
Optional,
)
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_cor... | langchain/libs/community/langchain_community/llms/bedrock.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/bedrock.py",
"repo_id": "langchain",
"token_count": 12095
} | 266 |
from llama_index.packs.self_rag.base import SelfRAGQueryEngine, SelfRAGPack
__all__ = ["SelfRAGPack", "SelfRAGQueryEngine"]
| llama_index/llama-index-packs/llama-index-packs-self-rag/llama_index/packs/self_rag/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-self-rag/llama_index/packs/self_rag/__init__.py",
"repo_id": "llama_index",
"token_count": 40
} | 1,817 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/core/src/storage/AzureChunkManager.h/0 | {
"file_path": "milvus/internal/core/src/storage/AzureChunkManager.h",
"repo_id": "milvus",
"token_count": 1866
} | 1,804 |
from llama_index.core.indices.managed.base import BaseManagedIndex
from llama_index.indices.managed.google import GoogleIndex
def test_class():
names_of_base_classes = [b.__name__ for b in GoogleIndex.__mro__]
assert BaseManagedIndex.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/tests/test_indices_managed_google.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/tests/test_indices_managed_google.py",
"repo_id": "llama_index",
"token_count": 93
} | 1,244 |
package notification
import (
"context"
"testing"
"github.com/chroma/chroma-coordinator/internal/metastore/db/dao"
"github.com/chroma/chroma-coordinator/internal/metastore/db/dbcore"
"github.com/chroma/chroma-coordinator/internal/metastore/db/dbmodel"
"github.com/chroma/chroma-coordinator/internal/model"
"gith... | chroma/go/coordinator/internal/notification/notification_processor_test.go/0 | {
"file_path": "chroma/go/coordinator/internal/notification/notification_processor_test.go",
"repo_id": "chroma",
"token_count": 1607
} | 55 |
# (Tensorflow) MixNet
**MixNet** is a type of convolutional neural network discovered via AutoML that utilises [MixConvs](https://paperswithcode.com/method/mixconv) instead of regular [depthwise convolutions](https://paperswithcode.com/method/depthwise-convolution).
The weights from this model were ported from [Tenso... | pytorch-image-models/docs/models/.templates/models/tf-mixnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/tf-mixnet.md",
"repo_id": "pytorch-image-models",
"token_count": 1547
} | 362 |
// 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/indexparamcheck/utils.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/utils.go",
"repo_id": "milvus",
"token_count": 643
} | 1,908 |
<!--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/loading.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/loading.md",
"repo_id": "diffusers",
"token_count": 14650
} | 182 |
"""ArthurAI's Callback Handler."""
from __future__ import annotations
import os
import uuid
from collections import defaultdict
from datetime import datetime
from time import time
from typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, Optional
import numpy as np
from langchain_core.agents import AgentAction,... | langchain/libs/community/langchain_community/callbacks/arthur_callback.py/0 | {
"file_path": "langchain/libs/community/langchain_community/callbacks/arthur_callback.py",
"repo_id": "langchain",
"token_count": 5305
} | 215 |
from langchain_community.llms.utils import enforce_stop_tokens
__all__ = ["enforce_stop_tokens"]
| langchain/libs/langchain/langchain/llms/utils.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/utils.py",
"repo_id": "langchain",
"token_count": 35
} | 543 |
import pytest
from datasets import inspect_metric, list_metrics, load_metric
@pytest.fixture
def mock_emitted_deprecation_warnings(monkeypatch):
monkeypatch.setattr("datasets.utils.deprecation_utils._emitted_deprecation_warnings", set())
# Used by list_metrics
@pytest.fixture
def mock_hfh(monkeypatch):
cla... | datasets/tests/test_warnings.py/0 | {
"file_path": "datasets/tests/test_warnings.py",
"repo_id": "datasets",
"token_count": 473
} | 147 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/milvus",
});
export * from "@langchain/community/vectorstores/milvus";
| langchainjs/langchain/src/vectorstores/milvus.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/milvus.ts",
"repo_id": "langchainjs",
"token_count": 74
} | 1,032 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/tasks/idefics.md/0 | {
"file_path": "transformers/docs/source/en/tasks/idefics.md",
"repo_id": "transformers",
"token_count": 6890
} | 497 |
from llama_index.core.storage.kvstore.types import BaseKVStore
from llama_index.storage.kvstore.s3 import S3DBKVStore
def test_class():
names_of_base_classes = [b.__name__ for b in S3DBKVStore.__mro__]
assert BaseKVStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-s3/tests/test_store_kvstore_s3.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-s3/tests/test_store_kvstore_s3.py",
"repo_id": "llama_index",
"token_count": 104
} | 1,428 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py",
"repo_id": "transformers",
"token_count": 4795
} | 714 |
import { z } from "zod";
import { StructuredTool, ToolParams } from "@langchain/core/tools";
import { BaseFileStore } from "../stores/file/base.js";
/**
* Interface for parameters required by the ReadFileTool class.
*/
interface ReadFileParams extends ToolParams {
store: BaseFileStore;
}
/**
* Class for reading ... | langchainjs/langchain/src/tools/fs.ts/0 | {
"file_path": "langchainjs/langchain/src/tools/fs.ts",
"repo_id": "langchainjs",
"token_count": 557
} | 930 |
compute_environment: LOCAL_MACHINE
deepspeed_config:
gradient_accumulation_steps: 1
gradient_clipping: 1.0
offload_optimizer_device: none
offload_param_device: none
zero3_init_flag: true
zero3_save_16bit_model: true
zero_stage: 3
distributed_type: DEEPSPEED
downcast_bf16: 'no'
dynamo_backend: 'NO'
fsdp_co... | peft/examples/conditional_generation/accelerate_ds_zero3_cpu_offload_config.yaml/0 | {
"file_path": "peft/examples/conditional_generation/accelerate_ds_zero3_cpu_offload_config.yaml",
"repo_id": "peft",
"token_count": 198
} | 324 |
# Gutenberg
>[Project Gutenberg](https://www.gutenberg.org/about/) is an online library of free eBooks.
## Installation and Setup
There isn't any special setup for it.
## Document Loader
See a [usage example](/docs/integrations/document_loaders/gutenberg).
```python
from langchain_community.document_loaders impor... | langchain/docs/docs/integrations/providers/gutenberg.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/gutenberg.mdx",
"repo_id": "langchain",
"token_count": 96
} | 137 |
from langchain_community.vectorstores.bageldb import (
Bagel,
)
__all__ = ["Bagel"]
| langchain/libs/langchain/langchain/vectorstores/bageldb.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/bageldb.py",
"repo_id": "langchain",
"token_count": 35
} | 625 |
import {
CloseVectorHNSWNode,
HierarchicalNSWT,
CloseVectorHNSWLibArgs,
CloseVectorCredentials,
} from "closevector-node";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { Document } from "@langchain/core/documents";
import { CloseVector } from "./common.js";
/**
* package clo... | langchainjs/libs/langchain-community/src/vectorstores/closevector/node.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/closevector/node.ts",
"repo_id": "langchainjs",
"token_count": 2002
} | 1,047 |
<jupyter_start><jupyter_text>Auto-Retrieval from a Vector DatabaseThis guide shows how to perform **auto-retrieval** in LlamaIndex. Many popular vector dbs support a set of metadata filters in addition to a query string for semantic search. Given a natural language query, we first use the LLM to infer a set of metadata... | llama_index/docs/examples/vector_stores/elasticsearch_auto_retriever.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/elasticsearch_auto_retriever.ipynb",
"repo_id": "llama_index",
"token_count": 2056
} | 1,087 |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_CONTEXT_WINDOW, DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms.types import (
... | llama_index/llama-index-legacy/llama_index/legacy/llms/monsterapi.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/monsterapi.py",
"repo_id": "llama_index",
"token_count": 2953
} | 1,616 |
# Welcome to the RLHF Handbook!
Stay tuned for more details 🤗 | alignment-handbook/chapters/en/chapter0/introduction.mdx/0 | {
"file_path": "alignment-handbook/chapters/en/chapter0/introduction.mdx",
"repo_id": "alignment-handbook",
"token_count": 18
} | 20 |
# 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/src/transformers/models/videomae/configuration_videomae.py/0 | {
"file_path": "transformers/src/transformers/models/videomae/configuration_videomae.py",
"repo_id": "transformers",
"token_count": 2593
} | 668 |
from typing import Any, Iterator, List, Optional, Sequence, Tuple, cast
from langchain_core.stores import ByteStore
from langchain_community.utilities.redis import get_client
class RedisStore(ByteStore):
"""BaseStore implementation using Redis as the underlying store.
Examples:
Create a RedisStore ... | langchain/libs/community/langchain_community/storage/redis.py/0 | {
"file_path": "langchain/libs/community/langchain_community/storage/redis.py",
"repo_id": "langchain",
"token_count": 2214
} | 280 |
import multiprocessing
import numbers
import random
import time
import numpy
import pytest
import pandas as pd
from common import common_func as cf
from common import common_type as ct
from utils.util_log import test_log as log
from base.client_base import TestcaseBase
from common.common_type import CaseLabel, CheckTas... | milvus/tests/python_client/milvus_client/test_milvus_client_rbac.py/0 | {
"file_path": "milvus/tests/python_client/milvus_client/test_milvus_client_rbac.py",
"repo_id": "milvus",
"token_count": 14817
} | 1,901 |
---
hide_table_of_contents: true
---
import CodeBlock from "@theme/CodeBlock";
# DynamoDB-Backed Chat Memory
For longer-term persistence across chat sessions, you can swap out the default in-memory `chatHistory` that backs chat memory classes like `BufferMemory` for a DynamoDB instance.
## Setup
First, install the... | langchainjs/docs/core_docs/docs/integrations/chat_memory/dynamodb.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/chat_memory/dynamodb.mdx",
"repo_id": "langchainjs",
"token_count": 318
} | 776 |
{
"name": "create-langchain-integration",
"version": "0.0.10",
"repository": {
"type": "git",
"url": "https://github.com/langchain-ai/langchainjs",
"directory": "libs/create-langchain-integration"
},
"bin": "./dist/index.js",
"scripts": {
"dev": "ncc build ./index.ts -w -o dist/",
"build... | langchainjs/libs/create-langchain-integration/package.json/0 | {
"file_path": "langchainjs/libs/create-langchain-integration/package.json",
"repo_id": "langchainjs",
"token_count": 485
} | 1,009 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-database/llama_index/tools/database/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-database/llama_index/tools/database/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,436 |
[tool.poetry]
name = "rag-vectara-multiquery"
version = "0.1.0"
description = "RAG using vectara with multiquery retriever"
authors = [
"Ofer Mendelevitch <ofer@vectara.com>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
tiktoken = "^0.5.1"
[tool.poetr... | langchain/templates/rag-vectara-multiquery/pyproject.toml/0 | {
"file_path": "langchain/templates/rag-vectara-multiquery/pyproject.toml",
"repo_id": "langchain",
"token_count": 337
} | 693 |
[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 = ["RAGatouilleRetrieverPack"]
contains_example = false
import_path = "llama_index.packs.raga... | llama_index/llama-index-packs/llama-index-packs-ragatouille-retriever/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-ragatouille-retriever/pyproject.toml",
"repo_id": "llama_index",
"token_count": 702
} | 1,585 |
<!--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/ko/serialization.md/0 | {
"file_path": "transformers/docs/source/ko/serialization.md",
"repo_id": "transformers",
"token_count": 6870
} | 529 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/datanode/data_sync_service.go/0 | {
"file_path": "milvus/internal/datanode/data_sync_service.go",
"repo_id": "milvus",
"token_count": 6138
} | 1,970 |
{
"redirects": [
{
"source": "/docs(/?)",
"destination": "/docs/get_started/introduction/"
},
{
"source": "/docs/getting-started/install(/?)",
"destination": "/docs/get_started/installation/"
},
{
"source": "/docs/getting-started/guide-llm(/?)",
"destination": "... | langchainjs/docs/core_docs/vercel.json/0 | {
"file_path": "langchainjs/docs/core_docs/vercel.json",
"repo_id": "langchainjs",
"token_count": 8053
} | 780 |
# flake8: noqa
from langchain_core.output_parsers.list import CommaSeparatedListOutputParser
from langchain_core.prompts.prompt import PromptTemplate
PROMPT_SUFFIX = """Only use the following tables:
{table_info}
Question: {input}"""
_DEFAULT_TEMPLATE = """Given an input question, first create a syntactically corre... | langchain/libs/langchain/langchain/chains/sql_database/prompt.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/sql_database/prompt.py",
"repo_id": "langchain",
"token_count": 4084
} | 513 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/commands/convert.py/0 | {
"file_path": "transformers/src/transformers/commands/convert.py",
"repo_id": "transformers",
"token_count": 3159
} | 568 |
# coding=utf-8
# Copyright 2022 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | transformers/tests/models/oneformer/test_processor_oneformer.py/0 | {
"file_path": "transformers/tests/models/oneformer/test_processor_oneformer.py",
"repo_id": "transformers",
"token_count": 15394
} | 778 |
import { expect, test } from "@jest/globals";
import { PromptTemplate } from "../prompt.js";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
MessagesPlaceholder,
SystemMessagePromptTemplate,
} from "../chat.js";
import { PipelinePromptTemplate } from "../pipeline.js";
test("Test pipeline input variabl... | langchainjs/langchain-core/src/prompts/tests/pipeline.test.ts/0 | {
"file_path": "langchainjs/langchain-core/src/prompts/tests/pipeline.test.ts",
"repo_id": "langchainjs",
"token_count": 1187
} | 830 |
# test-exports-cf
This package was generated with `wrangler init` with the purpose of testing compatibility with Cloudlfare Workers.
| langchainjs/environment_tests/test-exports-cf/README.md/0 | {
"file_path": "langchainjs/environment_tests/test-exports-cf/README.md",
"repo_id": "langchainjs",
"token_count": 32
} | 748 |
import os
import pathlib
import sys
from unittest.mock import MagicMock
import pytest
from llama_index.legacy.storage.storage_context import StorageContext
from llama_index.legacy.vector_stores.faiss import FaissVectorStore
from llama_index.legacy.vector_stores.txtai import TxtaiVectorStore
from tests.indices.vector_... | llama_index/llama-index-legacy/tests/indices/vector_store/conftest.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/indices/vector_store/conftest.py",
"repo_id": "llama_index",
"token_count": 507
} | 1,554 |
"""Criteria or rubric based evaluators.
These evaluators are useful for evaluating the
output of a language model or chain against
specified criteria or rubric.
Classes
-------
CriteriaEvalChain : Evaluates the output of a language model or
chain against specified criteria.
Examples
--------
Using a predefined crite... | langchain/libs/langchain/langchain/evaluation/criteria/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/evaluation/criteria/__init__.py",
"repo_id": "langchain",
"token_count": 555
} | 537 |
from langchain import retrievers
from tests.unit_tests import assert_all_importable
EXPECTED_ALL = [
"AmazonKendraRetriever",
"AmazonKnowledgeBasesRetriever",
"ArceeRetriever",
"ArxivRetriever",
"AzureCognitiveSearchRetriever",
"ChatGPTPluginRetriever",
"ContextualCompressionRetriever",
... | langchain/libs/langchain/tests/unit_tests/retrievers/test_imports.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/test_imports.py",
"repo_id": "langchain",
"token_count": 630
} | 648 |
from typing import Any, Dict, List, Optional, Tuple
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import RESPONSE_TYPE
from llama_index.core.callbacks.schema import CBEventType, EventPayload
from llama_index.core.indices.composability.graph import Compos... | llama_index/llama-index-core/llama_index/core/query_engine/graph_query_engine.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/query_engine/graph_query_engine.py",
"repo_id": "llama_index",
"token_count": 2162
} | 1,195 |
""" FocalNet
As described in `Focal Modulation Networks` - https://arxiv.org/abs/2203.11926
Significant modifications and refactoring from the original impl at https://github.com/microsoft/FocalNet
This impl is/has:
* fully convolutional, NCHW tensor layout throughout, seemed to have minimal performance impact but m... | pytorch-image-models/timm/models/focalnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/focalnet.py",
"repo_id": "pytorch-image-models",
"token_count": 11585
} | 343 |
import inspect
import os
import numpy as np
import torch
import torch.nn.functional as nnf
from PIL import Image
from torch.optim.adam import Adam
from tqdm import tqdm
from diffusers import StableDiffusionPipeline
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
def retrieve_timesteps... | diffusers/examples/community/pipeline_null_text_inversion.py/0 | {
"file_path": "diffusers/examples/community/pipeline_null_text_inversion.py",
"repo_id": "diffusers",
"token_count": 5423
} | 188 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/wavlm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/wavlm.md",
"repo_id": "transformers",
"token_count": 972
} | 491 |
<jupyter_start> | langchain/docs/docs/integrations/document_loaders/microsoft_onedrive.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/microsoft_onedrive.ipynb",
"repo_id": "langchain",
"token_count": 8
} | 106 |
# Chat Engines
##### FAQ
1. [How to make bot retain context while answering, Can I do that with LlamaIndex?](#1-how-to-make-bot-retain-context-while-answering-can-i-do-that-with-llamaindex)
2. [How to use Data Agent with Chat engine?](#2-how-to-use-data-agent-with-chat-engine)
---
##### 1. How to make bot retain co... | llama_index/docs/community/faq/chat_engines.md/0 | {
"file_path": "llama_index/docs/community/faq/chat_engines.md",
"repo_id": "llama_index",
"token_count": 270
} | 1,118 |
from typing import List, Union
import numpy as np
from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging, requires_backends
from .base import Pipeline, build_pipeline_init_args
if is_vision_available():
from PIL import Image
from ..image_utils import load_image
if is_torc... | transformers/src/transformers/pipelines/depth_estimation.py/0 | {
"file_path": "transformers/src/transformers/pipelines/depth_estimation.py",
"repo_id": "transformers",
"token_count": 1692
} | 706 |
# LlamaIndex Vector_Stores Integration: Metal
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,487 |
from abc import abstractmethod
from typing import List, Sequence
from llama_index.legacy.bridge.pydantic import BaseModel
from llama_index.legacy.prompts.mixin import PromptMixin, PromptMixinType
from llama_index.legacy.schema import QueryBundle
from llama_index.legacy.tools.types import ToolMetadata
class SubQuesti... | llama_index/llama-index-legacy/llama_index/legacy/question_gen/types.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/question_gen/types.py",
"repo_id": "llama_index",
"token_count": 356
} | 1,532 |
from rag_google_cloud_vertexai_search.chain import chain
if __name__ == "__main__":
query = "Who is the CEO of Google Cloud?"
print(chain.invoke(query)) # noqa: T201
| langchain/templates/rag-google-cloud-vertexai-search/main.py/0 | {
"file_path": "langchain/templates/rag-google-cloud-vertexai-search/main.py",
"repo_id": "langchain",
"token_count": 63
} | 662 |
<jupyter_start><jupyter_text>NLP CloudThe [NLP Cloud](https://nlpcloud.io) serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, grammar and spelling correction, keywords and keyphrases extraction, chatbot, product description and ad generation, i... | langchain/docs/docs/integrations/llms/nlpcloud.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/nlpcloud.ipynb",
"repo_id": "langchain",
"token_count": 407
} | 124 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,281 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/core/src/storage/Types.h/0 | {
"file_path": "milvus/internal/core/src/storage/Types.h",
"repo_id": "milvus",
"token_count": 2373
} | 1,668 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/mq/msgstream/trace.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/trace.go",
"repo_id": "milvus",
"token_count": 949
} | 1,894 |
from langchain_community.docstore import __all__
EXPECTED_ALL = ["DocstoreFn", "InMemoryDocstore", "Wikipedia"]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/community/tests/unit_tests/docstore/test_imports.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/docstore/test_imports.py",
"repo_id": "langchain",
"token_count": 69
} | 395 |
"""Opensearch reader over REST api.
This only uses the basic search api, so it will work Opensearch.
"""
from typing import List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class OpensearchReader(BaseReader):
"""
Read documents from an Opense... | llama_index/llama-index-integrations/readers/llama-index-readers-opensearch/llama_index/readers/opensearch/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-opensearch/llama_index/readers/opensearch/base.py",
"repo_id": "llama_index",
"token_count": 1012
} | 1,500 |
"""Tool for the Google Finance"""
from typing import Optional
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.tools import BaseTool
from langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper
class GoogleFinanceQueryRun(BaseTool):
"""Tool that queries the... | langchain/libs/community/langchain_community/tools/google_finance/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/google_finance/tool.py",
"repo_id": "langchain",
"token_count": 295
} | 300 |
# Usage Pattern
You can create custom LlamaHub Tool Specs and Tools or they can be imported from the `llama-hub` package. They can be plugged into our native agents, or LangChain agents.
## Using with our Agents
To use with our OpenAIAgent,
```python
from llama_index.agent.openai import OpenAIAgent
from llama_index... | llama_index/docs/module_guides/deploying/agents/tools/usage_pattern.md/0 | {
"file_path": "llama_index/docs/module_guides/deploying/agents/tools/usage_pattern.md",
"repo_id": "llama_index",
"token_count": 500
} | 1,174 |
- name: "proxy"
docker_container:
name: proxy
image: "{{image}}"
command: "milvus run proxy"
env:
ETCD_ENDPOINTS: "{{ETCD_ENDPOINTS}}"
MINIO_ADDRESS: "{{MINIO_ADDRESS}}"
PULSAR_ADDRESS: "{{PULSAR_ADDRESS}}"
METRICS_PORT: "9098"
network_mode: "{{nodes_network}}" #Use the ne... | milvus/deployments/docker/cluster-distributed-deployment/roles/deploy-proxy/tasks/main.yml/0 | {
"file_path": "milvus/deployments/docker/cluster-distributed-deployment/roles/deploy-proxy/tasks/main.yml",
"repo_id": "milvus",
"token_count": 171
} | 1,847 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,312 |
use crate::errors::{ChromaError, ErrorCodes};
use num_bigint::BigInt;
use thiserror::Error;
/// A macro for easily implementing match arms for a base error type with common errors.
/// Other types can wrap it and still implement the ChromaError trait
/// without boilerplate.
macro_rules! impl_base_convert_error {
... | chroma/rust/worker/src/types/types.rs/0 | {
"file_path": "chroma/rust/worker/src/types/types.rs",
"repo_id": "chroma",
"token_count": 448
} | 64 |
import time
import pytest
from time import sleep
from pymilvus import connections
from chaos.checker import (CollectionCreateChecker,
InsertChecker,
UpsertChecker,
FlushChecker,
SearchChecker,
... | milvus/tests/python_client/chaos/testcases/test_single_request_operation.py/0 | {
"file_path": "milvus/tests/python_client/chaos/testcases/test_single_request_operation.py",
"repo_id": "milvus",
"token_count": 2127
} | 1,965 |
# Module Guides
```{toctree}
---
maxdepth: 1
---
VectorStoreIndex <./vector_store_index.md>
Summary Index <./index_guide.md>
Tree Index <./index_guide.md>
Keyword Table Index <./index_guide.md>
/examples/index_structs/knowledge_graph/KnowledgeGraphDemo.ipynb
/examples/index_structs/knowledge_graph/KnowledgeGraphIndex_... | llama_index/docs/module_guides/indexing/modules.md/0 | {
"file_path": "llama_index/docs/module_guides/indexing/modules.md",
"repo_id": "llama_index",
"token_count": 343
} | 1,093 |
.. _Ref-Response-Synthesizer:
Response Synthesizer
=====================
.. automodule:: llama_index.core.response_synthesizers
:members:
:inherited-members:
| llama_index/docs/api_reference/query/response_synthesizer.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/response_synthesizer.rst",
"repo_id": "llama_index",
"token_count": 58
} | 1,115 |
# Airbyte Stripe Loader
The Airbyte Stripe Loader allows you to access different Stripe objects.
## Installation
- Install llama_hub: `pip install llama_hub`
- Install the stripe source: `pip install airbyte-source-stripe`
## Usage
Here's an example usage of the AirbyteStripeReader.
```python
from llama_hub.airby... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-stripe/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-stripe/README.md",
"repo_id": "llama_index",
"token_count": 850
} | 1,334 |
/* eslint-disable no-process-env */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { describe, expect, test } from "@jest/globals";
import { QdrantClient } from "@qdrant/js-client-rest";
import { faker } from "@faker-js/faker";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Documen... | langchainjs/libs/langchain-community/src/vectorstores/tests/qdrant.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/qdrant.int.test.ts",
"repo_id": "langchainjs",
"token_count": 659
} | 1,029 |
"""Chain that interprets a prompt and executes python code to do symbolic math."""
from __future__ import annotations
import re
from typing import Any, Dict, List, Optional
from langchain.base_language import BaseLanguageModel
from langchain.callbacks.manager import (
AsyncCallbackManagerForChainRun,
Callback... | langchain/libs/experimental/langchain_experimental/llm_symbolic_math/base.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/llm_symbolic_math/base.py",
"repo_id": "langchain",
"token_count": 2487
} | 449 |
python_sources()
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-cohere-rerank/llama_index/postprocessor/cohere_rerank/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-cohere-rerank/llama_index/postprocessor/cohere_rerank/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,386 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.