text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# LlamaIndex Embeddings Integration: Jinaai
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,190 |
from typing import Any, List
from unittest.mock import Mock, patch
from llama_index.legacy.chat_engine.condense_plus_context import (
CondensePlusContextChatEngine,
)
from llama_index.legacy.indices.base_retriever import BaseRetriever
from llama_index.legacy.indices.service_context import ServiceContext
from llama... | llama_index/llama-index-legacy/tests/chat_engine/test_condense_plus_context.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/chat_engine/test_condense_plus_context.py",
"repo_id": "llama_index",
"token_count": 1750
} | 1,657 |
.. _Ref-Chat-Engines:
Chat Engines
=================
Chat engine is a high-level interface for having a conversation with your data
(multiple back-and-forth instead of a single question & answer).
Chat Engine Implementations
^^^^^^^^^^^^^^^^^^^^^
Below we show specific chat engine implementations.
.. toctree::
:... | llama_index/docs/api_reference/query/chat_engines.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/chat_engines.rst",
"repo_id": "llama_index",
"token_count": 199
} | 1,078 |
from __future__ import annotations
import logging
from typing import (
Any,
Callable,
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
from requests... | langchain/libs/community/langchain_community/embeddings/dashscope.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/dashscope.py",
"repo_id": "langchain",
"token_count": 2282
} | 256 |
# Auto-generated API documentation for LangChainJS
Do not edit the contents of this directory directly.
## Usage
To build the API refs run `yarn build` from the root of this directory, then `yarn dev` or `yarn start` to serve the docs locally.
This app uses [Typedoc](https://typedoc.org/) to generate API references ... | langchainjs/docs/api_refs/README.md/0 | {
"file_path": "langchainjs/docs/api_refs/README.md",
"repo_id": "langchainjs",
"token_count": 169
} | 699 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.openai import OpenAI
def test_text_inference_embedding_class():
names_of_base_classes = [b.__name__ for b in OpenAI.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-openai/tests/test_llms_openai.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-openai/tests/test_llms_openai.py",
"repo_id": "llama_index",
"token_count": 96
} | 1,414 |
# Metric Card for SacreBLEU
## Metric Description
SacreBLEU provides hassle-free computation of shareable, comparable, and reproducible BLEU scores. Inspired by Rico Sennrich's `multi-bleu-detok.perl`, it produces the official Workshop on Machine Translation (WMT) scores but works with plain text. It also knows all t... | datasets/metrics/sacrebleu/README.md/0 | {
"file_path": "datasets/metrics/sacrebleu/README.md",
"repo_id": "datasets",
"token_count": 1692
} | 133 |
<jupyter_start><jupyter_text>Gutenberg>[Project Gutenberg](https://www.gutenberg.org/about/) is an online library of free eBooks.This notebook covers how to load links to `Gutenberg` e-books into a document format that we can use downstream.<jupyter_code>from langchain_community.document_loaders import GutenbergLoader
... | langchain/docs/docs/integrations/document_loaders/gutenberg.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/gutenberg.ipynb",
"repo_id": "langchain",
"token_count": 152
} | 112 |
import asyncio
import json
from typing import Any, Dict
import pytest
from langchain_community.tools.requests.tool import (
RequestsDeleteTool,
RequestsGetTool,
RequestsPatchTool,
RequestsPostTool,
RequestsPutTool,
_parse_input,
)
from langchain_community.utilities.requests import (
JsonRe... | langchain/libs/community/tests/unit_tests/tools/requests/test_tool.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/tools/requests/test_tool.py",
"repo_id": "langchain",
"token_count": 2793
} | 404 |
# SEC DATA DOWNLOADER
Please checkout this repo that I am building on SEC Question Answering Agent [SEC-QA](https://github.com/Athe-kunal/SEC-QA-Agent)
This repository downloads all the texts from SEC documents (10-K and 10-Q). Currently, it is not supporting documents that are amended, but that will be added in the ... | llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/README.md",
"repo_id": "llama_index",
"token_count": 1228
} | 1,437 |
#!/usr/bin/env python3
import json
import logging
import os
import re
import sys
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
import datasets
import numpy as np
import torch
import torchaudio
from packaging import version
from torch import nn
import transformers
from tr... | transformers/examples/research_projects/wav2vec2/run_common_voice.py/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/run_common_voice.py",
"repo_id": "transformers",
"token_count": 8137
} | 607 |
// 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/compaction_executor_test.go/0 | {
"file_path": "milvus/internal/datanode/compaction_executor_test.go",
"repo_id": "milvus",
"token_count": 1524
} | 1,800 |
# coding=utf-8
# Copyright 2020 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/luke/convert_luke_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/luke/convert_luke_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 2877
} | 707 |
# coding=utf-8
# Copyright Meta Platforms 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.... | transformers/src/transformers/models/data2vec/configuration_data2vec_vision.py/0 | {
"file_path": "transformers/src/transformers/models/data2vec/configuration_data2vec_vision.py",
"repo_id": "transformers",
"token_count": 3576
} | 585 |
export { createStuffDocumentsChain } from "./stuff.js";
| langchainjs/langchain/src/chains/combine_documents/index.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/combine_documents/index.ts",
"repo_id": "langchainjs",
"token_count": 16
} | 850 |
import http.client
import json
from typing import Any, Dict, List, Optional, TypedDict
WRITE_KEY = "310apTK0HUFl4AOv"
class EventDict(TypedDict):
event: str
properties: Optional[Dict[str, Any]]
def create_events(events: List[EventDict]) -> Optional[Any]:
try:
data = {
"events": [
... | langchain/libs/cli/langchain_cli/utils/events.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/utils/events.py",
"repo_id": "langchain",
"token_count": 478
} | 207 |
# 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/image_processing_videomae.py/0 | {
"file_path": "transformers/src/transformers/models/videomae/image_processing_videomae.py",
"repo_id": "transformers",
"token_count": 7052
} | 734 |
"""Light weight unit test that attempts to import MongodbStore.
The actual code is tested in integration tests.
This test is intended to catch errors in the import process.
"""
def test_import_storage() -> None:
"""Attempt to import storage modules."""
from langchain_community.storage.mongodb import MongoDB... | langchain/libs/community/tests/unit_tests/storage/test_mongodb.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/storage/test_mongodb.py",
"repo_id": "langchain",
"token_count": 89
} | 422 |
# coding=utf-8
# Copyright 2023 The Intel Labs Team Authors, The Microsoft Research Team Authors 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 a... | transformers/tests/models/bridgetower/test_image_processing_bridgetower.py/0 | {
"file_path": "transformers/tests/models/bridgetower/test_image_processing_bridgetower.py",
"repo_id": "transformers",
"token_count": 2508
} | 803 |
# MobileNet v3
**MobileNetV3** is a convolutional neural network that is designed for mobile phone CPUs. The network design includes the use of a [hard swish activation](https://paperswithcode.com/method/hard-swish) and [squeeze-and-excitation](https://paperswithcode.com/method/squeeze-and-excitation-block) modules in... | pytorch-image-models/hfdocs/source/models/mobilenet-v3.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/mobilenet-v3.mdx",
"repo_id": "pytorch-image-models",
"token_count": 2579
} | 362 |
# 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/clip/processing_clip.py/0 | {
"file_path": "transformers/src/transformers/models/clip/processing_clip.py",
"repo_id": "transformers",
"token_count": 2649
} | 648 |
from llama_index.packs.voyage_query_engine.base import VoyageQueryEnginePack
__all__ = ["VoyageQueryEnginePack"]
| llama_index/llama-index-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/__init__.py",
"repo_id": "llama_index",
"token_count": 37
} | 1,696 |
package datanode
import (
"sync"
"github.com/milvus-io/milvus/pkg/util/conc"
"github.com/milvus-io/milvus/pkg/util/hardware"
)
var (
ioPool *conc.Pool[any]
ioPoolInitOnce sync.Once
)
var (
statsPool *conc.Pool[any]
statsPoolInitOnce sync.Once
)
func initIOPool() {
capacity := Params.DataNod... | milvus/internal/datanode/io_pool.go/0 | {
"file_path": "milvus/internal/datanode/io_pool.go",
"repo_id": "milvus",
"token_count": 512
} | 1,703 |
<jupyter_start><jupyter_text>OpenAI Embeddings If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-openai
!pip install llama-index
import os
os.environ["OPENAI_API_KEY"] = "sk-..."
from llama_index.embeddings.openai import OpenAIEm... | llama_index/docs/examples/embeddings/OpenAI.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/OpenAI.ipynb",
"repo_id": "llama_index",
"token_count": 607
} | 1,077 |
# 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/pipelines/test_pipelines_text_to_audio.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_text_to_audio.py",
"repo_id": "transformers",
"token_count": 3815
} | 831 |
import { defaultProvider } from "@aws-sdk/credential-provider-node";
import type { BaseLLMParams } from "@langchain/core/language_models/llms";
import { BaseBedrockInput } from "../../utils/bedrock.js";
import { Bedrock as BaseBedrock } from "./web.js";
export class Bedrock extends BaseBedrock {
static lc_name() {
... | langchainjs/libs/langchain-community/src/llms/bedrock/index.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/bedrock/index.ts",
"repo_id": "langchainjs",
"token_count": 178
} | 1,025 |
python_sources()
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/pymu_pdf/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/pymu_pdf/BUILD",
"repo_id": "llama_index",
"token_count": 24
} | 1,363 |
# coding=utf-8
# Copyright 2023 The Fairseq Authors, 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... | transformers/src/transformers/models/speecht5/modeling_speecht5.py/0 | {
"file_path": "transformers/src/transformers/models/speecht5/modeling_speecht5.py",
"repo_id": "transformers",
"token_count": 66586
} | 658 |
# 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/models/dpr/convert_dpr_original_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/dpr/convert_dpr_original_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 2447
} | 626 |
"""OneDrive files reader."""
import logging
import os
import tempfile
import time
from typing import Any, Dict, List, Optional
import requests
from llama_index.core.readers import SimpleDirectoryReader
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
logger = logging.... | llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-onedrive/llama_index/readers/microsoft_onedrive/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-onedrive/llama_index/readers/microsoft_onedrive/base.py",
"repo_id": "llama_index",
"token_count": 9140
} | 1,482 |
from langchain_community.embeddings.google_palm import (
GooglePalmEmbeddings,
)
__all__ = ["GooglePalmEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/google_palm.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/google_palm.py",
"repo_id": "langchain",
"token_count": 44
} | 523 |
"""Decorator for creating a run tree from functions."""
from __future__ import annotations
import contextlib
import contextvars
import datetime
import functools
import inspect
import logging
import traceback
import uuid
import warnings
from typing import (
TYPE_CHECKING,
Any,
AsyncGenerator,
Awaitable... | langsmith-sdk/python/langsmith/run_helpers.py/0 | {
"file_path": "langsmith-sdk/python/langsmith/run_helpers.py",
"repo_id": "langsmith-sdk",
"token_count": 13970
} | 1,021 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/core/llms/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/core/llms/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,697 |
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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
#
# U... | transformers/src/transformers/models/esm/openfold_utils/rigid_utils.py/0 | {
"file_path": "transformers/src/transformers/models/esm/openfold_utils/rigid_utils.py",
"repo_id": "transformers",
"token_count": 19454
} | 632 |
#!/usr/bin/env bash
set -e
export CHROMA_PORT=8000
function cleanup {
docker compose -f docker-compose.test.yml down --rmi local --volumes
rm server.htpasswd .chroma_env
}
function setup_auth {
local auth_type="$1"
case "$auth_type" in
basic)
docker run --rm --entrypoint htpasswd httpd:2 -Bbn admi... | chroma/bin/integration-test/0 | {
"file_path": "chroma/bin/integration-test",
"repo_id": "chroma",
"token_count": 880
} | 10 |
import { refreshSessionCookie } from "$lib/server/auth";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { DEFAULT_SETTINGS } from "$lib/types/Settings";
import { z } from "zod";
import type { UserinfoResponse } from "openid-client";
import { error, type Cookies } from "@s... | chat-ui/src/routes/login/callback/updateUser.ts/0 | {
"file_path": "chat-ui/src/routes/login/callback/updateUser.ts",
"repo_id": "chat-ui",
"token_count": 1216
} | 111 |
import { GithubRepoLoader } from "langchain/document_loaders/web/github";
export const run = async () => {
const loader = new GithubRepoLoader(
"https://github.com/langchain-ai/langchainjs",
{
branch: "main",
recursive: true,
processSubmodules: true,
unknown: "warn",
}
);
cons... | langchainjs/examples/src/document_loaders/github_submodules.ts/0 | {
"file_path": "langchainjs/examples/src/document_loaders/github_submodules.ts",
"repo_id": "langchainjs",
"token_count": 140
} | 766 |
// 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/bloom_filter_set_test.go/0 | {
"file_path": "milvus/internal/querynodev2/segments/bloom_filter_set_test.go",
"repo_id": "milvus",
"token_count": 884
} | 1,873 |
from llama_index.packs.sentence_window_retriever.base import SentenceWindowRetrieverPack
__all__ = ["SentenceWindowRetrieverPack"]
| llama_index/llama-index-packs/llama-index-packs-sentence-window-retriever/llama_index/packs/sentence_window_retriever/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-sentence-window-retriever/llama_index/packs/sentence_window_retriever/__init__.py",
"repo_id": "llama_index",
"token_count": 42
} | 1,871 |
import { cn } from "../utils/cn";
const COMMON_CLS = cn(
"text-lg col-[1] row-[1] m-0 resize-none overflow-hidden whitespace-pre-wrap break-words border-none bg-transparent p-0"
);
export function AutosizeTextarea(props: {
id?: string;
value?: string | null | undefined;
placeholder?: string;
className?: str... | langserve/langserve/playground/src/components/AutosizeTextarea.tsx/0 | {
"file_path": "langserve/langserve/playground/src/components/AutosizeTextarea.tsx",
"repo_id": "langserve",
"token_count": 644
} | 1,000 |
---
sidebar_class_name: node-only
hide_table_of_contents: true
---
# Recursive URL Loader
When loading content from a website, we may want to process load all URLs on a page.
For example, let's look at the [LangChain.js introduction](https://js.langchain.com/docs/get_started/introduction) docs.
This has many intere... | langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/recursive_url_loader.mdx",
"repo_id": "langchainjs",
"token_count": 777
} | 760 |
import argparse
import inspect
import os
import time
import warnings
from typing import Any, Callable, Dict, List, Optional, Union
import numpy as np
import PIL.Image
import torch
from PIL import Image
from transformers import CLIPTokenizer
from diffusers import OnnxRuntimeModel, StableDiffusionImg2ImgPipeline, UniPC... | diffusers/examples/community/run_onnx_controlnet.py/0 | {
"file_path": "diffusers/examples/community/run_onnx_controlnet.py",
"repo_id": "diffusers",
"token_count": 19745
} | 214 |
// 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/segcore/segment_c.h/0 | {
"file_path": "milvus/internal/core/src/segcore/segment_c.h",
"repo_id": "milvus",
"token_count": 1652
} | 1,801 |
# langchain-template-supabase > supabase
To invoke the function locally
```bash
curl -i --location --request POST 'http://localhost:50321/functions/v1/chat' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXx... | langchain-template-supabase/supabase/README.md/0 | {
"file_path": "langchain-template-supabase/supabase/README.md",
"repo_id": "langchain-template-supabase",
"token_count": 213
} | 66 |
from langchain_community.document_loaders.epub import UnstructuredEPubLoader
__all__ = ["UnstructuredEPubLoader"]
| langchain/libs/langchain/langchain/document_loaders/epub.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/epub.py",
"repo_id": "langchain",
"token_count": 35
} | 483 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/mobilevit/convert_mlcvnets_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/mobilevit/convert_mlcvnets_to_pytorch.py",
"repo_id": "transformers",
"token_count": 5868
} | 701 |
"""MistralAI embeddings file."""
from typing import Any, List, Optional
from llama_index.legacy.bridge.pydantic import PrivateAttr
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.core.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
)
from llama_index.leg... | llama_index/llama-index-legacy/llama_index/legacy/embeddings/mistralai.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/embeddings/mistralai.py",
"repo_id": "llama_index",
"token_count": 1835
} | 1,702 |
# Migrating from ServiceContext to Settings
Introduced in v0.10.0, there is a new global `Settings` object intended to replace the old `ServiceContext` configuration.
The new `Settings` object is a global settings, with parameters that are lazily instantiated. Attributes like the LLM or embedding model are only loade... | llama_index/docs/module_guides/supporting_modules/service_context_migration.md/0 | {
"file_path": "llama_index/docs/module_guides/supporting_modules/service_context_migration.md",
"repo_id": "llama_index",
"token_count": 957
} | 1,148 |
use super::quantized_blip_text as blip_text;
use crate::quantized_nn::{layer_norm, linear, Linear};
pub use crate::quantized_var_builder::VarBuilder;
use candle::{Module, Result, Tensor, D};
use candle_nn::{Conv2d, Conv2dConfig, LayerNorm};
pub type VisionConfig = super::blip::VisionConfig;
pub type Config = super::bl... | candle/candle-transformers/src/models/quantized_blip.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_blip.rs",
"repo_id": "candle",
"token_count": 4013
} | 68 |
from langchain_community.chat_models.pai_eas_endpoint import PaiEasChatEndpoint
__all__ = ["PaiEasChatEndpoint"]
| langchain/libs/langchain/langchain/chat_models/pai_eas_endpoint.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chat_models/pai_eas_endpoint.py",
"repo_id": "langchain",
"token_count": 39
} | 519 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/job/job_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/job/job_test.go",
"repo_id": "milvus",
"token_count": 16265
} | 1,754 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/vilt/convert_vilt_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/vilt/convert_vilt_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 5690
} | 668 |
import { AgentExecutor } from "langchain/agents";
import { formatLogToString } from "langchain/agents/format_scratchpad/log";
import { ChatOpenAI } from "@langchain/openai";
import { Calculator } from "langchain/tools/calculator";
import { PromptTemplate } from "@langchain/core/prompts";
import { AgentAction, AgentFini... | langchainjs/examples/src/agents/custom_llm_agent_chat_runnable.ts/0 | {
"file_path": "langchainjs/examples/src/agents/custom_llm_agent_chat_runnable.ts",
"repo_id": "langchainjs",
"token_count": 1693
} | 782 |
"""LangChain **Runnable** and the **LangChain Expression Language (LCEL)**.
The LangChain Expression Language (LCEL) offers a declarative method to build
production-grade programs that harness the power of LLMs.
Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, a... | langchain/libs/core/langchain_core/runnables/__init__.py/0 | {
"file_path": "langchain/libs/core/langchain_core/runnables/__init__.py",
"repo_id": "langchain",
"token_count": 794
} | 406 |
"""Attempt to implement MRKL systems as described in arxiv.org/pdf/2205.00445.pdf."""
| langchain/libs/langchain/langchain/agents/mrkl/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/mrkl/__init__.py",
"repo_id": "langchain",
"token_count": 29
} | 468 |
from typing import List, Tuple, Type
from llama_index.core import Document
from llama_index.core.download.dataset import (
LLAMA_DATASETS_LFS_URL,
LLAMA_DATASETS_SOURCE_FILES_GITHUB_TREE_URL,
)
from llama_index.core.download.dataset import download_llama_dataset as download
from llama_index.core.download.modul... | llama_index/llama-index-core/llama_index/core/llama_dataset/download.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llama_dataset/download.py",
"repo_id": "llama_index",
"token_count": 1539
} | 1,188 |
<jupyter_start><jupyter_text>Source CodeThis notebook covers how to load source code files using a special approach with language parsing: each top-level function and class in the code is loaded into separate documents. Any remaining code top-level code outside the already loaded functions and classes will be loaded in... | langchain/docs/docs/integrations/document_loaders/source_code.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/source_code.ipynb",
"repo_id": "langchain",
"token_count": 1400
} | 111 |
{ "graph_dict": {} }
| llama_index/llama-index-core/storage/graph_store.json/0 | {
"file_path": "llama_index/llama-index-core/storage/graph_store.json",
"repo_id": "llama_index",
"token_count": 9
} | 1,306 |
# Congratulations
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/communication/thumbnail.png" alt="Thumbnail"/>
**Congratulations on finishing this course!** With perseverance, hard work, and determination, **you've acquired a solid background in Deep Reinforcement... | deep-rl-class/units/en/communication/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/communication/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 364
} | 154 |
"""**Chat Models** are a variation on language models.
While Chat Models use language models under the hood, the interface they expose
is a bit different. Rather than expose a "text in, text out" API, they expose
an interface where "chat messages" are the inputs and outputs.
**Class hierarchy:**
.. code-block::
... | langchain/libs/experimental/langchain_experimental/chat_models/__init__.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/chat_models/__init__.py",
"repo_id": "langchain",
"token_count": 206
} | 415 |
insert_performance:
collections:
-
milvus:
db_config.primary_path: /test/milvus/db_data_011/cluster/sift_1b_128_l2_sq8
cache_config.cpu_cache_capacity: 16GB
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 1
gpu_resource_config.enable: true
... | milvus/tests/benchmark/milvus_benchmark/suites/011_insert_debug.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/011_insert_debug.yaml",
"repo_id": "milvus",
"token_count": 376
} | 2,146 |
# Copyright 2022 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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.... | datasets/metrics/mae/mae.py/0 | {
"file_path": "datasets/metrics/mae/mae.py",
"repo_id": "datasets",
"token_count": 1662
} | 130 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py",
"repo_id": "transformers",
"token_count": 2176
} | 618 |
<jupyter_start><jupyter_text>Extraction with OpenAI ToolsPerforming extraction has never been easier! OpenAI's tool calling ability is the perfect thing to use as it allows for extracting multiple different elements from text that are different types. Models after 1106 use tools and support "parallel function calling" ... | langchain/cookbook/extraction_openai_tools.ipynb/0 | {
"file_path": "langchain/cookbook/extraction_openai_tools.ipynb",
"repo_id": "langchain",
"token_count": 364
} | 71 |
<jupyter_start><jupyter_text>AgentsYou can pass a Runnable into an agent.<jupyter_code>from langchain import hub
from langchain.agents import AgentExecutor, tool
from langchain.agents.output_parsers import XMLAgentOutputParser
from langchain_community.chat_models import ChatAnthropic
model = ChatAnthropic(model="claude... | langchain/docs/docs/expression_language/cookbook/agent.ipynb/0 | {
"file_path": "langchain/docs/docs/expression_language/cookbook/agent.ipynb",
"repo_id": "langchain",
"token_count": 847
} | 89 |
from typing import Any, List, Optional
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.utilities.arxiv import ArxivAPIWrapper
class ArxivLoader(BaseLoader):
"""Load a query result from `Arxiv`.
The loader converts the o... | langchain/libs/community/langchain_community/document_loaders/arxiv.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/arxiv.py",
"repo_id": "langchain",
"token_count": 336
} | 225 |
"""DocumentFilter that uses an LLM chain to extract the relevant parts of documents."""
from __future__ import annotations
import asyncio
from typing import Any, Callable, Dict, Optional, Sequence, cast
from langchain_core.documents import Document
from langchain_core.language_models import BaseLanguageModel
from lan... | langchain/libs/langchain/langchain/retrievers/document_compressors/chain_extract.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/document_compressors/chain_extract.py",
"repo_id": "langchain",
"token_count": 1567
} | 530 |
import pytest
import re
import time
import pymilvus
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
from common.milvus_sys import MilvusSys
from utils.util_pymilvus import *
from deploy.base import TestDeployBase
from deploy.common import ge... | milvus/tests/python_client/deploy/testcases/test_action_second_deployment.py/0 | {
"file_path": "milvus/tests/python_client/deploy/testcases/test_action_second_deployment.py",
"repo_id": "milvus",
"token_count": 6131
} | 1,907 |
# Helicone
This page covers how to use the [Helicone](https://helicone.ai) ecosystem within LangChain.
## What is Helicone?
Helicone is an [open-source](https://github.com/Helicone/helicone) observability platform that proxies your OpenAI traffic and provides you key insights into your spend, latency and usage.
![S... | langchain/docs/docs/integrations/providers/helicone.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/helicone.mdx",
"repo_id": "langchain",
"token_count": 583
} | 146 |
package writebuffer
import (
"context"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
"github.com/milvus-io/milvus/internal/allocator"
"github.com/milvus-io/milvus/internal/datanode/metacache"
"github.com/milvus-io/milvus/internal/d... | milvus/internal/datanode/writebuffer/l0_write_buffer.go/0 | {
"file_path": "milvus/internal/datanode/writebuffer/l0_write_buffer.go",
"repo_id": "milvus",
"token_count": 2316
} | 1,811 |
from llama_index.readers.clickhouse.base import (
ClickHouseReader,
escape_str,
format_list_to_string,
)
__all__ = ["ClickHouseReader", "escape_str", "format_list_to_string"]
| llama_index/llama-index-integrations/readers/llama-index-readers-clickhouse/llama_index/readers/clickhouse/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-clickhouse/llama_index/readers/clickhouse/__init__.py",
"repo_id": "llama_index",
"token_count": 71
} | 1,416 |
# 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/training_args.py/0 | {
"file_path": "transformers/src/transformers/training_args.py",
"repo_id": "transformers",
"token_count": 59778
} | 785 |
from pathlib import Path
import pytest
from llama_index.core.storage.kvstore.simple_kvstore import SimpleKVStore
@pytest.fixture()
def kvstore_with_data(simple_kvstore: SimpleKVStore) -> SimpleKVStore:
test_key = "test_key"
test_blob = {"test_obj_key": "test_obj_val"}
simple_kvstore.put(test_key, test_bl... | llama_index/llama-index-core/tests/storage/kvstore/test_simple_kvstore.py/0 | {
"file_path": "llama_index/llama-index-core/tests/storage/kvstore/test_simple_kvstore.py",
"repo_id": "llama_index",
"token_count": 514
} | 1,328 |
use onig::Regex;
use pyo3::exceptions;
use pyo3::prelude::*;
/// Instantiate a new Regex with the given pattern
#[pyclass(module = "tokenizers", name = "Regex")]
pub struct PyRegex {
pub inner: Regex,
pub pattern: String,
}
#[pymethods]
impl PyRegex {
#[new]
#[pyo3(text_signature = "(self, pattern)")]... | tokenizers/bindings/python/src/utils/regex.rs/0 | {
"file_path": "tokenizers/bindings/python/src/utils/regex.rs",
"repo_id": "tokenizers",
"token_count": 264
} | 440 |
from langchain_community.document_loaders.duckdb_loader import DuckDBLoader
__all__ = ["DuckDBLoader"]
| langchain/libs/langchain/langchain/document_loaders/duckdb_loader.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/duckdb_loader.py",
"repo_id": "langchain",
"token_count": 33
} | 505 |
<jupyter_start><jupyter_text>SlackThis notebook shows how to use the Slack chat loader. This class helps map exported slack conversations to LangChain chat messages.The process has three steps:1. Export the desired conversation thread by following the [instructions here](https://slack.com/help/articles/1500001548241-Re... | langchain/docs/docs/integrations/chat_loaders/slack.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/chat_loaders/slack.ipynb",
"repo_id": "langchain",
"token_count": 924
} | 104 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... | transformers/tests/models/openai/test_tokenization_openai.py/0 | {
"file_path": "transformers/tests/models/openai/test_tokenization_openai.py",
"repo_id": "transformers",
"token_count": 2406
} | 726 |
# 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 applicabl... | trl/scripts/log_example_reports.py/0 | {
"file_path": "trl/scripts/log_example_reports.py",
"repo_id": "trl",
"token_count": 2269
} | 811 |
// JS backend not used by default, see README for instructions.
import { NextRequest, NextResponse } from "next/server";
import { Client } from "langsmith";
export const runtime = "edge";
const client = new Client();
const pollForRun = async (runId: string, retryCount = 0): Promise<string> => {
await new Promise... | weblangchain/nextjs/app/api/get_trace/route.ts/0 | {
"file_path": "weblangchain/nextjs/app/api/get_trace/route.ts",
"repo_id": "weblangchain",
"token_count": 442
} | 2,064 |
# order by contributions
reviewers:
- godchen0212
- XuanYang-cn
- sunby
- czs007
- xiaocai2333
approvers:
- maintainers
| milvus/internal/storage/OWNERS/0 | {
"file_path": "milvus/internal/storage/OWNERS",
"repo_id": "milvus",
"token_count": 53
} | 1,789 |
python_sources()
| llama_index/llama-index-core/llama_index/core/tools/tool_spec/load_and_search/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/tools/tool_spec/load_and_search/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,222 |
# CIP-01022024 SSL Verify Client Config
## Status
Current Status: `Under Discussion`
## Motivation
The motivation for this change is to enhance security and flexibility in Chroma's client API. Users need the ability to
configure SSL contexts to trust custom CA certificates or self-signed certificates, which is not ... | chroma/docs/cip/CIP-01022024_SSL_Verify_Client_Config.md/0 | {
"file_path": "chroma/docs/cip/CIP-01022024_SSL_Verify_Client_Config.md",
"repo_id": "chroma",
"token_count": 767
} | 41 |
import {
Tiktoken,
TiktokenEncoding,
TiktokenModel,
getEncodingNameForModel,
} from "js-tiktoken/lite";
import { AsyncCaller } from "./async_caller.js";
const cache: Record<string, Promise<Tiktoken>> = {};
const caller = /* #__PURE__ */ new AsyncCaller({});
export async function getEncoding(encoding: Tiktoke... | langchainjs/langchain-core/src/utils/tiktoken.ts/0 | {
"file_path": "langchainjs/langchain-core/src/utils/tiktoken.ts",
"repo_id": "langchainjs",
"token_count": 295
} | 873 |
---
sidebar_position: 2
---
# Prompts
A prompt for a language model is a set of instructions or input provided by a user to
guide the model's response, helping it understand the context and generate relevant
and coherent language-based output, such as answering questions, completing sentences,
or engaging in a convers... | langchain/docs/docs/modules/model_io/prompts/index.mdx/0 | {
"file_path": "langchain/docs/docs/modules/model_io/prompts/index.mdx",
"repo_id": "langchain",
"token_count": 305
} | 209 |
.PHONY: all lint format test help
# Default target executed when no arguments are given to make.
all: help
build_ui:
cd ../frontend && yarn build && cp -r dist/* ../backend/ui
######################
# TESTING AND COVERAGE
######################
# Define a variable for the test file path.
TEST_FILE ?= tests/unit_te... | opengpts/backend/Makefile/0 | {
"file_path": "opengpts/backend/Makefile",
"repo_id": "opengpts",
"token_count": 756
} | 1,992 |
# Configuring Settings
The `Settings` is a bundle of commonly used resources used during the indexing and querying stage in a LlamaIndex pipeline/application.
You can use it to set the [global configuration](#setting-global-configuration). Local configurations (transformations, LLMs, embedding models) can be passed d... | llama_index/docs/module_guides/supporting_modules/settings.md/0 | {
"file_path": "llama_index/docs/module_guides/supporting_modules/settings.md",
"repo_id": "llama_index",
"token_count": 1148
} | 1,107 |
# coding=utf-8
# Copyright 2023 Meta Platforms, Inc. and affiliates, 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.apa... | transformers/src/transformers/models/encodec/modeling_encodec.py/0 | {
"file_path": "transformers/src/transformers/models/encodec/modeling_encodec.py",
"repo_id": "transformers",
"token_count": 13791
} | 659 |
# Getting Started
## Welcome
Welcome to the `timm` documentation, a lean set of docs that covers the basics of `timm`.
For a more comprehensive set of docs (currently under development), please visit [timmdocs](http://timm.fast.ai) by [Aman Arora](https://github.com/amaarora).
## Install
The library can be install... | pytorch-image-models/docs/index.md/0 | {
"file_path": "pytorch-image-models/docs/index.md",
"repo_id": "pytorch-image-models",
"token_count": 736
} | 357 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/proxy/metrics_info.go/0 | {
"file_path": "milvus/internal/proxy/metrics_info.go",
"repo_id": "milvus",
"token_count": 6065
} | 1,828 |
from datetime import datetime
import time
from pymilvus import utility
import sys
sys.path.append("..")
from check.func_check import ResponseChecker
from utils.api_request import api_request
from pymilvus import BulkInsertState
from pymilvus.orm.role import Role
from utils.util_log import test_log as log
TIMEOUT = 20... | milvus/tests/python_client/base/utility_wrapper.py/0 | {
"file_path": "milvus/tests/python_client/base/utility_wrapper.py",
"repo_id": "milvus",
"token_count": 13904
} | 1,962 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/openai/test_modeling_tf_openai.py/0 | {
"file_path": "transformers/tests/models/openai/test_modeling_tf_openai.py",
"repo_id": "transformers",
"token_count": 5052
} | 742 |
import math
import re
from typing import List, Optional
import numexpr
from langchain.chains.openai_functions import create_structured_output_runnable
from langchain_community.chat_models import ChatOpenAI
from langchain_core.messages import SystemMessage
from langchain_core.prompts import ChatPromptTemplate, Messages... | langgraph/examples/llm-compiler/math_tools.py/0 | {
"file_path": "langgraph/examples/llm-compiler/math_tools.py",
"repo_id": "langgraph",
"token_count": 2047
} | 1,051 |
<!--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/model_doc/blip.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/blip.md",
"repo_id": "transformers",
"token_count": 1785
} | 546 |
// If you want to import the browser version, use the following line instead:
// import { CloseVectorWeb } from "@langchain/community/vectorstores/closevector/web";
import { CloseVectorNode } from "@langchain/community/vectorstores/closevector/node";
import { CloseVectorWeb } from "@langchain/community/vectorstores/clo... | langchainjs/examples/src/indexes/vector_stores/closevector_saveload_fromcloud.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/closevector_saveload_fromcloud.ts",
"repo_id": "langchainjs",
"token_count": 622
} | 801 |
[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 = ["NvidiaTriton"]
contains_example = false
import_path = "llama_index.llms.nvidia_triton"
[... | llama_index/llama-index-integrations/llms/llama-index-llms-nvidia-triton/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-nvidia-triton/pyproject.toml",
"repo_id": "llama_index",
"token_count": 679
} | 1,231 |
import pytest
import threading
from time import sleep
from pymilvus import connections, DataType, FieldSchema, CollectionSchema
from chaos.checker import (BulkInsertChecker, Op)
from utils.util_log import test_log as log
from chaos import chaos_commons as cc
from common.common_type import CaseLabel
from common import c... | milvus/tests/python_client/bulk_insert/test_bulk_insert_perf_with_cohere_dataset.py/0 | {
"file_path": "milvus/tests/python_client/bulk_insert/test_bulk_insert_perf_with_cohere_dataset.py",
"repo_id": "milvus",
"token_count": 1957
} | 2,104 |
from typing import Any, Optional, Sequence
from llama_index.legacy.prompts import BasePromptTemplate
from llama_index.legacy.prompts.default_prompts import DEFAULT_SIMPLE_INPUT_PROMPT
from llama_index.legacy.prompts.mixin import PromptDictType
from llama_index.legacy.response_synthesizers.base import BaseSynthesizer
f... | llama_index/llama-index-legacy/llama_index/legacy/response_synthesizers/generation.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/response_synthesizers/generation.py",
"repo_id": "llama_index",
"token_count": 1124
} | 1,710 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-apify/llama_index/readers/apify/actor/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-apify/llama_index/readers/apify/actor/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,336 |
from typing import Optional, Type
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_core.tools import BaseTool
from langchain_community.tools.file_management.utils import (
INVALID_PATH_TEMPLATE,
BaseFileToolMixin,
FileVal... | langchain/libs/community/langchain_community/tools/file_management/write.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/file_management/write.py",
"repo_id": "langchain",
"token_count": 650
} | 283 |
from typing import Dict, List
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from langchain_core.documents import Document
from langchain_community.document_loaders.mongodb import MongodbLoader
@pytest.fixture
def raw_docs() -> List[Dict]:
return [
{"_id": "1", "address": {"building... | langchain/libs/community/tests/unit_tests/document_loaders/test_mongodb.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_mongodb.py",
"repo_id": "langchain",
"token_count": 758
} | 372 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.