text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
pipeline {
agent none
options {
timestamps()
}
parameters{
string defaultValue: 'master', description: 'server image version', name: 'IMAGE_VERSION', trim: true
choice choices: ['kubernetes', 'idc-kubernetes'], description: 'cluster name', name: 'CLUSTER_NAME'
string de... | milvus/tests/benchmark/ci/main_jenkinsfile/0 | {
"file_path": "milvus/tests/benchmark/ci/main_jenkinsfile",
"repo_id": "milvus",
"token_count": 4135
} | 1,932 |
package proxy
import (
"encoding/json"
"fmt"
"reflect"
"github.com/cockroachdb/errors"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/util/funcutil"
"githu... | milvus/internal/proxy/reScorer.go/0 | {
"file_path": "milvus/internal/proxy/reScorer.go",
"repo_id": "milvus",
"token_count": 1891
} | 1,964 |
version: '3.9'
networks:
net:
driver: bridge
services:
server:
image: server
build:
context: .
dockerfile: Dockerfile
volumes:
# Be aware that indexed data are located in "/chroma/chroma/"
# Default configuration for persist_directory in chromadb/config.py
# Read more... | chroma/docker-compose.yml/0 | {
"file_path": "chroma/docker-compose.yml",
"repo_id": "chroma",
"token_count": 689
} | 34 |
---
sidebar_position: 4
title: Retrievers
---
# Retrievers
A retriever is an interface that returns documents given an unstructured query. It is more general than a vector store.
A retriever does not need to be able to store documents, only to return (or retrieve) them. Vector stores can be used
as the backbone of a ... | langchain/docs/docs/modules/data_connection/retrievers/index.mdx/0 | {
"file_path": "langchain/docs/docs/modules/data_connection/retrievers/index.mdx",
"repo_id": "langchain",
"token_count": 3527
} | 201 |
import { AzureBlobStorageFileLoader } from "langchain/document_loaders/web/azure_blob_storage_file";
const loader = new AzureBlobStorageFileLoader({
azureConfig: {
connectionString: "",
container: "container_name",
blobName: "example.txt",
},
unstructuredConfig: {
apiUrl: "http://localhost:8000/g... | langchainjs/examples/src/document_loaders/azure_blob_storage_file.ts/0 | {
"file_path": "langchainjs/examples/src/document_loaders/azure_blob_storage_file.ts",
"repo_id": "langchainjs",
"token_count": 154
} | 807 |
# coding=utf-8
# Copyright 2021 The Facebook 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/licenses/LI... | transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py",
"repo_id": "transformers",
"token_count": 16882
} | 767 |
/* eslint-disable no-process-env */
import { test } from "@jest/globals";
import { MemgraphGraph } from "../memgraph_graph.js";
describe.skip("Memgraph Graph Tests", () => {
const url = process.env.MEMGRAPH_URI as string;
const username = process.env.MEMGRAPH_USERNAME as string;
const password = process.env.MEM... | langchainjs/libs/langchain-community/src/graphs/tests/memgraph_graph.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/graphs/tests/memgraph_graph.int.test.ts",
"repo_id": "langchainjs",
"token_count": 691
} | 989 |
"""Test Milvus functionality."""
from typing import Any, List, Optional
from langchain_core.documents import Document
from langchain_community.vectorstores import Milvus
from tests.integration_tests.vectorstores.fake_embeddings import (
FakeEmbeddings,
fake_texts,
)
def _milvus_from_texts(
metadatas: Op... | langchain/libs/community/tests/integration_tests/vectorstores/test_milvus.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_milvus.py",
"repo_id": "langchain",
"token_count": 2148
} | 356 |
import multiprocessing
import os
from typing import BinaryIO, Optional, Union
from .. import Dataset, Features, NamedSplit, config
from ..formatting import query_table
from ..packaged_modules.csv.csv import Csv
from ..utils import tqdm as hf_tqdm
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc i... | datasets/src/datasets/io/csv.py/0 | {
"file_path": "datasets/src/datasets/io/csv.py",
"repo_id": "datasets",
"token_count": 2536
} | 133 |
# Collect User Feedback in Streamlit
[](https://github.com/langchain-ai/langsmith-cookbook/tree/main/./feedback-examples/streamlit/README.md)
In this example, you will create a ChatGPT-like web app in Streamlit that supports streaming, cus... | langsmith-cookbook/feedback-examples/streamlit/README.md/0 | {
"file_path": "langsmith-cookbook/feedback-examples/streamlit/README.md",
"repo_id": "langsmith-cookbook",
"token_count": 3337
} | 1,058 |
from typing import Dict, Union
def sanitize(
input: Union[str, Dict[str, str]],
) -> Dict[str, Union[str, Dict[str, str]]]:
"""
Sanitize input string or dict of strings by replacing sensitive data with
placeholders.
It returns the sanitized input string or dict of strings and the secure
conte... | langchain/libs/community/langchain_community/utilities/opaqueprompts.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/opaqueprompts.py",
"repo_id": "langchain",
"token_count": 1319
} | 320 |
// 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/accesslog/info.go/0 | {
"file_path": "milvus/internal/proxy/accesslog/info.go",
"repo_id": "milvus",
"token_count": 2340
} | 1,822 |
# 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/instructblip/convert_instructblip_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/instructblip/convert_instructblip_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 5493
} | 618 |
"""
Github repository reader.
Retrieves the contents of a Github repository and returns a list of documents.
The documents are either the contents of the files in the repository or
the text extracted from the files using the parser.
"""
import asyncio
import base64
import binascii
import logging
import os
import path... | llama_index/llama-index-legacy/llama_index/legacy/readers/github_readers/github_repository_reader.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/github_readers/github_repository_reader.py",
"repo_id": "llama_index",
"token_count": 7434
} | 1,634 |
if ! [ -f ./dev.txt ]; then
echo "Download dev dataset...."
curl -L -o ./dev.txt 'https://github.com/UniversalDependencies/UD_English-EWT/raw/master/en_ewt-ud-dev.conllu'
fi
if ! [ -f ./test.txt ]; then
echo "Download test dataset...."
curl -L -o ./test.txt 'https://github.com/UniversalDependencies/UD_English-... | transformers/examples/legacy/token-classification/run_pos.sh/0 | {
"file_path": "transformers/examples/legacy/token-classification/run_pos.sh",
"repo_id": "transformers",
"token_count": 416
} | 546 |
<jupyter_start><jupyter_text>DatabricksThis notebook covers how to connect to the [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the SQLDatabase wrapper of LangChain.It is broken into 3 parts: installation and setup, co... | langchain/cookbook/databricks_sql_db.ipynb/0 | {
"file_path": "langchain/cookbook/databricks_sql_db.ipynb",
"repo_id": "langchain",
"token_count": 1681
} | 76 |
python_sources()
| llama_index/llama-index-core/llama_index/core/question_gen/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/question_gen/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,242 |
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/agent/react/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/agent/react/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,257 |
use candle::{DType, Device, Tensor};
use candle_nn::VarBuilder;
use candle_wasm_example_sam as sam;
use wasm_bindgen::prelude::*;
struct Embeddings {
original_width: u32,
original_height: u32,
width: u32,
height: u32,
data: Tensor,
}
#[wasm_bindgen]
pub struct Model {
sam: sam::Sam,
embedd... | candle/candle-wasm-examples/segment-anything/src/bin/m.rs/0 | {
"file_path": "candle/candle-wasm-examples/segment-anything/src/bin/m.rs",
"repo_id": "candle",
"token_count": 2400
} | 90 |
from __future__ import annotations
from copy import deepcopy
from typing import Any, List, Optional, Sequence
def _retrieve_ref(path: str, schema: dict) -> dict:
components = path.split("/")
if components[0] != "#":
raise ValueError(
"ref paths are expected to be URI fragments, meaning th... | langchain/libs/core/langchain_core/utils/json_schema.py/0 | {
"file_path": "langchain/libs/core/langchain_core/utils/json_schema.py",
"repo_id": "langchain",
"token_count": 1115
} | 411 |
# (Tensorflow) Inception v3
**Inception v3** is a convolutional neural network architecture from the Inception family that makes several improvements including using [Label Smoothing](https://paperswithcode.com/method/label-smoothing), Factorized 7 x 7 convolutions, and the use of an [auxiliary classifer](https://pape... | pytorch-image-models/docs/models/.templates/models/tf-inception-v3.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/tf-inception-v3.md",
"repo_id": "pytorch-image-models",
"token_count": 1141
} | 365 |
# Builds CPU-only Docker image of PyTorch
# Uses multi-staged approach to reduce size
# Stage 1
FROM python:3.8-slim as compile-image
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt-get install -y --no-install-recommends \
build-essential \
git \
gcc
# Setup virtual environment for Docker
ENV V... | accelerate/docker/accelerate-cpu/Dockerfile/0 | {
"file_path": "accelerate/docker/accelerate-cpu/Dockerfile",
"repo_id": "accelerate",
"token_count": 380
} | 1 |
<jupyter_start><jupyter_text>Web Voyager[WebVoyager](https://arxiv.org/abs/2401.13919) by He, et. al., is a vision-enabled web-browsing agent capable of controlling the mouse and keyboard.It works by viewing annotated browser screenshots for each turn, then choosing the next step to take. The agent architecture is a ba... | langgraph/examples/web-navigation/web_voyager.ipynb/0 | {
"file_path": "langgraph/examples/web-navigation/web_voyager.ipynb",
"repo_id": "langgraph",
"token_count": 5239
} | 1,117 |
from typing import List, Optional
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.utilities.wikipedia import WikipediaAPIWrapper
class WikipediaLoader(BaseLoader):
"""Load from `Wikipedia`.
The hard limit on the length ... | langchain/libs/community/langchain_community/document_loaders/wikipedia.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/wikipedia.py",
"repo_id": "langchain",
"token_count": 872
} | 271 |
import { ChatTogetherAI } from "@langchain/community/chat_models/togetherai";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { convertToOpenAITool } from "@langchain/core/utils/function_calling";
import { Calculator } from "langchain/tools/calculator";
// Use a pre-built tool
const calculatorTool... | langchainjs/examples/src/models/chat/integration_togetherai_tools.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/integration_togetherai_tools.ts",
"repo_id": "langchainjs",
"token_count": 468
} | 806 |
[tool.poetry]
name = "hyde"
version = "0.0.1"
description = "Retrieval with Hypothetical Document Embeddings (HyDE)"
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
chromadb = "^0.4.15"
tiktoken = "^0.5.1"
[tool.poetry.group.dev.dependencies]
poeth... | langchain/templates/hyde/pyproject.toml/0 | {
"file_path": "langchain/templates/hyde/pyproject.toml",
"repo_id": "langchain",
"token_count": 417
} | 709 |
import type { TiktokenModel } from "js-tiktoken/lite";
import { type ClientOptions, OpenAI as OpenAIClient } from "openai";
import { calculateMaxTokens } from "@langchain/core/language_models/base";
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
import { GenerationChunk, type LLMResult } ... | langchainjs/libs/langchain-openai/src/llms.ts/0 | {
"file_path": "langchainjs/libs/langchain-openai/src/llms.ts",
"repo_id": "langchainjs",
"token_count": 6831
} | 982 |
## Running [llama2.c](https://github.com/karpathy/llama2.c) Examples
Here, we provide two examples of how to run [llama2.c](https://github.com/karpathy/llama2.c) written in Rust using a Candle-compiled WASM binary and runtimes.
### Pure Rust UI
To build and test the UI made in Rust you will need [Trunk](https://trun... | candle/candle-wasm-examples/llama2-c/README.md/0 | {
"file_path": "candle/candle-wasm-examples/llama2-c/README.md",
"repo_id": "candle",
"token_count": 449
} | 87 |
"""Robocorp Action Server toolkit."""
from __future__ import annotations
import json
from typing import Any, Callable, Dict, List, Optional, TypedDict
from urllib.parse import urljoin
import requests
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.callbacks.base import BaseCallbackH... | langchain/libs/partners/robocorp/langchain_robocorp/toolkits.py/0 | {
"file_path": "langchain/libs/partners/robocorp/langchain_robocorp/toolkits.py",
"repo_id": "langchain",
"token_count": 3264
} | 663 |
"""Generic Wrapper for chat LLMs, with sample implementations
for Llama-2-chat, Llama-2-instruct and Vicuna models.
"""
from typing import Any, List, Optional, cast
from langchain.callbacks.manager import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain.schema import (
AIMessage,... | langchain/libs/experimental/langchain_experimental/chat_models/llm_wrapper.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/chat_models/llm_wrapper.py",
"repo_id": "langchain",
"token_count": 2448
} | 415 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/shap-e.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/shap-e.md",
"repo_id": "diffusers",
"token_count": 2475
} | 185 |
# 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/encodec/convert_encodec_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/encodec/convert_encodec_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 7119
} | 682 |
import type { TextGenerationStreamOutput } from "@huggingface/inference";
import type OpenAI from "openai";
import type { Stream } from "openai/streaming";
/**
* Transform a stream of OpenAI.Chat.ChatCompletion into a stream of TextGenerationStreamOutput
*/
export async function* openAIChatToTextGenerationStream(
c... | chat-ui/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts/0 | {
"file_path": "chat-ui/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts",
"repo_id": "chat-ui",
"token_count": 320
} | 91 |
import { LlamaModel, LlamaContext } from "node-llama-cpp";
import { Embeddings, type EmbeddingsParams } from "@langchain/core/embeddings";
import {
LlamaBaseCppInputs,
createLlamaModel,
createLlamaContext,
} from "../utils/llama_cpp.js";
/**
* Note that the modelPath is the only required parameter. For testing ... | langchainjs/libs/langchain-community/src/embeddings/llama_cpp.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/llama_cpp.ts",
"repo_id": "langchainjs",
"token_count": 1015
} | 1,021 |
from llama_index.tools.shopify.base import ShopifyToolSpec
__all__ = ["ShopifyToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/__init__.py",
"repo_id": "llama_index",
"token_count": 30
} | 1,502 |
from typing import Optional
import numpy as np
import pytest
from langchain_core.documents import Document
from langchain_community.vectorstores import Qdrant
from tests.integration_tests.vectorstores.fake_embeddings import (
ConsistentFakeEmbeddings,
)
from tests.integration_tests.vectorstores.qdrant.async_api.f... | langchain/libs/community/tests/integration_tests/vectorstores/qdrant/async_api/test_similarity_search.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/qdrant/async_api/test_similarity_search.py",
"repo_id": "langchain",
"token_count": 4690
} | 381 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/dreambooth/test_dreambooth_lora.py/0 | {
"file_path": "diffusers/examples/dreambooth/test_dreambooth_lora.py",
"repo_id": "diffusers",
"token_count": 8107
} | 220 |
from langchain_community.vectorstores.myscale import (
MyScale,
MyScaleSettings,
MyScaleWithoutJSON,
)
__all__ = ["MyScaleSettings", "MyScale", "MyScaleWithoutJSON"]
| langchain/libs/langchain/langchain/vectorstores/myscale.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/myscale.py",
"repo_id": "langchain",
"token_count": 62
} | 585 |
"""Callback handler for promptlayer."""
from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple
from uuid import UUID
from langchain_core.callbacks import BaseCallbackHandler
from langchain_core.messages import (
AIMessage,
BaseMessage,
... | langchain/libs/community/langchain_community/callbacks/promptlayer_callback.py/0 | {
"file_path": "langchain/libs/community/langchain_community/callbacks/promptlayer_callback.py",
"repo_id": "langchain",
"token_count": 2638
} | 228 |
package funcutil
import (
"encoding/binary"
"math"
"github.com/cockroachdb/errors"
"github.com/golang/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
)
func FieldDataToPlaceholderGroupBytes(fieldData *schemapb.FieldData) ([]byte, er... | milvus/pkg/util/funcutil/placeholdergroup.go/0 | {
"file_path": "milvus/pkg/util/funcutil/placeholdergroup.go",
"repo_id": "milvus",
"token_count": 1645
} | 2,051 |
import os
import time
import uuid
from typing import Generator, Iterator, List
import pytest
from langchain_core.documents import Document
from langchain_community.document_loaders import TextLoader
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores import MomentoVectorI... | langchain/libs/community/tests/integration_tests/vectorstores/test_momento_vector_index.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_momento_vector_index.py",
"repo_id": "langchain",
"token_count": 2657
} | 393 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/text-to-speech.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/text-to-speech.md",
"repo_id": "transformers",
"token_count": 12020
} | 536 |
<!--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/idefics.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/idefics.md",
"repo_id": "transformers",
"token_count": 776
} | 478 |
import xml.etree.ElementTree as ET
import pytest
from llama_index.readers.file.xml import XMLReader
# Sample XML data for testing
SAMPLE_XML = """<?xml version="1.0" encoding="UTF-8"?>
<data>
<item type="fruit">
<name>Apple</name>
<color>Red</color>
<price>1.20</price>
</item>
<ite... | llama_index/llama-index-integrations/readers/llama-index-readers-file/tests/test_xml.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/tests/test_xml.py",
"repo_id": "llama_index",
"token_count": 706
} | 1,443 |
<jupyter_start><jupyter_text>Jina 8K Context Window EmbeddingsHere we show you how to use `jina-embeddings-v2` which support an 8k context length and is on-par with `text-embedding-ada-002`<jupyter_code>%pip install llama-index-embeddings-huggingface
%pip install llama-index-embeddings-openai
import nest_asyncio
nest_... | llama_index/docs/examples/embeddings/jina_embeddings.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/jina_embeddings.ipynb",
"repo_id": "llama_index",
"token_count": 876
} | 1,181 |
# SPNASNet
**Single-Path NAS** is a novel differentiable NAS method for designing hardware-efficient ConvNets in less than 4 hours.
{% include 'code_snippets.md' %}
## How do I train this model?
You can follow the [timm recipe scripts](https://rwightman.github.io/pytorch-image-models/scripts/) for training a new mo... | pytorch-image-models/docs/models/.templates/models/spnasnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/spnasnet.md",
"repo_id": "pytorch-image-models",
"token_count": 699
} | 364 |
import * as uuid from "uuid";
import type {
WeaviateClient,
WeaviateObject,
WhereFilter,
} from "weaviate-ts-client";
import {
MaxMarginalRelevanceSearchOptions,
VectorStore,
} from "@langchain/core/vectorstores";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { Document } from ... | langchainjs/libs/langchain-weaviate/src/vectorstores.ts/0 | {
"file_path": "langchainjs/libs/langchain-weaviate/src/vectorstores.ts",
"repo_id": "langchainjs",
"token_count": 5207
} | 1,024 |
import { test, expect } from "@jest/globals";
import { ChatOpenAI } from "@langchain/openai";
import type { ChatPromptTemplate } from "@langchain/core/prompts";
import { TavilySearchResults } from "@langchain/community/tools/tavily_search";
import { pull } from "../../hub.js";
import { AgentExecutor, createStructuredCh... | langchainjs/langchain/src/agents/tests/create_structured_chat_agent.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/create_structured_chat_agent.int.test.ts",
"repo_id": "langchainjs",
"token_count": 395
} | 896 |
"""Init file."""
| llama_index/llama-index-legacy/tests/embeddings/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/embeddings/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,794 |
package cgoconverter
import (
"bytes"
"fmt"
"testing"
"github.com/milvus-io/milvus/pkg/util/hardware"
)
func TestBytesConverter(t *testing.T) {
data := []byte("bytes converter test\n")
length := len(data)
cbytes := copyToCBytes(data)
lease, goBytes := UnsafeGoBytes(&cbytes, length)
defer Release(lease)
eq... | milvus/internal/util/cgoconverter/bytes_converter_test.go/0 | {
"file_path": "milvus/internal/util/cgoconverter/bytes_converter_test.go",
"repo_id": "milvus",
"token_count": 704
} | 1,867 |
// 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/query/generated/PlanNodeVisitor.h/0 | {
"file_path": "milvus/internal/core/src/query/generated/PlanNodeVisitor.h",
"repo_id": "milvus",
"token_count": 334
} | 1,931 |
// 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/mq/mqimpl/rocksmq/client/consumer_impl_test.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/client/consumer_impl_test.go",
"repo_id": "milvus",
"token_count": 1700
} | 1,866 |
// 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/common/error.go/0 | {
"file_path": "milvus/pkg/common/error.go",
"repo_id": "milvus",
"token_count": 524
} | 1,909 |
<jupyter_start><jupyter_text>Amazon API Gateway >[Amazon API Gateway](https://aws.amazon.com/api-gateway/) is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any >scale. APIs act as the "front door" for applications to access data, business logic, or f... | langchain/docs/docs/integrations/llms/amazon_api_gateway.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/amazon_api_gateway.ipynb",
"repo_id": "langchain",
"token_count": 988
} | 118 |
# coding=utf-8
# Copyright 2020 The Google AI Language Team Authors, Allegro.pl, Facebook Inc. 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://ww... | transformers/src/transformers/models/herbert/tokenization_herbert.py/0 | {
"file_path": "transformers/src/transformers/models/herbert/tokenization_herbert.py",
"repo_id": "transformers",
"token_count": 11759
} | 696 |
version: "3"
services:
test-langchain-with-latest-deps:
image: node:18
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
working_dir: /app
volumes:
- ../langchain:/langchain
- ./scripts:/scripts
command: bash /scripts/test-langchain-with-... | langchainjs/dependency_range_tests/docker-compose.yml/0 | {
"file_path": "langchainjs/dependency_range_tests/docker-compose.yml",
"repo_id": "langchainjs",
"token_count": 388
} | 698 |
# Deployment
You've built your LangChain app and now you're looking to deploy it to production? You've come to the right place. This guide will walk you through the options you have for deploying your app, and the considerations you should make when doing so.
## Overview
LangChain is a library for building applicati... | langchainjs/docs/core_docs/docs/production/deployment.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/production/deployment.mdx",
"repo_id": "langchainjs",
"token_count": 600
} | 796 |
#!/usr/bin/env python
# coding=utf-8
# Copyright The HuggingFace Team 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.ap... | transformers/examples/pytorch/multiple-choice/run_swag.py/0 | {
"file_path": "transformers/examples/pytorch/multiple-choice/run_swag.py",
"repo_id": "transformers",
"token_count": 8510
} | 550 |
# coding=utf-8
# Copyright 2021, The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | transformers/tests/models/mbart/test_modeling_mbart.py/0 | {
"file_path": "transformers/tests/models/mbart/test_modeling_mbart.py",
"repo_id": "transformers",
"token_count": 13301
} | 772 |
from __future__ import annotations
import re
from typing import Any, Dict, List, Optional
from langchain_community.graphs import NeptuneGraph
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts.base import BasePromptT... | langchain/libs/langchain/langchain/chains/graph_qa/neptune_cypher.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/graph_qa/neptune_cypher.py",
"repo_id": "langchain",
"token_count": 2882
} | 490 |
[
{
"suite_params": [
{
"suite": "locust_mix.yaml",
"image_type": "cpu"
}
]
}
]
| milvus/tests/benchmark/milvus_benchmark/scheduler/locust_mix_debug.json/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/scheduler/locust_mix_debug.json",
"repo_id": "milvus",
"token_count": 117
} | 1,869 |
from langchain_community.retrievers.elastic_search_bm25 import (
ElasticSearchBM25Retriever,
)
__all__ = ["ElasticSearchBM25Retriever"]
| langchain/libs/langchain/langchain/retrievers/elastic_search_bm25.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/elastic_search_bm25.py",
"repo_id": "langchain",
"token_count": 50
} | 539 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package allocator
import mock "github.com/stretchr/testify/mock"
// MockAllocator is an autogenerated mock type for the Interface type
type MockAllocator struct {
mock.Mock
}
type MockAllocator_Expecter struct {
mock *mock.Mock
}
func (_m *MockAllocator) EXPECT(... | milvus/internal/allocator/mock_allcoator.go/0 | {
"file_path": "milvus/internal/allocator/mock_allcoator.go",
"repo_id": "milvus",
"token_count": 1511
} | 1,774 |
import os
from typing import Any, Callable, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import (
DEFAULT_CONTEXT_WINDOW,
DEFAULT_NUM_OUTPUTS,
DEFAULT_TEMPERATURE,
)
from llama... | llama_index/llama-index-legacy/llama_index/legacy/llms/predibase.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/predibase.py",
"repo_id": "llama_index",
"token_count": 1882
} | 1,618 |
from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from langchain.callbacks.base import BaseCallbackHandler
from langchain.callbacks.streamlit.streamlit_callback_handler import (
LLMThoughtLabeler as LLMThoughtLabeler,
)
from langchain.callbacks.streamlit.streamlit_callback_handler impo... | langchain/libs/langchain/langchain/callbacks/streamlit/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/streamlit/__init__.py",
"repo_id": "langchain",
"token_count": 1085
} | 495 |
"""Pandas AI loader."""
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Any, List, Optional
import numpy as np
import pandas as pd
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
from llama_index.readers.file import PandasCSVReader
... | llama_index/llama-index-integrations/readers/llama-index-readers-pandas-ai/llama_index/readers/pandas_ai/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pandas-ai/llama_index/readers/pandas_ai/base.py",
"repo_id": "llama_index",
"token_count": 1682
} | 1,354 |
import logging
import os
import time
from argparse import Namespace
from pathlib import Path
import datasets
import torch
from accelerate import Accelerator, DistributedType
from accelerate.utils import ProjectConfiguration
from arguments import TrainingArguments
from datasets import load_dataset
from huggingface_hub ... | transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py/0 | {
"file_path": "transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py",
"repo_id": "transformers",
"token_count": 5418
} | 521 |
# 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/vilt/image_processing_vilt.py/0 | {
"file_path": "transformers/src/transformers/models/vilt/image_processing_vilt.py",
"repo_id": "transformers",
"token_count": 9685
} | 759 |
import {
AzureAISearchVectorStore,
AzureAISearchQueryType,
} from "@langchain/community/vectorstores/azure_aisearch";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { createStuffDocumentsChain } from "langchain/chains/combine_do... | langchainjs/examples/src/indexes/vector_stores/azure_aisearch/azure_aisearch.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/azure_aisearch/azure_aisearch.ts",
"repo_id": "langchainjs",
"token_count": 849
} | 871 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/program/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/program/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,627 |
"""LLM Types.
Maintain this file for backwards compat.
"""
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
MessageRole,
)
__all__... | llama_index/llama-index-legacy/llama_index/legacy/llms/types.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/types.py",
"repo_id": "llama_index",
"token_count": 206
} | 1,738 |
# coding=utf-8
# Copyright 2022 The EleutherAI and HuggingFace Teams. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | transformers/src/transformers/models/gptj/modeling_tf_gptj.py/0 | {
"file_path": "transformers/src/transformers/models/gptj/modeling_tf_gptj.py",
"repo_id": "transformers",
"token_count": 21162
} | 615 |
import asyncio
import json
import logging
from typing import Any, Callable, Dict, List, Optional, Tuple
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import Response
from llama_index.core.indices.struct_store.sql_retriever import (
BaseSQLParser,
... | llama_index/llama-index-core/llama_index/core/query_engine/jsonalyze_query_engine.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/query_engine/jsonalyze_query_engine.py",
"repo_id": "llama_index",
"token_count": 5606
} | 1,143 |
// 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/cache/hash.go/0 | {
"file_path": "milvus/pkg/util/cache/hash.go",
"repo_id": "milvus",
"token_count": 1249
} | 2,046 |
import logging
import os
import random
import string
import tempfile
import traceback
from copy import deepcopy
from pathlib import Path
from typing import Any, Dict, List, Optional, Sequence, Union
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import BaseCallbackHandler
from... | langchain/libs/community/langchain_community/callbacks/mlflow_callback.py/0 | {
"file_path": "langchain/libs/community/langchain_community/callbacks/mlflow_callback.py",
"repo_id": "langchain",
"token_count": 13499
} | 230 |
{
"fp16": {
"enabled": "auto",
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"bf16": {
"enabled": "auto"
},
"optimizer": {
"type": "AdamW",
"params": {
... | accelerate/tests/deepspeed/ds_config_zero2.json/0 | {
"file_path": "accelerate/tests/deepspeed/ds_config_zero2.json",
"repo_id": "accelerate",
"token_count": 680
} | 19 |
python_sources()
| llama_index/llama-index-core/llama_index/core/indices/composability/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/indices/composability/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,151 |
# coding=utf-8
# Copyright 2022 The OpenBMB Team and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/cpmant/test_tokenization_cpmant.py/0 | {
"file_path": "transformers/tests/models/cpmant/test_tokenization_cpmant.py",
"repo_id": "transformers",
"token_count": 1066
} | 778 |
---
sidebar_position: 0
---
# Quickstart
## Overview
We'll go over an example of how to design and implement an LLM-powered chatbot. Here are a few of the high-level components we'll be working with:
- `Chat Models`. The chatbot interface is based around messages rather than raw text, and therefore is best suited t... | langchainjs/docs/core_docs/docs/use_cases/chatbots/quickstart.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/chatbots/quickstart.mdx",
"repo_id": "langchainjs",
"token_count": 9729
} | 742 |
import json
import logging
import os
import subprocess
from argparse import ArgumentParser
logger = logging.getLogger(__name__)
def parse_args():
parser = ArgumentParser()
parsed, unknown = parser.parse_known_args()
for arg in unknown:
if arg.startswith(("-", "--")):
parser.add_argum... | transformers/tests/sagemaker/scripts/pytorch/run_ddp.py/0 | {
"file_path": "transformers/tests/sagemaker/scripts/pytorch/run_ddp.py",
"repo_id": "transformers",
"token_count": 694
} | 765 |
# LlamaIndex Output_Parsers Integration: Langchain
| llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-langchain/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-langchain/README.md",
"repo_id": "llama_index",
"token_count": 14
} | 1,293 |
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/ingestion/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/ingestion/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,192 |
---
hide_table_of_contents: true
---
# Blockchain Data
This example shows how to load blockchain data, including NFT metadata and transactions for a contract address, via the sort.xyz SQL API.
You will need a free Sort API key, visiting sort.xyz to obtain one.
import CodeBlock from "@theme/CodeBlock";
import Exampl... | langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/sort_xyz_blockchain.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/sort_xyz_blockchain.mdx",
"repo_id": "langchainjs",
"token_count": 187
} | 706 |
<!---
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 ... | transformers/examples/research_projects/layoutlmv3/README.md/0 | {
"file_path": "transformers/examples/research_projects/layoutlmv3/README.md",
"repo_id": "transformers",
"token_count": 969
} | 526 |
from typing import List
from langchain_community.document_loaders.unstructured import UnstructuredFileLoader
class UnstructuredHTMLLoader(UnstructuredFileLoader):
"""Load `HTML` files using `Unstructured`.
You can run the loader in one of two modes: "single" and "elements".
If you use "single" mode, the... | langchain/libs/community/langchain_community/document_loaders/html.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/html.py",
"repo_id": "langchain",
"token_count": 372
} | 257 |
import inspect
from typing import Callable, List, Optional, Union
import PIL.Image
import torch
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModel
from ....models import AutoencoderKL, UNet2DConditionModel
from ....schedulers import KarrasDiffusionSchedulers
from ....utils impo... | diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py",
"repo_id": "diffusers",
"token_count": 9160
} | 245 |
from llama_index.callbacks.openinference.base import OpenInferenceCallbackHandler
from llama_index.core.callbacks.base_handler import BaseCallbackHandler
def test_handler_callable():
names_of_base_classes = [b.__name__ for b in OpenInferenceCallbackHandler.__mro__]
assert BaseCallbackHandler.__name__ in names... | llama_index/llama-index-integrations/callbacks/llama-index-callbacks-openinference/tests/test_openinference_callback.py/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-openinference/tests/test_openinference_callback.py",
"repo_id": "llama_index",
"token_count": 102
} | 1,248 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package cluster
import (
context "context"
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
mock "github.com/stretchr/testify/mock"
querypb "github.com/milvus-io/milvus/internal/proto/querypb"
streamrpc "github.com/milvus-io/milvus/internal/... | milvus/internal/querynodev2/cluster/mock_worker.go/0 | {
"file_path": "milvus/internal/querynodev2/cluster/mock_worker.go",
"repo_id": "milvus",
"token_count": 5531
} | 1,985 |
"""Init params."""
| llama_index/llama-index-legacy/tests/indices/document_summary/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/indices/document_summary/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,733 |
<jupyter_start><jupyter_text>Tools as OpenAI FunctionsThis notebook goes over how to use LangChain tools as OpenAI functions.<jupyter_code>%pip install -qU langchain-community langchain-openai
from langchain_community.tools import MoveFileTool
from langchain_core.messages import HumanMessage
from langchain_core.utils.f... | langchain/docs/docs/modules/agents/tools/tools_as_openai_functions.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/agents/tools/tools_as_openai_functions.ipynb",
"repo_id": "langchain",
"token_count": 421
} | 197 |
"""Init params."""
| llama_index/llama-index-core/llama_index/core/agent/custom/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/agent/custom/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,136 |
"""Multi-Modal Evaluation Modules."""
from llama_index.core.evaluation.multi_modal.faithfulness import (
MultiModalFaithfulnessEvaluator,
)
from llama_index.core.evaluation.multi_modal.relevancy import (
MultiModalRelevancyEvaluator,
)
__all__ = ["MultiModalRelevancyEvaluator", "MultiModalFaithfulnessEvaluato... | llama_index/llama-index-core/llama_index/core/evaluation/multi_modal/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/evaluation/multi_modal/__init__.py",
"repo_id": "llama_index",
"token_count": 117
} | 1,146 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.minio import BotoMinioReader, MinioReader
def test_class():
names_of_base_classes = [b.__name__ for b in BotoMinioReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
names_of_base_classes = [b.__name__ for b in ... | llama_index/llama-index-integrations/readers/llama-index-readers-minio/tests/test_readers_minio.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-minio/tests/test_readers_minio.py",
"repo_id": "llama_index",
"token_count": 145
} | 1,404 |
from llama_index.readers.file.mbox.base import MboxReader
__all__ = ["MboxReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/mbox/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/mbox/__init__.py",
"repo_id": "llama_index",
"token_count": 31
} | 1,368 |
from langchain_community.llms.tongyi import (
Tongyi,
)
__all__ = [
"Tongyi",
]
| langchain/libs/langchain/langchain/llms/tongyi.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/tongyi.py",
"repo_id": "langchain",
"token_count": 42
} | 544 |
kind: IOChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-minio-io-latency
namespace: chaos-testing
spec:
selector:
namespaces:
- chaos-testing
labelSelectors:
app: minio
release: milvus-chaos
mode: all
action: latency
delay: 10ms
methods:
- read
- write
... | milvus/tests/python_client/chaos/chaos_objects/io_latency/chaos_minio_io_latency.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/io_latency/chaos_minio_io_latency.yaml",
"repo_id": "milvus",
"token_count": 150
} | 2,019 |
from langchain_community.chat_message_histories.elasticsearch import (
ElasticsearchChatMessageHistory,
)
__all__ = ["ElasticsearchChatMessageHistory"]
| langchain/libs/langchain/langchain/memory/chat_message_histories/elasticsearch.py/0 | {
"file_path": "langchain/libs/langchain/langchain/memory/chat_message_histories/elasticsearch.py",
"repo_id": "langchain",
"token_count": 45
} | 569 |
/*!
**************************************************************************
* Deformable DETR
* Copyright (c) 2020 SenseTime. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 [see LICENSE for details]
**************************************************************************
* Modified from DCN ... | transformers/src/transformers/kernels/deformable_detr/cuda/ms_deform_im2col_cuda.cuh/0 | {
"file_path": "transformers/src/transformers/kernels/deformable_detr/cuda/ms_deform_im2col_cuda.cuh",
"repo_id": "transformers",
"token_count": 31688
} | 575 |
import { test, expect } from "@jest/globals";
import { DataSource } from "typeorm";
import {
getPromptTemplateFromDataSource,
verifyIgnoreTablesExistInDatabase,
verifyIncludeTablesExistInDatabase,
} from "../sql_utils.js";
import { SQL_SQLITE_PROMPT } from "../../chains/sql_db/sql_db_prompt.js";
test("Find inclu... | langchainjs/langchain/src/util/tests/sql_utils.test.ts/0 | {
"file_path": "langchainjs/langchain/src/util/tests/sql_utils.test.ts",
"repo_id": "langchainjs",
"token_count": 854
} | 962 |
# coding=utf-8
# Copyright 2023 Google AI 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/vivit/modeling_vivit.py/0 | {
"file_path": "transformers/src/transformers/models/vivit/modeling_vivit.py",
"repo_id": "transformers",
"token_count": 12679
} | 674 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.