text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
python_sources()
llama_index/llama-index-integrations/readers/llama-index-readers-couchbase/llama_index/readers/couchbase/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-couchbase/llama_index/readers/couchbase/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,477
#!/usr/bin/env sh # curl -s http://localhost:8000/openapi.json | jq > openapi.json curl -s http://localhost:8000/openapi.json | python -c "import sys, json; print(json.dumps(json.load(sys.stdin), indent=2))" > openapi.json if [[ "$OSTYPE" == "darwin"* ]]; then # macOS sed -i '' 's/"schema": {}/"schema": {"type": ...
chroma/clients/js/genapi.sh/0
{ "file_path": "chroma/clients/js/genapi.sh", "repo_id": "chroma", "token_count": 488 }
27
# SSL ResNeXT A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) ...
pytorch-image-models/docs/models/ssl-resnext.md/0
{ "file_path": "pytorch-image-models/docs/models/ssl-resnext.md", "repo_id": "pytorch-image-models", "token_count": 3444 }
354
/* eslint-disable @typescript-eslint/no-explicit-any */ import { jest, test, expect } from "@jest/globals"; import { FakeEmbeddings } from "@langchain/core/utils/testing"; import { TigrisVectorStore } from "../tigris.js"; test("TigrisVectorStore with external ids", async () => { const client = { addDocumentsWit...
langchainjs/libs/langchain-community/src/vectorstores/tests/tigris.test.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/tigris.test.ts", "repo_id": "langchainjs", "token_count": 747 }
1,089
import argparse import json import torch from diffusers import AutoencoderKL, DDPMPipeline, DDPMScheduler, UNet2DModel, VQModel def shave_segments(path, n_shave_prefix_segments=1): """ Removes segments. Positive values shave the first segments, negative shave the last segments. """ if n_shave_prefix...
diffusers/scripts/convert_ddpm_original_checkpoint_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_ddpm_original_checkpoint_to_diffusers.py", "repo_id": "diffusers", "token_count": 8490 }
217
# coding=utf-8 # Copyright 2020, Microsoft 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 require...
transformers/src/transformers/models/deberta_v2/configuration_deberta_v2.py/0
{ "file_path": "transformers/src/transformers/models/deberta_v2/configuration_deberta_v2.py", "repo_id": "transformers", "token_count": 3649 }
598
/* eslint-disable @typescript-eslint/no-explicit-any */ export const JsonRefs: { resolveRefs(schema: any): Promise<{ resolved: any }>; };
langserve/langserve/playground/src/utils/json-refs.d.ts/0
{ "file_path": "langserve/langserve/playground/src/utils/json-refs.d.ts", "repo_id": "langserve", "token_count": 54 }
1,047
from langchain_community.llms.huggingface_text_gen_inference import ( HuggingFaceTextGenInference, ) __all__ = ["HuggingFaceTextGenInference"]
langchain/libs/langchain/langchain/llms/huggingface_text_gen_inference.py/0
{ "file_path": "langchain/libs/langchain/langchain/llms/huggingface_text_gen_inference.py", "repo_id": "langchain", "token_count": 52 }
512
[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 = ["TimescaleVectorAutoretrievalPack"] contains_example = false import_path = "llama_index.pa...
llama_index/llama-index-packs/llama-index-packs-timescale-vector-autoretrieval/pyproject.toml/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-timescale-vector-autoretrieval/pyproject.toml", "repo_id": "llama_index", "token_count": 722 }
1,613
import { getEnvironmentVariable } from "@langchain/core/utils/env"; import { Tool } from "@langchain/core/tools"; /** * This does not use the `serpapi` package because it appears to cause issues * when used in `jest` tests. Part of the issue seems to be that the `serpapi` * package imports a wasm module to use inst...
langchainjs/libs/langchain-community/src/tools/serpapi.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/tools/serpapi.ts", "repo_id": "langchainjs", "token_count": 6177 }
1,076
<!--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/main_classes/model.md/0
{ "file_path": "transformers/docs/source/en/main_classes/model.md", "repo_id": "transformers", "token_count": 2010 }
499
poetry_requirements( name="poetry", )
llama_index/llama-index-integrations/llms/llama-index-llms-openllm/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-openllm/BUILD", "repo_id": "llama_index", "token_count": 18 }
1,274
poetry_requirements( name="poetry", )
llama_index/llama-index-integrations/llms/llama-index-llms-together/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-together/BUILD", "repo_id": "llama_index", "token_count": 18 }
1,239
import pytest from langchain_openai import ChatOpenAI, OpenAI _EXPECTED_NUM_TOKENS = { "ada": 17, "babbage": 17, "curie": 17, "davinci": 17, "gpt-4": 12, "gpt-4-32k": 12, "gpt-3.5-turbo": 12, } _MODELS = models = [ "ada", "babbage", "curie", "davinci", ] _CHAT_MODELS = [ ...
langchain/libs/partners/openai/tests/unit_tests/test_token_counts.py/0
{ "file_path": "langchain/libs/partners/openai/tests/unit_tests/test_token_counts.py", "repo_id": "langchain", "token_count": 449 }
638
from typing import List, Optional from llama_index.core.node_parser.text import TokenTextSplitter from llama_index.core.node_parser.text.utils import truncate_text from llama_index.core.schema import BaseNode def get_numbered_text_from_nodes( node_list: List[BaseNode], text_splitter: Optional[TokenTextSplitt...
llama_index/llama-index-core/llama_index/core/indices/tree/utils.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/indices/tree/utils.py", "repo_id": "llama_index", "token_count": 303 }
1,223
<!--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/model_doc/flan-t5.md/0
{ "file_path": "transformers/docs/source/en/model_doc/flan-t5.md", "repo_id": "transformers", "token_count": 781 }
475
<jupyter_start><jupyter_text>YouTube transcripts>[YouTube](https://www.youtube.com/) is an online video sharing and social media platform created by Google.This notebook covers how to load documents from `YouTube transcripts`.<jupyter_code>from langchain_community.document_loaders import YoutubeLoader %pip install --up...
langchain/docs/docs/integrations/document_loaders/youtube_transcript.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/youtube_transcript.ipynb", "repo_id": "langchain", "token_count": 955 }
114
# Typesense Vector store that utilizes the Typesense search engine. ### Basic Usage import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx"; <IntegrationInstallTooltip></IntegrationInstallTooltip> ```bash npm2yarn npm install @langchain/openai ``` ```typescript import { Typesense, ...
langchainjs/docs/core_docs/docs/integrations/vectorstores/typesense.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/typesense.mdx", "repo_id": "langchainjs", "token_count": 1756 }
751
use super::{ normalizer::Range, Model, NormalizedString, Normalizer, Offsets, PreTokenizedString, Token, }; use aho_corasick::{AhoCorasick, AhoCorasickBuilder, MatchKind}; use regex::Regex; use serde::{ser::SerializeSeq, Deserialize, Serialize, Serializer}; use std::collections::{HashMap, HashSet}; /// Represent a...
tokenizers/tokenizers/src/tokenizer/added_vocabulary.rs/0
{ "file_path": "tokenizers/tokenizers/src/tokenizer/added_vocabulary.rs", "repo_id": "tokenizers", "token_count": 16897 }
423
import pytest @pytest.fixture(scope="module") def flash_llama_awq_handle(launcher): with launcher( "abhinavkulkarni/codellama-CodeLlama-7b-Python-hf-w4-g128-awq", num_shard=1, quantize="awq", ) as handle: yield handle @pytest.fixture(scope="module") async def flash_llama_awq(...
text-generation-inference/integration-tests/models/test_flash_awq.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_awq.py", "repo_id": "text-generation-inference", "token_count": 866 }
429
<jupyter_start><jupyter_text>Elasticsearch Embeddings If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-vector-stores-elasticsearch %pip install llama-index-embeddings-elasticsearch !pip install llama-index # imports from llama_index.embedd...
llama_index/docs/examples/embeddings/elasticsearch.ipynb/0
{ "file_path": "llama_index/docs/examples/embeddings/elasticsearch.ipynb", "repo_id": "llama_index", "token_count": 507 }
1,114
# coding=utf-8 # Copyright 2023 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/test_image_processing_common.py/0
{ "file_path": "transformers/tests/test_image_processing_common.py", "repo_id": "transformers", "token_count": 6533 }
790
import asyncio from concurrent.futures import ThreadPoolExecutor from typing import Any, AsyncIterator, Callable, Dict, Iterator, List, Optional, Union from langchain_core.callbacks import ( AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun, ) from langchain_core.language_models.llms import BaseLLM, crea...
langchain/libs/community/langchain_community/llms/fireworks.py/0
{ "file_path": "langchain/libs/community/langchain_community/llms/fireworks.py", "repo_id": "langchain", "token_count": 5359 }
277
import { test, expect } from "@jest/globals"; import { AIMessage, HumanMessage, SystemMessage, } from "@langchain/core/messages"; import { OpenAI } from "@langchain/openai"; import { BufferMemory } from "../buffer_memory.js"; import { CombinedMemory } from "../combined_memory.js"; import { ConversationSummaryMemo...
langchainjs/langchain/src/memory/tests/combined_memory.int.test.ts/0
{ "file_path": "langchainjs/langchain/src/memory/tests/combined_memory.int.test.ts", "repo_id": "langchainjs", "token_count": 858 }
907
from __future__ import annotations import json from typing import TYPE_CHECKING, List, Optional, Sequence, Type from langchain_core.callbacks import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, ) from langchain_core.pydantic_v1 import BaseModel, Field from langchain_community.tools.playwright...
langchain/libs/community/langchain_community/tools/playwright/get_elements.py/0
{ "file_path": "langchain/libs/community/langchain_community/tools/playwright/get_elements.py", "repo_id": "langchain", "token_count": 1449 }
312
[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 = ["WordLiftLoader"] contains_example = false import_path = "llama_index.readers.wordlift" [...
llama_index/llama-index-integrations/readers/llama-index-readers-wordlift/pyproject.toml/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-wordlift/pyproject.toml", "repo_id": "llama_index", "token_count": 695 }
1,575
<jupyter_start><jupyter_text>Eden AI Eden AI is revolutionizing the AI landscape by uniting the best AI providers, empowering users to unlock limitless possibilities and tap into the true potential of artificial intelligence. With an all-in-one comprehensive and hassle-free platform, it allows users to deploy AI featur...
langchain/docs/docs/integrations/llms/edenai.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/llms/edenai.ipynb", "repo_id": "langchain", "token_count": 1303 }
126
import { ChatOpenAI } from "@langchain/openai"; // See https://cookbook.openai.com/examples/using_logprobs for details const model = new ChatOpenAI({ logprobs: true, // topLogprobs: 5, }); const result = await model.invoke("Hi there!", { callbacks: [ { handleLLMEnd(output) { console.log("GENER...
langchainjs/examples/src/models/chat/integration_openai_callbacks.ts/0
{ "file_path": "langchainjs/examples/src/models/chat/integration_openai_callbacks.ts", "repo_id": "langchainjs", "token_count": 1419 }
805
"""Draws DAG in ASCII. Adapted from https://github.com/iterative/dvc/blob/main/dvc/dagascii.py""" import math import os from typing import Any, Mapping, Sequence, Tuple class VertexViewer: """Class to define vertex box boundaries that will be accounted for during graph building by grandalf. Args: ...
langchain/libs/core/langchain_core/runnables/graph_draw.py/0
{ "file_path": "langchain/libs/core/langchain_core/runnables/graph_draw.py", "repo_id": "langchain", "token_count": 4362 }
396
from abc import abstractmethod from typing import Any, Dict, List from langchain_community.graphs.graph_document import GraphDocument class GraphStore: """An abstract class wrapper for graph operations.""" @property @abstractmethod def get_schema(self) -> str: """Returns the schema of the Gr...
langchain/libs/community/langchain_community/graphs/graph_store.py/0
{ "file_path": "langchain/libs/community/langchain_community/graphs/graph_store.py", "repo_id": "langchain", "token_count": 370 }
261
--- label: "Web Loaders" hide_table_of_contents: true --- # Web Loaders These loaders are used to load web resources. import DocCardList from "@theme/DocCardList"; <DocCardList />
langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/index.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/index.mdx", "repo_id": "langchainjs", "token_count": 62 }
704
# Recent Changes ### Dec 23, 2022 🎄☃ * Add FlexiViT models and weights from https://github.com/google-research/big_vision (check out paper at https://arxiv.org/abs/2212.08013) * NOTE currently resizing is static on model creation, on-the-fly dynamic / train patch size sampling is a WIP * Many more models updated to ...
pytorch-image-models/docs/changes.md/0
{ "file_path": "pytorch-image-models/docs/changes.md", "repo_id": "pytorch-image-models", "token_count": 23289 }
313
// 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/importutilv2/util.go/0
{ "file_path": "milvus/internal/util/importutilv2/util.go", "repo_id": "milvus", "token_count": 889 }
1,941
from langchain_community.document_loaders.snowflake_loader import SnowflakeLoader __all__ = ["SnowflakeLoader"]
langchain/libs/langchain/langchain/document_loaders/snowflake_loader.py/0
{ "file_path": "langchain/libs/langchain/langchain/document_loaders/snowflake_loader.py", "repo_id": "langchain", "token_count": 32 }
538
# coding=utf-8 # Copyright 2022 Microsoft 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/L...
transformers/src/transformers/models/deprecated/tapex/tokenization_tapex.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/tapex/tokenization_tapex.py", "repo_id": "transformers", "token_count": 29621 }
592
import torch from diffusers import DDIMScheduler from .test_schedulers import SchedulerCommonTest class DDIMSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMScheduler,) forward_default_kwargs = (("eta", 0.0), ("num_inference_steps", 50)) def get_scheduler_config(self, **kwargs): con...
diffusers/tests/schedulers/test_scheduler_ddim.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_ddim.py", "repo_id": "diffusers", "token_count": 3127 }
295
# Minimax >[Minimax](https://api.minimax.chat) is a Chinese startup that provides natural language processing models > for companies and individuals. ## Installation and Setup Get a [Minimax api key](https://api.minimax.chat/user-center/basic-information/interface-key) and set it as an environment variable (`MINIMAX_...
langchain/docs/docs/integrations/providers/minimax.mdx/0
{ "file_path": "langchain/docs/docs/integrations/providers/minimax.mdx", "repo_id": "langchain", "token_count": 300 }
145
/* eslint-disable no-process-env */ import { expect, test } from "@jest/globals"; import { OpenAI, OpenAIEmbeddings, ChatOpenAI } from "@langchain/openai"; import { Tool } from "@langchain/core/tools"; import { RunnableSequence } from "@langchain/core/runnables"; import { OutputParserException } from "@langchain/core/o...
langchainjs/langchain/src/agents/tests/agent.int.test.ts/0
{ "file_path": "langchainjs/langchain/src/agents/tests/agent.int.test.ts", "repo_id": "langchainjs", "token_count": 3958 }
916
from llama_index.core.readers.base import BaseReader from llama_index.readers.guru import GuruReader def test_class(): names_of_base_classes = [b.__name__ for b in GuruReader.__mro__] assert BaseReader.__name__ in names_of_base_classes
llama_index/llama-index-integrations/readers/llama-index-readers-guru/tests/test_readers_guru.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-guru/tests/test_readers_guru.py", "repo_id": "llama_index", "token_count": 86 }
1,454
# coding=utf-8 # Copyright 2021 The OpenAI Team Authors, The Google Flax Team 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....
transformers/src/transformers/models/clip/modeling_flax_clip.py/0
{ "file_path": "transformers/src/transformers/models/clip/modeling_flax_clip.py", "repo_id": "transformers", "token_count": 21928 }
579
//! ResNet Building Blocks //! //! Some Residual Network blocks used in UNet models. //! //! Denoising Diffusion Implicit Models, K. He and al, 2015. //! https://arxiv.org/abs/1512.03385 use crate::models::with_tracing::{conv2d, Conv2d}; use candle::{Result, Tensor, D}; use candle_nn as nn; use candle_nn::Module; /// ...
candle/candle-transformers/src/models/stable_diffusion/resnet.rs/0
{ "file_path": "candle/candle-transformers/src/models/stable_diffusion/resnet.rs", "repo_id": "candle", "token_count": 2284 }
83
from llama_index.core.tools.tool_spec.base import BaseToolSpec from llama_index.tools.wolfram_alpha import WolframAlphaToolSpec def test_class(): names_of_base_classes = [b.__name__ for b in WolframAlphaToolSpec.__mro__] assert BaseToolSpec.__name__ in names_of_base_classes
llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/tests/test_tools_wolfram_alpha.py/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/tests/test_tools_wolfram_alpha.py", "repo_id": "llama_index", "token_count": 98 }
1,466
from pathlib import Path from typing import List from langchain_core.documents import Document from langchain_community.document_loaders.base import BaseLoader class NotionDirectoryLoader(BaseLoader): """Load `Notion directory` dump.""" def __init__(self, path: str, *, encoding: str = "utf-8") -> None: ...
langchain/libs/community/langchain_community/document_loaders/notion.py/0
{ "file_path": "langchain/libs/community/langchain_community/document_loaders/notion.py", "repo_id": "langchain", "token_count": 327 }
240
<jupyter_start><jupyter_text>Connect to templateIn `server.py`, set -```add_routes(app, chain_ext, path="/rag_mongo")```<jupyter_code>from langserve.client import RemoteRunnable rag_app_pinecone = RemoteRunnable("http://0.0.0.0:8001/rag_mongo") rag_app_pinecone.invoke("How does agent memory work?")<jupyter_output><emp...
langchain/templates/rag-mongo/rag_mongo.ipynb/0
{ "file_path": "langchain/templates/rag-mongo/rag_mongo.ipynb", "repo_id": "langchain", "token_count": 129 }
702
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/querynodev2/segments/plan_test.go/0
{ "file_path": "milvus/internal/querynodev2/segments/plan_test.go", "repo_id": "milvus", "token_count": 805 }
1,875
<!--- 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 ...
transformers/docs/source/ja/model_memory_anatomy.md/0
{ "file_path": "transformers/docs/source/ja/model_memory_anatomy.md", "repo_id": "transformers", "token_count": 5980 }
532
<jupyter_start><jupyter_text>ERNIE[ERNIE Embedding-V1](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu) is a text representation model based on `Baidu Wenxin` large-scale model technology, which converts text into a vector form represented by numerical values, and is used in text retrieval, information recommend...
langchain/docs/docs/integrations/text_embedding/ernie.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/text_embedding/ernie.ipynb", "repo_id": "langchain", "token_count": 417 }
163
//! Implement conversion traits for tensors use crate::{DType, Device, Error, Tensor, WithDType}; use half::{bf16, f16, slice::HalfFloatSliceExt}; use std::convert::TryFrom; impl<T: WithDType> TryFrom<&Tensor> for Vec<T> { type Error = Error; fn try_from(tensor: &Tensor) -> Result<Self, Self::Error> { ...
candle/candle-core/src/convert.rs/0
{ "file_path": "candle/candle-core/src/convert.rs", "repo_id": "candle", "token_count": 2242 }
37
# Usage Pattern ## Get Started Build a query engine from index: ```python query_engine = index.as_query_engine() ``` ```{tip} To learn how to build an index, see [Indexing](/module_guides/indexing/indexing.md) ``` Ask a question over your data ```python response = query_engine.query("Who is Paul Graham?") ``` ##...
llama_index/docs/module_guides/deploying/query_engine/usage_pattern.md/0
{ "file_path": "llama_index/docs/module_guides/deploying/query_engine/usage_pattern.md", "repo_id": "llama_index", "token_count": 1072 }
1,142
import { authCondition } from "$lib/server/auth"; import { collections } from "$lib/server/database"; import { error } from "@sveltejs/kit"; import { ObjectId } from "mongodb"; import { z } from "zod"; export async function POST({ params, request, locals }) { const { score } = z .object({ score: z.number().int()...
chat-ui/src/routes/conversation/[id]/message/[messageId]/vote/+server.ts/0
{ "file_path": "chat-ui/src/routes/conversation/[id]/message/[messageId]/vote/+server.ts", "repo_id": "chat-ui", "token_count": 337 }
110
import torch import torch.distributed from opentelemetry import trace from transformers import AutoTokenizer, AutoConfig from typing import Optional, List import json import os from huggingface_hub import hf_hub_download from text_generation_server.models import FlashCausalLM from text_generation_server.models.custom...
text-generation-inference/server/text_generation_server/models/flash_santacoder.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/flash_santacoder.py", "repo_id": "text-generation-inference", "token_count": 1285 }
443
from typing import Dict, List, Tuple import pytest from llama_index.core.schema import Document from tests.mock_utils.mock_prompts import ( MOCK_INSERT_PROMPT, MOCK_QUERY_PROMPT, MOCK_REFINE_PROMPT, MOCK_SUMMARY_PROMPT, MOCK_TEXT_QA_PROMPT, ) @pytest.fixture() def documents() -> List[Document]: ...
llama_index/llama-index-core/tests/indices/tree/conftest.py/0
{ "file_path": "llama_index/llama-index-core/tests/indices/tree/conftest.py", "repo_id": "llama_index", "token_count": 472 }
1,316
# Copyright 2024 Ollin Boer Bohan 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 ...
diffusers/src/diffusers/models/autoencoders/autoencoder_tiny.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_tiny.py", "repo_id": "diffusers", "token_count": 6580 }
230
# JIRA Reader The Jira loader returns a set of issues based on the query provided to the dataloader. We can follow two methods to initialize the loader- 1- basic_auth -> this takes a dict with the following keys `basic_auth:{ "email": "email", "api_token": "token", "server_url": "server_url" }` 2- Oauth2 -> this takes...
llama_index/llama-index-integrations/readers/llama-index-readers-jira/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-jira/README.md", "repo_id": "llama_index", "token_count": 377 }
1,369
<!--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/stable_diffusion.md/0
{ "file_path": "diffusers/docs/source/ko/stable_diffusion.md", "repo_id": "diffusers", "token_count": 8949 }
179
{ "background_color": "#ffffff", "name": "HuggingChat", "short_name": "HuggingChat", "display": "standalone", "start_url": "/chat", "icons": [ { "src": "/chat/huggingchat/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, { "src": "/chat/huggingchat/icon-256x256.png", "sizes": "256...
chat-ui/static/huggingchat/manifest.json/0
{ "file_path": "chat-ui/static/huggingchat/manifest.json", "repo_id": "chat-ui", "token_count": 233 }
114
{ "messages": [ { "sender_name": "User 2", "timestamp_ms": 1675597571851, "content": "Bye!" }, { "sender_name": "User 1", "timestamp_ms": 1675597435669, "content": "Oh no worries! Bye" }, { "s...
langchain/libs/community/tests/examples/example.json/0
{ "file_path": "langchain/libs/community/tests/examples/example.json", "repo_id": "langchain", "token_count": 396 }
334
"""ChatYuan2 wrapper.""" from __future__ import annotations import logging from typing import ( TYPE_CHECKING, Any, AsyncIterator, Callable, Dict, Iterator, List, Mapping, Optional, Tuple, Type, Union, ) from langchain_core.callbacks import ( AsyncCallbackManagerFor...
langchain/libs/community/langchain_community/chat_models/yuan2.py/0
{ "file_path": "langchain/libs/community/langchain_community/chat_models/yuan2.py", "repo_id": "langchain", "token_count": 7434 }
247
<jupyter_start><jupyter_text>Pydantic Tree SummarizeIn this notebook, we demonstrate how to use tree summarize with structured outputs. Specifically, tree summarize is used to output pydantic objects. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>!pip install ll...
llama_index/docs/examples/response_synthesizers/custom_prompt_synthesizer.ipynb/0
{ "file_path": "llama_index/docs/examples/response_synthesizers/custom_prompt_synthesizer.ipynb", "repo_id": "llama_index", "token_count": 1318 }
1,105
"""Test DeepInfra API wrapper.""" from langchain_community.embeddings import DeepInfraEmbeddings def test_deepinfra_call() -> None: """Test valid call to DeepInfra.""" deepinfra_emb = DeepInfraEmbeddings(model_id="BAAI/bge-base-en-v1.5") r1 = deepinfra_emb.embed_documents( [ "Alpha is...
langchain/libs/community/tests/integration_tests/embeddings/test_deepinfra.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/embeddings/test_deepinfra.py", "repo_id": "langchain", "token_count": 256 }
330
# coding=utf-8 # Copyright 2021, The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
transformers/tests/models/blenderbot/test_modeling_blenderbot.py/0
{ "file_path": "transformers/tests/models/blenderbot/test_modeling_blenderbot.py", "repo_id": "transformers", "token_count": 10081 }
801
<jupyter_start><jupyter_text>MongoDB Atlas[MongoDB Atlas](https://www.mongodb.com/) is a document database that can be used as a vector databse.In the walkthrough, we'll demo the `SelfQueryRetriever` with a `MongoDB Atlas` vector store. Creating a MongoDB Atlas vectorstoreFirst we'll want to create a MongoDB Atlas Vec...
langchain/docs/docs/integrations/retrievers/self_query/mongodb_atlas.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/retrievers/self_query/mongodb_atlas.ipynb", "repo_id": "langchain", "token_count": 1978 }
156
"""Jira Toolkit."""
langchain/libs/langchain/langchain/agents/agent_toolkits/jira/__init__.py/0
{ "file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/jira/__init__.py", "repo_id": "langchain", "token_count": 8 }
434
import { CohereEmbeddings } from "@langchain/cohere"; /* Embed queries */ const embeddings = new CohereEmbeddings({ apiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.COHERE_API_KEY batchSize: 48, // Default value if omitted is 48. Max value is 96 }); const res = await embeddings.embedQuery("Hello world...
langchainjs/examples/src/models/embeddings/cohere.ts/0
{ "file_path": "langchainjs/examples/src/models/embeddings/cohere.ts", "repo_id": "langchainjs", "token_count": 148 }
835
# Datasets <img class="float-left !m-0 !border-0 !dark:border-0 !shadow-none !max-w-lg w-[150px]" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/datasets_logo.png"/> 🤗 Datasets is a library for easily accessing and sharing datasets for Audio, Computer Vision, and Natural ...
datasets/docs/source/index.mdx/0
{ "file_path": "datasets/docs/source/index.mdx", "repo_id": "datasets", "token_count": 1014 }
132
from langchain_community.tools.eleven_labs.text2speech import ( ElevenLabsText2SpeechTool, ) __all__ = ["ElevenLabsText2SpeechTool"]
langchain/libs/langchain/langchain/tools/eleven_labs/text2speech.py/0
{ "file_path": "langchain/libs/langchain/langchain/tools/eleven_labs/text2speech.py", "repo_id": "langchain", "token_count": 52 }
599
// Copyright (C) 2019-2020 Zilliz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
milvus/internal/core/src/common/RegexQuery.cpp/0
{ "file_path": "milvus/internal/core/src/common/RegexQuery.cpp", "repo_id": "milvus", "token_count": 740 }
1,723
<jupyter_start><jupyter_text>JSON parserThis output parser allows users to specify an arbitrary JSON schema and query LLMs for outputs that conform to that schema.Keep in mind that large language models are leaky abstractions! You'll have to use an LLM with sufficient capacity to generate well-formed JSON. In the OpenA...
langchain/docs/docs/modules/model_io/output_parsers/types/json.ipynb/0
{ "file_path": "langchain/docs/docs/modules/model_io/output_parsers/types/json.ipynb", "repo_id": "langchain", "token_count": 881 }
193
import sys from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union import pandas as pd import pyarrow as pa import datasets import datasets.config from datasets.features.features import require_storage_cast from datasets.table import table_cast if TYPE_CHECKING: im...
datasets/src/datasets/packaged_modules/sql/sql.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/sql/sql.py", "repo_id": "datasets", "token_count": 1963 }
148
import logging from typing import Dict, List, Optional from langchain_core.embeddings import Embeddings from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator from langchain_core.utils import get_from_dict_or_env logger = logging.getLogger(__name__) class ClarifaiEmbeddings(BaseModel, Embeddings): ...
langchain/libs/community/langchain_community/embeddings/clarifai.py/0
{ "file_path": "langchain/libs/community/langchain_community/embeddings/clarifai.py", "repo_id": "langchain", "token_count": 2695 }
268
import { Bedrock } from "langchain/llms/bedrock"; async function test() { const model = new Bedrock({ model: "bedrock-model-name", region: "aws-region", }); const res = await model.call( "Question: What would be a good company name a company that makes colorful socks?\nAnswer:" ); console.log(res...
langchainjs/examples/src/llms/bedrock.js/0
{ "file_path": "langchainjs/examples/src/llms/bedrock.js", "repo_id": "langchainjs", "token_count": 113 }
836
import { GradientLLM } from "@langchain/community/llms/gradient_ai"; // Note that inferenceParameters are optional const model = new GradientLLM({ modelSlug: "llama2-7b-chat", inferenceParameters: { maxGeneratedTokenCount: 20, temperature: 0, }, }); const res = await model.invoke( "What would be a good...
langchainjs/examples/src/llms/gradient_ai-base.ts/0
{ "file_path": "langchainjs/examples/src/llms/gradient_ai-base.ts", "repo_id": "langchainjs", "token_count": 125 }
857
<!--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/zero_shot_image_classification.md/0
{ "file_path": "transformers/docs/source/ja/tasks/zero_shot_image_classification.md", "repo_id": "transformers", "token_count": 2709 }
499
from llama_index.core.llama_pack import BaseLlamaPack from llama_index.packs.fusion_retriever import ( HybridFusionRetrieverPack, QueryRewritingRetrieverPack, ) def test_class(): names_of_base_classes = [b.__name__ for b in HybridFusionRetrieverPack.__mro__] assert BaseLlamaPack.__name__ in names_of_b...
llama_index/llama-index-packs/llama-index-packs-fusion-retriever/tests/test_packs_fusion_retriever.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-fusion-retriever/tests/test_packs_fusion_retriever.py", "repo_id": "llama_index", "token_count": 183 }
1,703
<script lang="ts"> export let classNames = ""; export let label = "Copied"; export let position = "left-1/2 top-full transform -translate-x-1/2 translate-y-2"; </script> <div class=" pointer-events-none absolute rounded bg-black px-2 py-1 font-normal leading-tight text-white shadow transition-opacity {position...
chat-ui/src/lib/components/Tooltip.svelte/0
{ "file_path": "chat-ui/src/lib/components/Tooltip.svelte", "repo_id": "chat-ui", "token_count": 216 }
96
# LoftQ: LoRA-fine-tuning-aware Quantization ## Introduction LoftQ finds quantized LoRA initialization: quantized backbone Q and LoRA adapters A and B, given a pre-trained weight W. ## Quick Start Steps: 1. Apply LoftQ to a full-precision pre-trained weight and save. 2. Load LoftQ initialization and train. For ste...
peft/examples/loftq_finetuning/README.md/0
{ "file_path": "peft/examples/loftq_finetuning/README.md", "repo_id": "peft", "token_count": 1880 }
328
from typing import Sequence import pytest from llama_index.legacy.core.llms.types import ChatMessage, MessageRole from llama_index.legacy.llms.llama_utils import ( B_INST, B_SYS, BOS, DEFAULT_SYSTEM_PROMPT, E_INST, E_SYS, EOS, completion_to_prompt, messages_to_prompt, ) @pytest.fi...
llama_index/llama-index-legacy/tests/llms/test_llama_utils.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/llms/test_llama_utils.py", "repo_id": "llama_index", "token_count": 2625 }
1,746
// Defines 17 standard error codes based on the error codes defined in the // gRPC spec. https://grpc.github.io/grpc/core/md_doc_statuscodes.html // Custom errors can use these codes in order to allow for generic handling use std::error::Error; pub(crate) enum ErrorCodes { // OK is returned on success, we use "Su...
chroma/rust/worker/src/errors.rs/0
{ "file_path": "chroma/rust/worker/src/errors.rs", "repo_id": "chroma", "token_count": 652 }
57
// 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/import_manager.go/0
{ "file_path": "milvus/internal/rootcoord/import_manager.go", "repo_id": "milvus", "token_count": 15165 }
2,002
async function test() { const { default: assert } = await import("assert"); const { OpenAI } = await import("langchain/llms/openai"); const { LLMChain } = await import("langchain/chains"); const { ChatPromptTemplate } = await import("langchain/prompts"); const { loadPrompt } = await import("langchain/prompts/...
langchainjs/environment_tests/test-exports-cjs/src/import.js/0
{ "file_path": "langchainjs/environment_tests/test-exports-cjs/src/import.js", "repo_id": "langchainjs", "token_count": 617 }
805
"""Test json index.""" import asyncio import json from typing import Any, Dict, cast from unittest.mock import patch import pytest from llama_index.legacy.core.response.schema import Response from llama_index.legacy.indices.struct_store.json_query import ( JSONQueryEngine, JSONType, ) from llama_index.legacy....
llama_index/llama-index-legacy/tests/indices/struct_store/test_json_query.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/indices/struct_store/test_json_query.py", "repo_id": "llama_index", "token_count": 1041 }
1,622
from typing import Any, Optional class LangChainException(Exception): """General LangChain exception.""" class TracerException(LangChainException): """Base class for exceptions in tracers module.""" class OutputParserException(ValueError, LangChainException): """Exception that output parsers should ra...
langchain/libs/core/langchain_core/exceptions.py/0
{ "file_path": "langchain/libs/core/langchain_core/exceptions.py", "repo_id": "langchain", "token_count": 683 }
412
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: sentencepiece_model.proto # 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 th...
transformers/src/transformers/utils/sentencepiece_model_pb2.py/0
{ "file_path": "transformers/src/transformers/utils/sentencepiece_model_pb2.py", "repo_id": "transformers", "token_count": 28261 }
692
--- sidebar_class_name: node-only --- # Milvus [Milvus](https://milvus.io/) is a vector database built for embeddings similarity search and AI applications. :::tip Compatibility Only available on Node.js. ::: ## Setup 1. Run Milvus instance with Docker on your computer [docs](https://milvus.io/docs/v2.1.x/install_...
langchainjs/docs/core_docs/docs/integrations/vectorstores/milvus.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/milvus.mdx", "repo_id": "langchainjs", "token_count": 1197 }
774
"""Util that calls Twilio.""" from typing import Any, Dict, Optional from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator from langchain_core.utils import get_from_dict_or_env class TwilioAPIWrapper(BaseModel): """Messaging Client using Twilio. To use, you should have the ``twilio`` pytho...
langchain/libs/community/langchain_community/utilities/twilio.py/0
{ "file_path": "langchain/libs/community/langchain_community/utilities/twilio.py", "repo_id": "langchain", "token_count": 1468 }
323
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.together import TogetherEmbedding def test_embedding_class(): emb = TogetherEmbedding(model_name="fake_model_name", api_key="fake key") assert isinstance(emb, BaseEmbedding)
llama_index/llama-index-integrations/embeddings/llama-index-embeddings-together/tests/test_embeddings_together.py/0
{ "file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-together/tests/test_embeddings_together.py", "repo_id": "llama_index", "token_count": 91 }
1,258
# File Directory This covers how to load all documents in a directory. The second argument is a map of file extensions to loader factories. Each file will be passed to the matching loader, and the resulting documents will be concatenated together. Example folder: ```text src/document_loaders/example_data/example/ ├...
langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/file_directory.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/file_directory.mdx", "repo_id": "langchainjs", "token_count": 345 }
761
python_tests()
llama_index/llama-index-integrations/readers/llama-index-readers-firestore/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-firestore/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,367
# coding=utf-8 # Copyright 2023 IBM and HuggingFace Inc. team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
transformers/src/transformers/models/patchtsmixer/modeling_patchtsmixer.py/0
{ "file_path": "transformers/src/transformers/models/patchtsmixer/modeling_patchtsmixer.py", "repo_id": "transformers", "token_count": 38159 }
643
import abc from abc import ABC from typing import Any, Dict, Optional import torch class Scheduler(ABC): """ Parameter Scheduler Base Class A scheduler base class that can be used to schedule any optimizer parameter groups. Unlike the builtin PyTorch schedulers, this is intended to be consistently calle...
pytorch-image-models/timm/scheduler/scheduler.py/0
{ "file_path": "pytorch-image-models/timm/scheduler/scheduler.py", "repo_id": "pytorch-image-models", "token_count": 2361 }
395
# 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/pop2piano/test_processor_pop2piano.py/0
{ "file_path": "transformers/tests/models/pop2piano/test_processor_pop2piano.py", "repo_id": "transformers", "token_count": 4029 }
763
"""Chat Model Components Derived from ChatModel/NVIDIA""" from __future__ import annotations import base64 import io import logging import os import sys import urllib.parse from typing import ( Any, AsyncIterator, Dict, Iterator, List, Mapping, Optional, Sequence, Union, ) import ...
langchain/libs/partners/nvidia-ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py/0
{ "file_path": "langchain/libs/partners/nvidia-ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py", "repo_id": "langchain", "token_count": 5173 }
672
<!--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 to...
transformers/docs/source/ko/peft.md/0
{ "file_path": "transformers/docs/source/ko/peft.md", "repo_id": "transformers", "token_count": 5049 }
559
from time import sleep from langchain_core.documents import Document from langchain_community.vectorstores import DashVector from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings texts = ["foo", "bar", "baz"] ids = ["1", "2", "3"] def test_dashvector_from_texts() -> None: dashvector =...
langchain/libs/community/tests/integration_tests/vectorstores/test_dashvector.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_dashvector.py", "repo_id": "langchain", "token_count": 897 }
384
<!--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/dpr.md/0
{ "file_path": "transformers/docs/source/en/model_doc/dpr.md", "repo_id": "transformers", "token_count": 1170 }
453
{ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "5.3.1" } }
chroma/clients/js/openapitools.json/0
{ "file_path": "chroma/clients/js/openapitools.json", "repo_id": "chroma", "token_count": 71 }
31
/* eslint-disable import/no-extraneous-dependencies */ import { execSync } from "child_process"; import fs from "fs"; import path from "path"; function isInGitRepository(): boolean { try { execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" }); return true; } catch (_) {} return false; } f...
langchainjs/libs/create-langchain-integration/helpers/git.ts/0
{ "file_path": "langchainjs/libs/create-langchain-integration/helpers/git.ts", "repo_id": "langchainjs", "token_count": 556 }
1,008
--- TODO: Add YAML tags here. Copy-paste the tags obtained with the online tagging app: https://huggingface.co/spaces/huggingface/datasets-tagging --- # Dataset Card for [Dataset Name] ## Table of Contents - [Table of Contents](#table-of-contents) - [Dataset Description](#dataset-description) - [Dataset Summary](#d...
datasets/templates/README.md/0
{ "file_path": "datasets/templates/README.md", "repo_id": "datasets", "token_count": 810 }
138
--- sidebar_class_name: hidden --- import CodeBlock from "@theme/CodeBlock"; import DebuggingExample from "@examples/agents/mrkl.ts"; # Logging and tracing You can pass the `verbose` flag when creating an agent to enable logging of all events to the console. For example: You can also enable [tracing](/docs/producti...
langchainjs/docs/core_docs/docs/modules/agents/how_to/logging_and_tracing.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/agents/how_to/logging_and_tracing.mdx", "repo_id": "langchainjs", "token_count": 195 }
755
from typing import List, Optional, Union from langchain_core.chat_history import BaseChatMessageHistory from langchain_core.messages import BaseMessage, messages_from_dict from langchain_core.utils import get_from_env class Neo4jChatMessageHistory(BaseChatMessageHistory): """Chat message history stored in a Neo4...
langchain/libs/community/langchain_community/chat_message_histories/neo4j.py/0
{ "file_path": "langchain/libs/community/langchain_community/chat_message_histories/neo4j.py", "repo_id": "langchain", "token_count": 1993 }
222