text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# Integration test
This folder contains the integration test for Milvus components.
## How to run integration test locally
Integration test still need some thirdparty components to start:
```bash
cd [milvus-folder]/deployments/docker/dev && docker-compose up -d
```
Run following script to start the full integratio... | milvus/tests/integration/README.md/0 | {
"file_path": "milvus/tests/integration/README.md",
"repo_id": "milvus",
"token_count": 540
} | 1,877 |
<jupyter_start><jupyter_text>Atlas>[Atlas](https://docs.nomic.ai/index.html) is a platform by Nomic made for interacting with both small and internet scale unstructured datasets. It enables anyone to visualize, search, and share massive datasets in their browser.This notebook shows you how to use functionality related ... | langchain/docs/docs/integrations/vectorstores/atlas.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/atlas.ipynb",
"repo_id": "langchain",
"token_count": 558
} | 179 |
accelerate launch --config_file accelerate_config.yaml train_using_s3_data.py \
--mixed_precision "fp16" | notebooks/sagemaker/22_accelerate_sagemaker_examples/src/text-classification/launch.sh/0 | {
"file_path": "notebooks/sagemaker/22_accelerate_sagemaker_examples/src/text-classification/launch.sh",
"repo_id": "notebooks",
"token_count": 40
} | 302 |
<jupyter_start><jupyter_text>Run TemplateIn `server.py`, set -```add_routes(app, chain_rag_conv, path="/rag-chroma")```<jupyter_code>from langserve.client import RemoteRunnable
rag_app = RemoteRunnable("http://localhost:8001/rag-chroma")
rag_app.invoke("Where id Harrison work")<jupyter_output><empty_output> | langchain/templates/rag-chroma/rag_chroma.ipynb/0 | {
"file_path": "langchain/templates/rag-chroma/rag_chroma.ipynb",
"repo_id": "langchain",
"token_count": 116
} | 684 |
package kafka
import (
"context"
"fmt"
"sync"
"time"
"github.com/confluentinc/confluent-kafka-go/kafka"
"go.uber.org/zap"
"github.com/milvus-io/milvus/pkg/common"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/metrics"
"github.com/milvus-io/milvus/pkg/mq/msgstream/mqwrapper"
"githu... | milvus/pkg/mq/msgstream/mqwrapper/kafka/kafka_producer.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/kafka/kafka_producer.go",
"repo_id": "milvus",
"token_count": 1191
} | 1,921 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/pipelines/text_to_video.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/text_to_video.md",
"repo_id": "diffusers",
"token_count": 2533
} | 181 |
from __future__ import annotations
import json
import os
import shutil
import tempfile
import unittest
from unittest.mock import patch
import numpy as np
from transformers import BartTokenizer
from transformers.models.bert.tokenization_bert import VOCAB_FILES_NAMES as DPR_VOCAB_FILES_NAMES
from transformers.models.d... | transformers/tests/models/rag/test_modeling_tf_rag.py/0 | {
"file_path": "transformers/tests/models/rag/test_modeling_tf_rag.py",
"repo_id": "transformers",
"token_count": 19640
} | 782 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team 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 clone of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/tests/generation/test_tf_logits_process.py/0 | {
"file_path": "transformers/tests/generation/test_tf_logits_process.py",
"repo_id": "transformers",
"token_count": 9990
} | 765 |
"""Utilities for tests."""
def get_pydantic_major_version() -> int:
"""Get the major version of Pydantic."""
try:
import pydantic
return int(pydantic.__version__.split(".")[0])
except ImportError:
return 0
PYDANTIC_MAJOR_VERSION = get_pydantic_major_version()
| langchain/libs/core/langchain_core/utils/pydantic.py/0 | {
"file_path": "langchain/libs/core/langchain_core/utils/pydantic.py",
"repo_id": "langchain",
"token_count": 123
} | 402 |
<jupyter_start><jupyter_text>DashVector Reader If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-readers-dashvector
!pip install llama-index
import logging
import sys
import os
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logg... | llama_index/docs/examples/data_connectors/DashvectorReaderDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/DashvectorReaderDemo.ipynb",
"repo_id": "llama_index",
"token_count": 554
} | 1,096 |
# Mid-way Recap [[mid-way-recap]]
Before diving into Q-Learning, let's summarize what we've just learned.
We have two types of value-based functions:
- State-value function: outputs the expected return if **the agent starts at a given state and acts according to the policy forever after.**
- Action-value function: o... | deep-rl-class/units/en/unit2/mid-way-recap.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit2/mid-way-recap.mdx",
"repo_id": "deep-rl-class",
"token_count": 317
} | 157 |
# RexNet
**Rank Expansion Networks** (ReXNets) follow a set of new design principles for designing bottlenecks in image classification models. Authors refine each layer by 1) expanding the input channel size of the convolution layer and 2) replacing the [ReLU6s](https://www.paperswithcode.com/method/relu6).
{% includ... | pytorch-image-models/docs/models/.templates/models/rexnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/rexnet.md",
"repo_id": "pytorch-image-models",
"token_count": 2278
} | 350 |
"""Corrective RAG LlamaPack class."""
from typing import Any, Dict, List
from llama_index.core import VectorStoreIndex, SummaryIndex
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.llms.openai import OpenAI
from llama_index.core.schema import Document, NodeWithScore
from llama_index.core.q... | llama_index/llama-index-packs/llama-index-packs-corrective-rag/llama_index/packs/corrective_rag/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-corrective-rag/llama_index/packs/corrective_rag/base.py",
"repo_id": "llama_index",
"token_count": 2146
} | 1,780 |
# 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/roformer/tokenization_roformer_fast.py/0 | {
"file_path": "transformers/src/transformers/models/roformer/tokenization_roformer_fast.py",
"repo_id": "transformers",
"token_count": 3620
} | 654 |
"""Tools for interacting with a PowerBI dataset."""
| langchain/libs/community/langchain_community/tools/powerbi/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/powerbi/__init__.py",
"repo_id": "langchain",
"token_count": 12
} | 317 |
use super::common::{AttnBlock, GlobalResponseNorm, LayerNormNoWeights, TimestepBlock, WLayerNorm};
use candle::{DType, Module, Result, Tensor, D};
use candle_nn::VarBuilder;
#[derive(Debug)]
pub struct ResBlockStageB {
depthwise: candle_nn::Conv2d,
norm: WLayerNorm,
channelwise_lin1: candle_nn::Linear,
... | candle/candle-transformers/src/models/wuerstchen/diffnext.rs/0 | {
"file_path": "candle/candle-transformers/src/models/wuerstchen/diffnext.rs",
"repo_id": "candle",
"token_count": 8148
} | 79 |
from pathlib import Path
from typing import Dict, List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document, ImageDocument
from llama_index.core.utils import infer_torch_device
class ImageCaptionReader(BaseReader):
"""Image parser.
Caption image using B... | llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_caption/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_caption/base.py",
"repo_id": "llama_index",
"token_count": 1422
} | 1,367 |
<jupyter_start><jupyter_text>AutoGPTImplementation of https://github.com/Significant-Gravitas/Auto-GPT but with LangChain primitives (LLMs, PromptTemplates, VectorStores, Embeddings, Tools) Set up toolsWe'll set up an AutoGPT with a search tool, and write-file tool, and a read-file tool<jupyter_code>from langchain.age... | langchain/cookbook/autogpt/autogpt.ipynb/0 | {
"file_path": "langchain/cookbook/autogpt/autogpt.ipynb",
"repo_id": "langchain",
"token_count": 861
} | 75 |
# 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/longformer/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/longformer/__init__.py",
"repo_id": "transformers",
"token_count": 1687
} | 683 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/model_doc/codegen.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/codegen.md",
"repo_id": "transformers",
"token_count": 2153
} | 482 |
"""Rss reader."""
from typing import List
from llama_index.core.readers.base import BasePydanticReader
from llama_index.core.schema import Document
class RssReader(BasePydanticReader):
"""RSS reader.
Reads content from an RSS feed.
"""
is_remote: bool = True
html_to_text: bool = False
@c... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/rss/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/rss/base.py",
"repo_id": "llama_index",
"token_count": 672
} | 1,469 |
# 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/roberta/test_modeling_tf_roberta.py/0 | {
"file_path": "transformers/tests/models/roberta/test_modeling_tf_roberta.py",
"repo_id": "transformers",
"token_count": 12720
} | 767 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,575 |
import { z } from "zod";
import {
zodToJsonSchema,
JsonSchema7Type,
JsonSchema7ArrayType,
JsonSchema7ObjectType,
JsonSchema7StringType,
JsonSchema7NumberType,
JsonSchema7NullableType,
} from "zod-to-json-schema";
import {
BaseOutputParser,
FormatInstructionsOptions,
OutputParserException,
} from "@l... | langchainjs/langchain/src/output_parsers/structured.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/structured.ts",
"repo_id": "langchainjs",
"token_count": 3198
} | 976 |
from neo4j_generation.chain import chain
if __name__ == "__main__":
text = "Harrison works at LangChain, which is located in San Francisco"
allowed_nodes = ["Person", "Organization", "Location"]
allowed_relationships = ["WORKS_AT", "LOCATED_IN"]
print( # noqa: T201
chain(
text,
... | langchain/templates/neo4j-generation/main.py/0 | {
"file_path": "langchain/templates/neo4j-generation/main.py",
"repo_id": "langchain",
"token_count": 179
} | 650 |
"""SceneXplain API toolkit."""
| langchain/libs/community/langchain_community/tools/scenexplain/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/scenexplain/__init__.py",
"repo_id": "langchain",
"token_count": 10
} | 313 |
# coding=utf-8
# Copyright 2018 HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | transformers/tests/models/camembert/test_tokenization_camembert.py/0 | {
"file_path": "transformers/tests/models/camembert/test_tokenization_camembert.py",
"repo_id": "transformers",
"token_count": 5451
} | 788 |
# coding=utf-8
# Copyright 2018 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/xlm_roberta_xl/convert_xlm_roberta_xl_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/xlm_roberta_xl/convert_xlm_roberta_xl_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3308
} | 679 |
python_sources()
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/llms/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/llms/BUILD",
"repo_id": "llama_index",
"token_count": 22
} | 1,236 |
services:
database:
image: neo4j
ports:
- 7687:7687
- 7474:7474
environment:
- NEO4J_AUTH=neo4j/pleaseletmein
| langchainjs/examples/src/indexes/vector_stores/neo4j_vector/docker-compose.example.yml/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/neo4j_vector/docker-compose.example.yml",
"repo_id": "langchainjs",
"token_count": 75
} | 850 |
export {
SqlDatabaseChain,
type SqlDatabaseChainInput,
type CreateSqlQueryChainFields,
createSqlQueryChain,
} from "./sql_db_chain.js";
export {
DEFAULT_SQL_DATABASE_PROMPT,
SQL_POSTGRES_PROMPT,
SQL_SQLITE_PROMPT,
SQL_MSSQL_PROMPT,
SQL_MYSQL_PROMPT,
SQL_SAP_HANA_PROMPT,
SQL_PROMPTS_MAP,
} from "./... | langchainjs/langchain/src/chains/sql_db/index.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/sql_db/index.ts",
"repo_id": "langchainjs",
"token_count": 156
} | 867 |
<jupyter_start><jupyter_text>Retrieval-Augmented Image CaptioningIn this example, we show how to leverage [LLaVa + Replicate](https://replicate.com/yorickvp/llava-13b) for image understanding/captioning and retrieve relevant unstructured text and embedded tables from Tesla 10K file according to the image understanding.... | llama_index/docs/examples/multi_modal/llava_multi_modal_tesla_10q.ipynb/0 | {
"file_path": "llama_index/docs/examples/multi_modal/llava_multi_modal_tesla_10q.ipynb",
"repo_id": "llama_index",
"token_count": 2738
} | 1,132 |
---
sidebar_position: 0
sidebar_class_name: hidden
---
# Providers
LangChain integrates with many providers.
## Partner Packages
These providers have standalone `langchain-{provider}` packages for improved versioning, dependency management and testing.
- [OpenAI](/docs/integrations/platforms/openai)
- [Anthropic](... | langchain/docs/docs/integrations/platforms/index.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/platforms/index.mdx",
"repo_id": "langchain",
"token_count": 323
} | 131 |
"""Data anonymizer package"""
from langchain_experimental.data_anonymizer.presidio import (
PresidioAnonymizer,
PresidioReversibleAnonymizer,
)
__all__ = ["PresidioAnonymizer", "PresidioReversibleAnonymizer"]
| langchain/libs/experimental/langchain_experimental/data_anonymizer/__init__.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/data_anonymizer/__init__.py",
"repo_id": "langchain",
"token_count": 76
} | 419 |
# coding=utf-8
# Copyright 2018 The Open AI 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.org/licenses/LICENSE-2.0
#
# ... | transformers/src/transformers/models/gpt2/tokenization_gpt2_fast.py/0 | {
"file_path": "transformers/src/transformers/models/gpt2/tokenization_gpt2_fast.py",
"repo_id": "transformers",
"token_count": 3295
} | 610 |
# coding=utf-8
# Copyright 2023 Google Research, Inc. 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/license... | transformers/src/transformers/models/efficientnet/modeling_efficientnet.py/0 | {
"file_path": "transformers/src/transformers/models/efficientnet/modeling_efficientnet.py",
"repo_id": "transformers",
"token_count": 10404
} | 612 |
package legacy
import (
"fmt"
"github.com/milvus-io/milvus/cmd/tools/migration/utils"
)
func BuildCollectionIndexKey210(collectionID, indexID utils.UniqueID) string {
return fmt.Sprintf("%s/%d/%d", IndexMetaBefore220Prefix, collectionID, indexID)
}
func BuildSegmentIndexKey210(segmentID, indexID utils.UniqueID) ... | milvus/cmd/tools/migration/legacy/util.go/0 | {
"file_path": "milvus/cmd/tools/migration/legacy/util.go",
"repo_id": "milvus",
"token_count": 197
} | 1,619 |
from llama_index.legacy.llm_predictor.vellum.predictor import VellumPredictor
from llama_index.legacy.llm_predictor.vellum.prompt_registry import VellumPromptRegistry
from llama_index.legacy.llm_predictor.vellum.types import (
VellumCompiledPrompt,
VellumRegisteredPrompt,
)
__all__ = [
"VellumCompiledPromp... | llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/vellum/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/vellum/__init__.py",
"repo_id": "llama_index",
"token_count": 170
} | 1,571 |
# coding=utf-8
# Copyright 2023 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/focalnet/modeling_focalnet.py/0 | {
"file_path": "transformers/src/transformers/models/focalnet/modeling_focalnet.py",
"repo_id": "transformers",
"token_count": 18401
} | 690 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/llama_index/vector_stores/metal/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/llama_index/vector_stores/metal/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,468 |
[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 = ["EmbeddedTablesUnstructuredRetrieverPack", "RecursiveRetrieverSmallToBigPack"]
contains_ex... | llama_index/llama-index-packs/llama-index-packs-recursive-retriever/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-recursive-retriever/pyproject.toml",
"repo_id": "llama_index",
"token_count": 747
} | 1,694 |
from typing import cast
import pytest
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
ChatMessage,
FunctionMessage,
HumanMessage,
HumanMessageChunk,
SystemMessage,
)
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture, MonkeyPatch
from langch... | langchain/libs/community/tests/unit_tests/chat_models/test_baichuan.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/chat_models/test_baichuan.py",
"repo_id": "langchain",
"token_count": 1447
} | 399 |
"""Graph stores."""
from llama_index.core.graph_stores.simple import SimpleGraphStore
__all__ = [
"SimpleGraphStore",
]
| llama_index/llama-index-core/llama_index/core/graph_stores/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/graph_stores/__init__.py",
"repo_id": "llama_index",
"token_count": 43
} | 1,258 |
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
MessageRole,
)
from llama_index.core.llms.custom import CustomLLM
from llama_index.core... | llama_index/llama-index-core/llama_index/core/llms/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llms/__init__.py",
"repo_id": "llama_index",
"token_count": 236
} | 1,130 |
<jupyter_start><jupyter_text>Azure Cognitive ServicesThis toolkit is used to interact with the `Azure Cognitive Services API` to achieve some multimodal capabilities.Currently There are four tools bundled in this toolkit:- AzureCogsImageAnalysisTool: used to extract caption, objects, tags, and text from images. (Note: ... | langchain/docs/docs/integrations/toolkits/azure_cognitive_services.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/azure_cognitive_services.ipynb",
"repo_id": "langchain",
"token_count": 1277
} | 177 |
""" GitHub Tool """
| langchain/libs/langchain/langchain/tools/github/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/github/__init__.py",
"repo_id": "langchain",
"token_count": 5
} | 587 |
import time
import pytest
import threading
import json
from time import sleep
from pymilvus import connections, db
from chaos.checker import (InsertChecker,
UpsertChecker,
SearchChecker,
QueryChecker,
DeleteCheck... | milvus/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py/0 | {
"file_path": "milvus/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py",
"repo_id": "milvus",
"token_count": 2444
} | 2,033 |
from llama_index.core.multi_modal_llms.base import MultiModalLLM
from llama_index.multi_modal_llms.azure_openai import AzureOpenAIMultiModal
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in AzureOpenAIMultiModal.__mro__]
assert MultiModalLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-azure-openai/tests/test_multi-modal-llms_azure_openai.py/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-azure-openai/tests/test_multi-modal-llms_azure_openai.py",
"repo_id": "llama_index",
"token_count": 120
} | 1,339 |
from llama_index.readers.semanticscholar.base import SemanticScholarReader
__all__ = ["SemanticScholarReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-semanticscholar/llama_index/readers/semanticscholar/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-semanticscholar/llama_index/readers/semanticscholar/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,520 |
import inspect
import warnings
from typing import Dict
import numpy as np
from ..utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available
from .base import GenericTensor, Pipeline, build_pipeline_init_args
if is_tf_available():
from ..models.auto.modeling_tf_auto import TF_MODEL_FOR_SE... | transformers/src/transformers/pipelines/text_classification.py/0 | {
"file_path": "transformers/src/transformers/pipelines/text_classification.py",
"repo_id": "transformers",
"token_count": 4168
} | 727 |
# Waii Tool
This tool connects to database connections managed by Waii, which allows generic SQL queries, do performance analyze, describe a SQL query, and more.
## Usage
First you need to create a waii.ai account, you request an account from [here](https://waii.ai/).
Initialize the tool with your account credentia... | llama_index/llama-index-integrations/tools/llama-index-tools-waii/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-waii/README.md",
"repo_id": "llama_index",
"token_count": 1430
} | 1,533 |
"""**Embedding models** are wrappers around embedding models
from different APIs and services.
**Embedding models** can be LLMs or not.
**Class hierarchy:**
.. code-block::
Embeddings --> <name>Embeddings # Examples: OpenAIEmbeddings, HuggingFaceEmbeddings
"""
import logging
from typing import Any
from lan... | langchain/libs/community/langchain_community/embeddings/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/__init__.py",
"repo_id": "langchain",
"token_count": 2496
} | 267 |
# 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/examples/legacy/seq2seq/rouge_cli.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/rouge_cli.py",
"repo_id": "transformers",
"token_count": 385
} | 510 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,534 |
label: 'Guides'
position: 3 | langchainjs/docs/core_docs/docs/guides/_category_.yml/0 | {
"file_path": "langchainjs/docs/core_docs/docs/guides/_category_.yml",
"repo_id": "langchainjs",
"token_count": 10
} | 749 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/util/typeutil/string_util_test.go/0 | {
"file_path": "milvus/pkg/util/typeutil/string_util_test.go",
"repo_id": "milvus",
"token_count": 757
} | 2,069 |
python_tests()
| llama_index/llama-index-packs/llama-index-packs-recursive-retriever/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-recursive-retriever/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,669 |
import { test } from "@jest/globals";
import { ChatPromptTemplate } from "../../prompts/chat.js";
import { HumanMessage, AIMessage, ToolMessage } from "../index.js";
import { load } from "../../load/index.js";
test("Test ChatPromptTemplate can format OpenAI content image messages", async () => {
const message = new ... | langchainjs/langchain-core/src/messages/tests/base_message.test.ts/0 | {
"file_path": "langchainjs/langchain-core/src/messages/tests/base_message.test.ts",
"repo_id": "langchainjs",
"token_count": 1216
} | 853 |
# extraction-openai-functions
This template uses [OpenAI function calling](https://python.langchain.com/docs/modules/chains/how_to/openai_functions) for extraction of structured output from unstructured input text.
The extraction output schema can be set in `chain.py`.
## Environment Setup
Set the `OPENAI_API_KEY... | langchain/templates/extraction-openai-functions/README.md/0 | {
"file_path": "langchain/templates/extraction-openai-functions/README.md",
"repo_id": "langchain",
"token_count": 698
} | 648 |
# Usage Pattern
## Estimating LLM and Embedding Token Counts
In order to measure LLM and Embedding token counts, you'll need to
1. Setup `MockLLM` and `MockEmbedding` objects
```python
from llama_index.core.llms import MockLLM
from llama_index.core import MockEmbedding
llm = MockLLM(max_tokens=256)
embed_model = M... | llama_index/docs/understanding/evaluating/cost_analysis/usage_pattern.md/0 | {
"file_path": "llama_index/docs/understanding/evaluating/cost_analysis/usage_pattern.md",
"repo_id": "llama_index",
"token_count": 743
} | 1,150 |
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
import { BasePromptTemplate } from "@langchain/core/prompts";
import { LLMChain } from "../llm_chain.js";
import {
StuffDocumentsChain,
MapReduceDocumentsChain,
RefineDocumentsChain,
MapReduceDocumentsChainInput,
} from "../... | langchainjs/langchain/src/chains/question_answering/load.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/question_answering/load.ts",
"repo_id": "langchainjs",
"token_count": 1622
} | 907 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | accelerate/tests/test_scheduler.py/0 | {
"file_path": "accelerate/tests/test_scheduler.py",
"repo_id": "accelerate",
"token_count": 2538
} | 20 |
""" GitLab Tool """
| langchain/libs/community/langchain_community/tools/gitlab/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/gitlab/__init__.py",
"repo_id": "langchain",
"token_count": 6
} | 298 |
import contextlib
import copy
import itertools
import json
import os
import pickle
import re
import sys
import tempfile
from functools import partial
from pathlib import Path
from unittest import TestCase
from unittest.mock import MagicMock, patch
import numpy as np
import numpy.testing as npt
import pandas as pd
impo... | datasets/tests/test_arrow_dataset.py/0 | {
"file_path": "datasets/tests/test_arrow_dataset.py",
"repo_id": "datasets",
"token_count": 123706
} | 146 |
<jupyter_start><jupyter_text>GitlabThe `Gitlab` toolkit contains tools that enable an LLM agent to interact with a gitlab repository. The tool is a wrapper for the [python-gitlab](https://github.com/python-gitlab/python-gitlab) library. Quickstart1. Install the python-gitlab library2. Create a Gitlab personal access t... | langchain/docs/docs/integrations/toolkits/gitlab.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/gitlab.ipynb",
"repo_id": "langchain",
"token_count": 1348
} | 168 |
"""Sagemaker InvokeEndpoint API."""
import io
import json
from abc import abstractmethod
from typing import Any, Dict, Generic, Iterator, List, Mapping, Optional, TypeVar, Union
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydanti... | langchain/libs/community/langchain_community/llms/sagemaker_endpoint.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/sagemaker_endpoint.py",
"repo_id": "langchain",
"token_count": 5710
} | 272 |
# DPO pipeline for the creation of StackLlaMa 2: a Stack exchange llama-v2-7b model
## Prerequisites
Install all the dependencies in the `requirements.txt`:
```
$ pip install -U -r requirements.txt
```
Since we will use `accelerate` for training, make sure to run:
```
$ accelerate config
```
## Training
There wer... | trl/examples/research_projects/stack_llama_2/scripts/README.md/0 | {
"file_path": "trl/examples/research_projects/stack_llama_2/scripts/README.md",
"repo_id": "trl",
"token_count": 896
} | 858 |
from llama_index.vector_stores.rocksetdb.base import RocksetVectorStore
__all__ = ["RocksetVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-rocksetdb/llama_index/vector_stores/rocksetdb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-rocksetdb/llama_index/vector_stores/rocksetdb/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,619 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/tests/test_gpu_examples.py/0 | {
"file_path": "peft/tests/test_gpu_examples.py",
"repo_id": "peft",
"token_count": 25634
} | 340 |
# candle-mamba: Mamba implementation
Candle implementation of *Mamba* [1] inference only. Mamba is an alternative to
the transformer architecture. It leverages State Space Models (SSMs) with the
goal of being computationally efficient on long sequences. The implementation is
based on [mamba.rs](https://github.com/Laur... | candle/candle-examples/examples/mamba/README.md/0 | {
"file_path": "candle/candle-examples/examples/mamba/README.md",
"repo_id": "candle",
"token_count": 190
} | 44 |
import os
from langchain_community.chat_models import ChatOpenAI
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores import SingleStoreDB
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.pyd... | langchain/templates/rag-singlestoredb/rag_singlestoredb/chain.py/0 | {
"file_path": "langchain/templates/rag-singlestoredb/rag_singlestoredb/chain.py",
"repo_id": "langchain",
"token_count": 587
} | 748 |
import { AlephAlpha } from "@langchain/community/llms/aleph_alpha";
const model = new AlephAlpha({
aleph_alpha_api_key: "YOUR_ALEPH_ALPHA_API_KEY", // Or set as process.env.ALEPH_ALPHA_API_KEY
});
const res = await model.call(`Is cereal soup?`);
console.log({ res });
/*
{
res: "\nIs soup a cereal? I don’t t... | langchainjs/examples/src/models/llm/aleph_alpha.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/aleph_alpha.ts",
"repo_id": "langchainjs",
"token_count": 142
} | 852 |
from __future__ import annotations
import logging
from typing import Any, Iterable, List, Optional, Tuple, Union
from uuid import uuid4
import numpy as np
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.vectorstores import VectorStore
from langchain_... | langchain/libs/community/langchain_community/vectorstores/milvus.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/milvus.py",
"repo_id": "langchain",
"token_count": 18830
} | 310 |
# targets cannot be reloaded.
[Unit]
Description=Milvus Standalone Server
Wants=milvus-etcd.service milvus-minio.service
Requires=milvus-etcd.service milvus-minio.service
After=network.target syslog.target milvus-etcd.service milvus-minio.service
[Install]
WantedBy=multi-user.target
Alias=milvus.service
[Service]
Ty... | milvus/build/deb/scripts/milvus.service/0 | {
"file_path": "milvus/build/deb/scripts/milvus.service",
"repo_id": "milvus",
"token_count": 169
} | 1,623 |
from llama_index.core.response_synthesizers.base import BaseSynthesizer
from llama_index.response_synthesizers.google import GoogleTextSynthesizer
def test_class():
names_of_base_classes = [b.__name__ for b in GoogleTextSynthesizer.__mro__]
assert BaseSynthesizer.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/response_synthesizers/llama-index-response-synthesizers-google/tests/test_response_synthesizers_google.py/0 | {
"file_path": "llama_index/llama-index-integrations/response_synthesizers/llama-index-response-synthesizers-google/tests/test_response_synthesizers_google.py",
"repo_id": "llama_index",
"token_count": 107
} | 1,407 |
<jupyter_start><jupyter_text>Prompt Versioning[](https://colab.research.google.com/github/langchain-ai/langsmith-cookbook/blob/main/hub-examples/retrieval-qa-chain-versioned/prompt-versioning.ipynb)Using the "latest" version of a prompt in production can introduce unforeseen issues. The LangChain hub offers version-spe... | langsmith-cookbook/hub-examples/retrieval-qa-chain-versioned/prompt-versioning.ipynb/0 | {
"file_path": "langsmith-cookbook/hub-examples/retrieval-qa-chain-versioned/prompt-versioning.ipynb",
"repo_id": "langsmith-cookbook",
"token_count": 1215
} | 1,012 |
# Unstructured
>The `unstructured` package from
[Unstructured.IO](https://www.unstructured.io/) extracts clean text from raw source documents like
PDFs and Word documents.
This page covers how to use the [`unstructured`](https://github.com/Unstructured-IO/unstructured)
ecosystem within LangChain.
## Installation and ... | langchain/docs/docs/integrations/providers/unstructured.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/unstructured.mdx",
"repo_id": "langchain",
"token_count": 793
} | 151 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/datanode/compactor.go/0 | {
"file_path": "milvus/internal/datanode/compactor.go",
"repo_id": "milvus",
"token_count": 8950
} | 1,782 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-psychic/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-psychic/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,406 |
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.llama_guard_moderator import LlamaGuardModeratorPack
def test_class():
names_of_base_classes = [b.__name__ for b in LlamaGuardModeratorPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/tests/test_packs_llama_guard_moderator.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/tests/test_packs_llama_guard_moderator.py",
"repo_id": "llama_index",
"token_count": 107
} | 1,591 |
import { BufferMemory } from "langchain/memory";
import { CassandraChatMessageHistory } from "@langchain/community/stores/message/cassandra";
import { ChatOpenAI } from "@langchain/openai";
import { ConversationChain } from "langchain/chains";
// The example below uses Astra DB, but you can use any Cassandra connectio... | langchainjs/examples/src/memory/cassandra-store.ts/0 | {
"file_path": "langchainjs/examples/src/memory/cassandra-store.ts",
"repo_id": "langchainjs",
"token_count": 370
} | 828 |
import { DocumentInterface } from "@langchain/core/documents";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { CohereClient } from "cohere-ai";
export interface CohereRerankArgs {
/**
* The API key to use.
* @default {process.env.COHERE_API_KEY}
*/
apiKey?: string;
/**
* ... | langchainjs/libs/langchain-cohere/src/rerank.ts/0 | {
"file_path": "langchainjs/libs/langchain-cohere/src/rerank.ts",
"repo_id": "langchainjs",
"token_count": 1355
} | 1,013 |
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
<siteinfo>
<sitename>Test Wiki</sitename>
<dbname>testmw<... | langchain/docs/docs/integrations/document_loaders/example_data/testmw_pages_current.xml/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/example_data/testmw_pages_current.xml",
"repo_id": "langchain",
"token_count": 87321
} | 107 |
from pathlib import Path
import streamlit as st
from langchain import hub
from langchain.agents import AgentExecutor, Tool, create_react_agent
from langchain.chains import LLMMathChain
from langchain_community.callbacks import StreamlitCallbackHandler
from langchain_community.utilities import DuckDuckGoSearchAPIWrapp... | streamlit-agent/streamlit_agent/mrkl_demo.py/0 | {
"file_path": "streamlit-agent/streamlit_agent/mrkl_demo.py",
"repo_id": "streamlit-agent",
"token_count": 1438
} | 1,993 |
# coding=utf-8
# Copyright 2023 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/sam/convert_sam_original_to_hf_format.py/0 | {
"file_path": "transformers/src/transformers/models/sam/convert_sam_original_to_hf_format.py",
"repo_id": "transformers",
"token_count": 3032
} | 655 |
/* eslint-disable @typescript-eslint/no-explicit-any */
import { test, jest, expect } from "@jest/globals";
import { SonixSpeechRecognitionService } from "sonix-speech-recognition";
import {
SpeechToTextRequest,
SpeechToTextResponse,
} from "sonix-speech-recognition/lib/types.js";
import { SonixAudioTranscriptionLo... | langchainjs/langchain/src/document_loaders/tests/sonix_audio.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/sonix_audio.int.test.ts",
"repo_id": "langchainjs",
"token_count": 870
} | 882 |
import warnings
from langchain_core.globals import get_debug as core_get_debug
from langchain_core.globals import get_verbose as core_get_verbose
from langchain_core.globals import set_debug as core_set_debug
from langchain_core.globals import set_verbose as core_set_verbose
from langchain.globals import get_debug, g... | langchain/libs/langchain/tests/unit_tests/test_globals.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/test_globals.py",
"repo_id": "langchain",
"token_count": 1702
} | 675 |
import { BaseFileStore } from "./base.js";
/**
* Class that provides an in-memory file storage system. It extends the
* BaseFileStore class and implements its readFile and writeFile methods.
* This class is typically used in scenarios where temporary, in-memory
* file storage is needed, such as during testing or f... | langchainjs/langchain/src/stores/file/in_memory.ts/0 | {
"file_path": "langchainjs/langchain/src/stores/file/in_memory.ts",
"repo_id": "langchainjs",
"token_count": 402
} | 968 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/util/tsoutil/tso_test.go/0 | {
"file_path": "milvus/pkg/util/tsoutil/tso_test.go",
"repo_id": "milvus",
"token_count": 831
} | 1,842 |
from langchain_community.llms.openai import (
AzureOpenAI,
BaseOpenAI,
OpenAI,
OpenAIChat,
)
__all__ = [
"BaseOpenAI",
"OpenAI",
"AzureOpenAI",
"OpenAIChat",
]
| langchain/libs/langchain/langchain/llms/openai.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/openai.py",
"repo_id": "langchain",
"token_count": 92
} | 514 |
package msgstream
import (
"context"
"fmt"
"log"
"reflect"
"runtime"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"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/pkg/mq/msgstream... | milvus/pkg/mq/msgstream/factory_stream_test.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/factory_stream_test.go",
"repo_id": "milvus",
"token_count": 10547
} | 1,822 |
use super::k_quants::{BlockQ2K, BlockQ4K, BlockQ4_0, BlockQ6K, BlockQ8K, BlockQ8_0, QK8_0, QK_K};
use crate::Result;
use byteorder::{ByteOrder, LittleEndian};
use half::f16;
use core::arch::wasm32::*;
#[inline(always)]
pub(crate) fn vec_dot_q4_0_q8_0(n: usize, xs: &[BlockQ4_0], ys: &[BlockQ8_0]) -> Result<f32> {
... | candle/candle-core/src/quantized/simd128.rs/0 | {
"file_path": "candle/candle-core/src/quantized/simd128.rs",
"repo_id": "candle",
"token_count": 11617
} | 41 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/nllb-moe.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nllb-moe.md",
"repo_id": "transformers",
"token_count": 2003
} | 467 |
metadata:
name: benchmark
namespace: qa
uid: e8a51212-9b27-441d-b357-e73c63854ccf
resourceVersion: '63697833'
generation: 41
creationTimestamp: '2021-05-25T11:04:40Z'
labels:
workflows.argoproj.io/creator: system-serviceaccount-argo-argo-server
managedFields:
- manager: argo
operation: Upd... | milvus/tests/benchmark/ci/argo.yaml/0 | {
"file_path": "milvus/tests/benchmark/ci/argo.yaml",
"repo_id": "milvus",
"token_count": 4216
} | 1,850 |
<jupyter_start><jupyter_text>Wandb Callback Handler[Weights & Biases Prompts](https://docs.wandb.ai/guides/prompts) is a suite of LLMOps tools built for the development of LLM-powered applications.The `WandbCallbackHandler` is integrated with W&B Prompts to visualize and inspect the execution flow of your index constru... | llama_index/docs/examples/callbacks/WandbCallbackHandler.ipynb/0 | {
"file_path": "llama_index/docs/examples/callbacks/WandbCallbackHandler.ipynb",
"repo_id": "llama_index",
"token_count": 1543
} | 1,125 |
from typing import TYPE_CHECKING, Any, Union
import pytest
from llama_index.legacy.llms import ChatMessage
from pytest import MonkeyPatch
if TYPE_CHECKING:
from ai21.ai21_object import AI21Object
try:
import ai21
from ai21.ai21_object import construct_ai21_object
except ImportError:
ai21 = None # ty... | llama_index/llama-index-legacy/tests/llms/test_ai21.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/llms/test_ai21.py",
"repo_id": "llama_index",
"token_count": 10811
} | 1,625 |
{
"name": "langsmith",
"version": "0.1.1",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
"packageManager": "yarn@1.22.19",
"files": [
"dist/",
"client.cjs",
"client.js",
"client.d.ts",
"run_trees.cjs",
"run_trees.js",
"run_trees.d... | langsmith-sdk/js/package.json/0 | {
"file_path": "langsmith-sdk/js/package.json",
"repo_id": "langsmith-sdk",
"token_count": 1989
} | 1,100 |
import os
from langchain.chains.query_constructor.base import AttributeInfo
from langchain.retrievers.self_query.base import SelfQueryRetriever
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.llms.openai import OpenAI
from langchain_community.vectorstores.supabase import SupabaseVe... | langchain/templates/self-query-supabase/self_query_supabase/chain.py/0 | {
"file_path": "langchain/templates/self-query-supabase/self_query_supabase/chain.py",
"repo_id": "langchain",
"token_count": 599
} | 733 |
from langchain_core.language_models.base import (
BaseLanguageModel,
LanguageModelInput,
LanguageModelLike,
LanguageModelOutput,
get_tokenizer,
)
from langchain_core.language_models.chat_models import BaseChatModel, SimpleChatModel
from langchain_core.language_models.llms import LLM, BaseLLM
__all_... | langchain/libs/core/langchain_core/language_models/__init__.py/0 | {
"file_path": "langchain/libs/core/langchain_core/language_models/__init__.py",
"repo_id": "langchain",
"token_count": 189
} | 400 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-bagel/llama_index/readers/bagel/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-bagel/llama_index/readers/bagel/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,411 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.