text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
[tool.poetry]
name = "neo4j-vector-memory"
version = "0.1.0"
description = "Store conversational flows in a Neo4j graph database"
authors = [
"Tomaz Bratanic <tomaz.bratanic@neo4j.com>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
tiktoken = "^0.5.1"
openai = "<2"
n... | langchain/templates/neo4j-vector-memory/pyproject.toml/0 | {
"file_path": "langchain/templates/neo4j-vector-memory/pyproject.toml",
"repo_id": "langchain",
"token_count": 316
} | 680 |
use crate::benchmarks::{BenchDevice, BenchDeviceHandler};
use candle_core::{DType, Device, Tensor};
use criterion::{black_box, criterion_group, Criterion, Throughput};
use std::time::Instant;
fn run(a: &Tensor, b: &Tensor) {
a.matmul(&b.t().unwrap()).unwrap();
}
fn run_bench(c: &mut Criterion, device: &Device) {
... | candle/candle-core/benches/benchmarks/matmul.rs/0 | {
"file_path": "candle/candle-core/benches/benchmarks/matmul.rs",
"repo_id": "candle",
"token_count": 551
} | 30 |
---
sidebar_class_name: hidden
hide_table_of_contents: true
---
# Conversational Retrieval QA
:::info
Looking for the LCEL version? Click [here](/docs/modules/chains/popular/chat_vector_db).
:::
The ConversationalRetrievalQA chain builds on RetrievalQAChain to provide a chat history component.
It first combines the... | langchainjs/docs/core_docs/docs/modules/chains/popular/chat_vector_db_legacy.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/chains/popular/chat_vector_db_legacy.mdx",
"repo_id": "langchainjs",
"token_count": 1730
} | 806 |
<jupyter_start><jupyter_text>Notion DB 1/2>[Notion](https://www.notion.so/) is a collaboration platform with modified Markdown support that integrates kanban boards, tasks, wikis and databases. It is an all-in-one workspace for notetaking, knowledge and data management, and project and task management.This notebook cov... | langchain/docs/docs/integrations/document_loaders/notion.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/notion.ipynb",
"repo_id": "langchain",
"token_count": 317
} | 107 |
import csv
from langchain.chains.question_answering import load_qa_chain
from langchain_community.embeddings import CohereEmbeddings
from langchain_community.vectorstores import Chroma
from langchain_core.prompts import PromptTemplate
from .chat import chat
csv_file = open("data/books_with_blurbs.csv", "r")
csv_read... | langchain/templates/cohere-librarian/cohere_librarian/blurb_matcher.py/0 | {
"file_path": "langchain/templates/cohere-librarian/cohere_librarian/blurb_matcher.py",
"repo_id": "langchain",
"token_count": 491
} | 640 |
# Additional Readings [[additional-readings]]
## Bias-variance tradeoff in Reinforcement Learning
If you want to dive deeper into the question of variance and bias tradeoff in Deep Reinforcement Learning, you can check out these two articles:
- [Making Sense of the Bias / Variance Trade-off in (Deep) Reinforcement L... | deep-rl-class/units/en/unit6/additional-readings.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit6/additional-readings.mdx",
"repo_id": "deep-rl-class",
"token_count": 321
} | 164 |
import { expect, test } from "@jest/globals";
import type { PoolConfig } from "pg";
import { OpenAIEmbeddings } from "@langchain/openai";
import { PGVectorStore } from "../../pgvector.js";
describe("PGVectorStore", () => {
let pgvectorVectorStore: PGVectorStore;
const tableName = "testlangchain";
beforeAll(asyn... | langchainjs/libs/langchain-community/src/vectorstores/tests/pgvector/pgvector.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/pgvector/pgvector.int.test.ts",
"repo_id": "langchainjs",
"token_count": 2332
} | 1,053 |
{
"imports": {
"http/": "https://deno.land/std@0.177.0/http/",
"@supabase/supabase-js": "https://esm.sh/@supabase/supabase-js@2.15.0",
"langchain/": "https://esm.sh/langchain@0.0.52&no-dts/"
}
}
| langchain-template-supabase/supabase/functions/import_map_deploy.json/0 | {
"file_path": "langchain-template-supabase/supabase/functions/import_map_deploy.json",
"repo_id": "langchain-template-supabase",
"token_count": 106
} | 71 |
# 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 applicabl... | accelerate/tests/test_optimizer.py/0 | {
"file_path": "accelerate/tests/test_optimizer.py",
"repo_id": "accelerate",
"token_count": 1209
} | 21 |
# 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/examples/loftq_finetuning/quantize_save_load.py/0 | {
"file_path": "peft/examples/loftq_finetuning/quantize_save_load.py",
"repo_id": "peft",
"token_count": 2835
} | 329 |
# coding=utf-8
# Copyright 2023 Meta 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.0
... | transformers/src/transformers/models/musicgen/configuration_musicgen.py/0 | {
"file_path": "transformers/src/transformers/models/musicgen/configuration_musicgen.py",
"repo_id": "transformers",
"token_count": 4065
} | 646 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 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/examples/pytorch/language-modeling/run_clm.py/0 | {
"file_path": "transformers/examples/pytorch/language-modeling/run_clm.py",
"repo_id": "transformers",
"token_count": 12007
} | 549 |
# Agent-Search Retrieval Pack
This LlamaPack creates a custom retriever that uses the agent-search API for retrieving general content indexed from the internet.
This framework facilitates seamless integration with the AgentSearch dataset (terabytes of indexed data!) or hosted search APIs (e.g. Search Engines).
Durin... | llama_index/llama-index-packs/llama-index-packs-agent-search-retriever/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-agent-search-retriever/README.md",
"repo_id": "llama_index",
"token_count": 657
} | 1,827 |
""" Dataset Module."""
from llama_index.core.llama_dataset.base import (
BaseLlamaDataExample,
BaseLlamaDataset,
BaseLlamaExamplePrediction,
BaseLlamaPredictionDataset,
CreatedBy,
CreatedByType,
)
from llama_index.core.llama_dataset.download import download_llama_dataset
from llama_index.core.l... | llama_index/llama-index-core/llama_index/core/llama_dataset/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llama_dataset/__init__.py",
"repo_id": "llama_index",
"token_count": 764
} | 1,227 |
"""Test LLMRailsEmbeddings embeddings"""
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture
from langchain_community.embeddings import LLMRailsEmbeddings
def test_api_key_is_string() -> None:
llm = LLMRailsEmbeddings(api_key="secret-api-key")
assert isinstance(llm.api_key, Se... | langchain/libs/community/tests/unit_tests/embeddings/test_llm_rails.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/embeddings/test_llm_rails.py",
"repo_id": "langchain",
"token_count": 225
} | 381 |
package proxy
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/parser/planparserv2"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/pkg/common"
"github.com/milvus-io/milvus/pkg/... | milvus/internal/proxy/expr_checker_test.go/0 | {
"file_path": "milvus/internal/proxy/expr_checker_test.go",
"repo_id": "milvus",
"token_count": 2206
} | 1,845 |
#!/usr/bin/env python
# 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
#
# Unles... | accelerate/src/accelerate/commands/config/config.py/0 | {
"file_path": "accelerate/src/accelerate/commands/config/config.py",
"repo_id": "accelerate",
"token_count": 1067
} | 13 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,493 |
"""__ModuleName__ large language models."""
from typing import (
Any,
AsyncIterator,
Iterator,
List,
Optional,
)
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_core.language_models import BaseLLM
from langchain_core.outputs i... | langchain/libs/cli/langchain_cli/integration_template/integration_template/llms.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/integration_template/integration_template/llms.py",
"repo_id": "langchain",
"token_count": 851
} | 221 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or... | transformers/src/transformers/models/distilbert/modeling_tf_distilbert.py/0 | {
"file_path": "transformers/src/transformers/models/distilbert/modeling_tf_distilbert.py",
"repo_id": "transformers",
"token_count": 21218
} | 594 |
<!--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... | peft/docs/source/quicktour.md/0 | {
"file_path": "peft/docs/source/quicktour.md",
"repo_id": "peft",
"token_count": 2384
} | 315 |
python_tests(
name="tests",
)
| llama_index/llama-index-finetuning/tests/rerankers/BUILD/0 | {
"file_path": "llama_index/llama-index-finetuning/tests/rerankers/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,175 |
"""Chain for summarization with self-verification."""
from __future__ import annotations
import warnings
from pathlib import Path
from typing import Any, Dict, List, Optional
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_co... | langchain/libs/langchain/langchain/chains/llm_summarization_checker/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/llm_summarization_checker/base.py",
"repo_id": "langchain",
"token_count": 2993
} | 463 |
<jupyter_start><jupyter_text>Using Apache Kafka to route messages---This notebook shows you how to use LangChain's standard chat features while passing the chat messages back and forth via Apache Kafka.This goal is to simulate an architecture where the chat front end and the LLM are running as separate services that ne... | langchain/cookbook/apache_kafka_message_handling.ipynb/0 | {
"file_path": "langchain/cookbook/apache_kafka_message_handling.ipynb",
"repo_id": "langchain",
"token_count": 3822
} | 69 |
"""Callback Handler that prints to std out."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Optional
from langchain_core.callbacks.base import BaseCallbackHandler
from langchain_core.utils import print_text
if TYPE_CHECKING:
from langchain_core.agents import AgentAction, Agent... | langchain/libs/core/langchain_core/callbacks/stdout.py/0 | {
"file_path": "langchain/libs/core/langchain_core/callbacks/stdout.py",
"repo_id": "langchain",
"token_count": 948
} | 388 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/observers/target_observer.go/0 | {
"file_path": "milvus/internal/querycoordv2/observers/target_observer.go",
"repo_id": "milvus",
"token_count": 5494
} | 1,864 |
# Token classification
## PyTorch version, no Trainer
Fine-tuning (m)LUKE for token classification task such as Named Entity Recognition (NER), Parts-of-speech
tagging (POS) or phrase extraction (CHUNKS). You can easily
customize it to your needs if you need extra processing on your datasets.
It will either run on a... | transformers/examples/research_projects/luke/README.md/0 | {
"file_path": "transformers/examples/research_projects/luke/README.md",
"repo_id": "transformers",
"token_count": 667
} | 547 |
<jupyter_start><jupyter_text>Two-Player Dungeons & DragonsIn this notebook, we show how we can use concepts from [CAMEL](https://www.camel-ai.org/) to simulate a role-playing game with a protagonist and a dungeon master. To simulate this game, we create an `DialogueSimulator` class that coordinates the dialogue between... | langchain/cookbook/two_player_dnd.ipynb/0 | {
"file_path": "langchain/cookbook/two_player_dnd.ipynb",
"repo_id": "langchain",
"token_count": 3401
} | 82 |
<jupyter_start><jupyter_text>An Introduction to LlamaIndex Query Pipelines OverviewLlamaIndex provides a declarative query API that allows you to chain together different modules in order to orchestrate simple-to-advanced workflows over your data.This is centered around our `QueryPipeline` abstraction. Load in a variet... | llama_index/docs/examples/pipeline/query_pipeline.ipynb/0 | {
"file_path": "llama_index/docs/examples/pipeline/query_pipeline.ipynb",
"repo_id": "llama_index",
"token_count": 6503
} | 1,124 |
"""Base callback handler that can be used to handle callbacks in langchain."""
from __future__ import annotations
from langchain_core.callbacks import (
AsyncCallbackHandler,
BaseCallbackHandler,
BaseCallbackManager,
CallbackManagerMixin,
Callbacks,
ChainManagerMixin,
LLMManagerMixin,
R... | langchain/libs/langchain/langchain/callbacks/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/base.py",
"repo_id": "langchain",
"token_count": 236
} | 472 |
import os
import tempfile
from functools import partial
from unittest import TestCase
from unittest.mock import patch
import datasets
import datasets.config
from .utils import require_beam
class DummyBeamDataset(datasets.BeamBasedBuilder):
"""Dummy beam dataset."""
def _info(self):
return datasets.... | datasets/tests/test_beam.py/0 | {
"file_path": "datasets/tests/test_beam.py",
"repo_id": "datasets",
"token_count": 3077
} | 166 |
<jupyter_start><jupyter_text>Konko If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.>[Konko](https://www.konko.ai/) API is a fully managed Web API designed to help application developers:Konko API is a fully managed API designed to help application developers:1. Select the right... | llama_index/docs/examples/llm/konko.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/konko.ipynb",
"repo_id": "llama_index",
"token_count": 2844
} | 1,126 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | accelerate/docs/source/package_reference/state.md/0 | {
"file_path": "accelerate/docs/source/package_reference/state.md",
"repo_id": "accelerate",
"token_count": 291
} | 4 |
<jupyter_start><jupyter_text>Ollama Embeddings If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-ollama
!pip install llama-index
from llama_index.embeddings.ollama import OllamaEmbedding
ollama_embedding = OllamaEmbedding(
mo... | llama_index/docs/examples/embeddings/ollama_embedding.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/ollama_embedding.ipynb",
"repo_id": "llama_index",
"token_count": 261
} | 1,099 |
import os
import tempfile
import urllib.parse
from typing import Any, List, Optional
from urllib.parse import urljoin
import requests
from langchain_core.documents import Document
from requests.auth import HTTPBasicAuth
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document... | langchain/libs/community/langchain_community/document_loaders/lakefs.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/lakefs.py",
"repo_id": "langchain",
"token_count": 2793
} | 253 |
import { OpenAI } from "@langchain/openai";
import { loadSummarizationChain } from "langchain/chains";
import { Document } from "@langchain/core/documents";
export const run = async () => {
const model = new OpenAI({});
const chain = loadSummarizationChain(model, { type: "stuff" });
const docs = [
new Docume... | langchainjs/examples/src/chains/summarization.ts/0 | {
"file_path": "langchainjs/examples/src/chains/summarization.ts",
"repo_id": "langchainjs",
"token_count": 168
} | 795 |
# 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/tests/pipelines/stable_diffusion_gligen_text_image/test_stable_diffusion_gligen_text_image.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_gligen_text_image/test_stable_diffusion_gligen_text_image.py",
"repo_id": "diffusers",
"token_count": 3232
} | 291 |
"""Llama Dataset Class."""
import json
from abc import abstractmethod
from enum import Enum
from typing import Generator, Generic, List, Optional, Type, TypeVar, Union
import tqdm
from llama_index.core.async_utils import asyncio_module
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_ind... | llama_index/llama-index-core/llama_index/core/llama_dataset/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llama_dataset/base.py",
"repo_id": "llama_index",
"token_count": 4632
} | 1,198 |
## 2. Schema
#### 2.1 Collection Schema
```go
type CollectionSchema struct {
Name string
Description string
AutoId bool
Fields []*FieldSchema
}
```
#### 2.2 Field Schema
```go
type FieldSchema struct {
FieldID int64
Name string
IsPrimaryKey bool
Description string
DataType ... | milvus/docs/developer_guides/chap02_schema.md/0 | {
"file_path": "milvus/docs/developer_guides/chap02_schema.md",
"repo_id": "milvus",
"token_count": 4900
} | 1,909 |
import {
type OpenAIClientOptions as AzureOpenAIClientOptions,
OpenAIClient as AzureOpenAIClient,
AzureExtensionsOptions,
ChatRequestMessage,
ChatResponseMessage,
AzureKeyCredential,
ChatCompletions,
EventStream,
ChatCompletionsToolDefinition,
ChatCompletionsNamedToolSelection,
ChatCompletionsResp... | langchainjs/libs/langchain-azure-openai/src/chat_models.ts/0 | {
"file_path": "langchainjs/libs/langchain-azure-openai/src/chat_models.ts",
"repo_id": "langchainjs",
"token_count": 8216
} | 973 |
from llama_index.llms.anthropic.base import Anthropic
__all__ = ["Anthropic"]
| llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/llama_index/llms/anthropic/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/llama_index/llms/anthropic/__init__.py",
"repo_id": "llama_index",
"token_count": 28
} | 1,388 |
import { UnstructuredDirectoryLoader } from "langchain/document_loaders/fs/unstructured";
const options = {
apiKey: "MY_API_KEY",
};
const loader = new UnstructuredDirectoryLoader(
"langchain/src/document_loaders/tests/example_data",
options
);
const docs = await loader.load();
| langchainjs/examples/src/document_loaders/unstructured_directory.ts/0 | {
"file_path": "langchainjs/examples/src/document_loaders/unstructured_directory.ts",
"repo_id": "langchainjs",
"token_count": 90
} | 798 |
import asyncio
from typing import TYPE_CHECKING, Any, List, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
Embedding,... | llama_index/llama-index-legacy/llama_index/legacy/embeddings/huggingface.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/embeddings/huggingface.py",
"repo_id": "llama_index",
"token_count": 5049
} | 1,701 |
<jupyter_start><jupyter_text>Huggingface Sagemaker-sdk - Run a batch transform inference job with 🤗 Transformers 1. [Introduction](Introduction) 2. [Run Batch Transform after training a model](Run-Batch-Transform-after-training-a-model) 3. [Run Batch Transform Inference Job with a fine-tuned model using `jsonl`](Run... | notebooks/sagemaker/12_batch_transform_inference/sagemaker-notebook.ipynb/0 | {
"file_path": "notebooks/sagemaker/12_batch_transform_inference/sagemaker-notebook.ipynb",
"repo_id": "notebooks",
"token_count": 2457
} | 327 |
## Diffusers examples with Intel optimizations
**This research project is not actively maintained by the diffusers team. For any questions or comments, please make sure to tag @hshen14 .**
This aims to provide diffusers examples with Intel optimizations such as Bfloat16 for training/fine-tuning acceleration and 8-bit... | diffusers/examples/research_projects/intel_opts/README.md/0 | {
"file_path": "diffusers/examples/research_projects/intel_opts/README.md",
"repo_id": "diffusers",
"token_count": 528
} | 225 |
from llama_index.legacy.postprocessor import MetadataReplacementPostProcessor
from llama_index.legacy.schema import NodeWithScore, TextNode
def test_metadata_replacement() -> None:
node = TextNode(
text="This is a test 1.", metadata={"key": "This is a another test."}
)
nodes = [NodeWithScore(node... | llama_index/llama-index-legacy/tests/postprocessor/test_metadata_replacement.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/postprocessor/test_metadata_replacement.py",
"repo_id": "llama_index",
"token_count": 192
} | 1,811 |
kind: IOChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-etcd-io-latency
namespace: chaos-testing
spec:
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/name: etcd
app.kubernetes.io/instance: milvus-chaos
mode: all
action: latency
delay: 10ms
... | milvus/tests/python_client/chaos/chaos_objects/io_latency/chaos_etcd_io_latency.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/io_latency/chaos_etcd_io_latency.yaml",
"repo_id": "milvus",
"token_count": 172
} | 2,105 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/segcore/ReduceStructure.h/0 | {
"file_path": "milvus/internal/core/src/segcore/ReduceStructure.h",
"repo_id": "milvus",
"token_count": 1326
} | 1,667 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/rootcoord/has_partition_task.go/0 | {
"file_path": "milvus/internal/rootcoord/has_partition_task.go",
"repo_id": "milvus",
"token_count": 640
} | 1,785 |
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.metal import MetalVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in MetalVectorStore.__mro__]
assert VectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/tests/test_vector_stores_metal.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-metal/tests/test_vector_stores_metal.py",
"repo_id": "llama_index",
"token_count": 89
} | 1,488 |
import {
DocumentCollection,
IDocument,
NotFoundError,
ZepClient,
} from "@getzep/zep-js";
import {
MaxMarginalRelevanceSearchOptions,
VectorStore,
} from "@langchain/core/vectorstores";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { Document } from "@langchain/core/documen... | langchainjs/libs/langchain-community/src/vectorstores/zep.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/zep.ts",
"repo_id": "langchainjs",
"token_count": 4857
} | 1,057 |
import json
import logging
import os
from typing import Dict, Optional
import fsspec
from llama_index.core.storage.kvstore.types import (
DEFAULT_COLLECTION,
BaseInMemoryKVStore,
)
logger = logging.getLogger(__name__)
DATA_TYPE = Dict[str, Dict[str, dict]]
class SimpleKVStore(BaseInMemoryKVStore):
"""S... | llama_index/llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py",
"repo_id": "llama_index",
"token_count": 1462
} | 1,221 |
package indexparamcheck
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
)
func Test_floatVectorBaseChecker_CheckValidDataType(t *testing.T) {
cases := []struct {
dType schemapb.DataType
errIsNil bool
}{
{
dType: schemapb.DataType_Boo... | milvus/pkg/util/indexparamcheck/float_vector_base_checker_test.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/float_vector_base_checker_test.go",
"repo_id": "milvus",
"token_count": 714
} | 1,830 |
[tool.poetry]
name = "rag-chroma-private"
version = "0.1.0"
description = "Private RAG using local LLM, embeddings, vectorstore"
authors = [
"Lance Martin <lance@langchain.dev>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
tiktoken = ">=0.5.1"
chromadb = ">=0.4.14"
... | langchain/templates/rag-chroma-private/pyproject.toml/0 | {
"file_path": "langchain/templates/rag-chroma-private/pyproject.toml",
"repo_id": "langchain",
"token_count": 335
} | 691 |
<jupyter_start><jupyter_text>Writer[Writer](https://writer.com/) is a platform to generate different language content.This example goes over how to use LangChain to interact with `Writer` [models](https://dev.writer.com/docs/models).You have to get the WRITER_API_KEY [here](https://dev.writer.com/docs).<jupyter_code>fr... | langchain/docs/docs/integrations/llms/writer.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/writer.ipynb",
"repo_id": "langchain",
"token_count": 312
} | 123 |
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.deeplake_deepmemory_retriever import DeepMemoryRetrieverPack
def test_class():
names_of_base_classes = [b.__name__ for b in DeepMemoryRetrieverPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/tests/test_packs_deeplake_deepmemory_retriever.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-deeplake-deepmemory-retriever/tests/test_packs_deeplake_deepmemory_retriever.py",
"repo_id": "llama_index",
"token_count": 108
} | 1,649 |
The tokenization pipeline
====================================================================================================
When calling :entity:`Tokenizer.encode` or :entity:`Tokenizer.encode_batch`, the input text(s) go
through the following pipeline:
- :ref:`normalization`
- :ref:`pre-tokenization`
- :ref:`mode... | tokenizers/docs/source/pipeline.rst/0 | {
"file_path": "tokenizers/docs/source/pipeline.rst",
"repo_id": "tokenizers",
"token_count": 6323
} | 425 |
# Default configuration for Chroma worker
# In the long term, every service should have an entry in this file
# and this can become the global configuration file for Chroma
# for now we nest it in the worker directory
worker:
my_ip: "10.244.0.9"
my_port: 50051
num_indexing_threads: 4
pulsar_url: "pulsa... | chroma/rust/worker/chroma_config.yaml/0 | {
"file_path": "chroma/rust/worker/chroma_config.yaml",
"repo_id": "chroma",
"token_count": 397
} | 54 |
"""Test Minimax llm"""
from typing import cast
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture, MonkeyPatch
from langchain_community.llms.minimax import Minimax
def test_api_key_is_secret_string() -> None:
llm = Minimax(minimax_api_key="secret-api-key", minimax_group_id="grou... | langchain/libs/community/tests/unit_tests/llms/test_minimax.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/llms/test_minimax.py",
"repo_id": "langchain",
"token_count": 567
} | 402 |
# 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 applicabl... | transformers/src/transformers/models/convnext/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/convnext/__init__.py",
"repo_id": "transformers",
"token_count": 1189
} | 582 |
---
sidebar_label: AWS Step Functions Toolkit
hide_table_of_contents: true
---
# AWS Step Functions Toolkit
**AWS Step Functions** are a visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning... | langchainjs/docs/core_docs/docs/integrations/toolkits/sfn_agent.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/toolkits/sfn_agent.mdx",
"repo_id": "langchainjs",
"token_count": 438
} | 714 |
from llama_index.legacy.chat_engine.simple import SimpleChatEngine
from llama_index.legacy.core.llms.types import ChatMessage, MessageRole
from llama_index.legacy.service_context import ServiceContext
def test_simple_chat_engine(
mock_service_context: ServiceContext,
) -> None:
engine = SimpleChatEngine.from_... | llama_index/llama-index-legacy/tests/chat_engine/test_simple.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/chat_engine/test_simple.py",
"repo_id": "llama_index",
"token_count": 520
} | 1,616 |
from llama_index.core.multi_modal_llms.base import MultiModalLLM
from llama_index.multi_modal_llms.ollama import OllamaMultiModal
def test_class():
names_of_base_classes = [b.__name__ for b in OllamaMultiModal.__mro__]
assert MultiModalLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-ollama/tests/test_multi_modal_llms_ollama.py/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-ollama/tests/test_multi_modal_llms_ollama.py",
"repo_id": "llama_index",
"token_count": 110
} | 1,249 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/markuplm/feature_extraction_markuplm.py/0 | {
"file_path": "transformers/src/transformers/models/markuplm/feature_extraction_markuplm.py",
"repo_id": "transformers",
"token_count": 2744
} | 695 |
# Examples
In this folder we showcase some examples to use code models for downstream tasks.
## Complexity prediction
In this task we want to predict the complexity of Java programs in [CodeComplex](https://huggingface.co/datasets/codeparrot/codecomplex) dataset. Using Hugging Face `trainer`, we finetuned [multilingua... | transformers/examples/research_projects/codeparrot/examples/README.md/0 | {
"file_path": "transformers/examples/research_projects/codeparrot/examples/README.md",
"repo_id": "transformers",
"token_count": 1170
} | 594 |
from llama_index.output_parsers.guardrails.base import GuardrailsOutputParser
__all__ = ["GuardrailsOutputParser"]
| llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-guardrails/llama_index/output_parsers/guardrails/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-guardrails/llama_index/output_parsers/guardrails/__init__.py",
"repo_id": "llama_index",
"token_count": 37
} | 1,346 |
// eslint-disable-next-line import/no-extraneous-dependencies
import { v } from "convex/values";
import { FakeEmbeddings } from "@langchain/core/utils/testing";
import { ConvexVectorStore } from "../../../convex.js";
import { action, mutation } from "./_generated/server.js";
export const reset = mutation({
args: {},... | langchainjs/libs/langchain-community/src/vectorstores/tests/convex/convex/lib.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/convex/convex/lib.ts",
"repo_id": "langchainjs",
"token_count": 437
} | 1,007 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle T5</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import ur... | candle/candle-wasm-examples/t5/index.html/0 | {
"file_path": "candle/candle-wasm-examples/t5/index.html",
"repo_id": "candle",
"token_count": 4724
} | 77 |
from __future__ import annotations
import logging
from enum import Enum
from typing import (
TYPE_CHECKING,
Any,
Dict,
Generator,
Iterable,
List,
Optional,
Tuple,
TypeVar,
Union,
)
import numpy as np
from langchain_core.documents import Document
from langchain_core.vectorstores... | langchain/libs/community/langchain_community/vectorstores/azure_cosmos_db.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/azure_cosmos_db.py",
"repo_id": "langchain",
"token_count": 6413
} | 306 |
from langchain_community.callbacks.aim_callback import (
AimCallbackHandler,
BaseMetadataCallbackHandler,
import_aim,
)
__all__ = ["import_aim", "BaseMetadataCallbackHandler", "AimCallbackHandler"]
| langchain/libs/langchain/langchain/callbacks/aim_callback.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/aim_callback.py",
"repo_id": "langchain",
"token_count": 66
} | 448 |
python_test_utils(
name="test_utils",
)
python_tests(
name="tests",
skip_tests=True,
)
| llama_index/llama-index-legacy/tests/storage/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/tests/storage/BUILD",
"repo_id": "llama_index",
"token_count": 45
} | 1,758 |
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { VectorStore } from "@langchain/core/vectorstores";
import { Document } from "@langchain/core/documents";
import { Callbacks } from "@langchain/core/callbacks/manager";
const IdColumnSymbol = Symbol("id");
const ContentColumnSymbol = Symbol... | langchainjs/libs/langchain-community/src/vectorstores/prisma.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/prisma.ts",
"repo_id": "langchainjs",
"token_count": 6019
} | 1,024 |
from llama_index.multi_modal_llms.azure_openai.base import AzureOpenAIMultiModal
__all__ = ["AzureOpenAIMultiModal"]
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-azure-openai/llama_index/multi_modal_llms/azure_openai/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-azure-openai/llama_index/multi_modal_llms/azure_openai/__init__.py",
"repo_id": "llama_index",
"token_count": 48
} | 1,286 |
"""Init params."""
| llama_index/llama-index-core/llama_index/core/agent/runner/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/agent/runner/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,176 |
// 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/kv/tikv/main_test.go/0 | {
"file_path": "milvus/internal/kv/tikv/main_test.go",
"repo_id": "milvus",
"token_count": 675
} | 1,808 |
from langchain_core.load.load import Reviver, load, loads
__all__ = ["Reviver", "loads", "load"]
| langchain/libs/langchain/langchain/load/load.py/0 | {
"file_path": "langchain/libs/langchain/langchain/load/load.py",
"repo_id": "langchain",
"token_count": 33
} | 527 |
import os
import tempfile
from typing import List
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document_loaders.unstructured import UnstructuredFileLoader
class AzureBlobStorageFileLoader(BaseLoader):
"""Load from `Azure ... | langchain/libs/community/langchain_community/document_loaders/azure_blob_storage_file.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/azure_blob_storage_file.py",
"repo_id": "langchain",
"token_count": 680
} | 226 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | transformers/src/transformers/models/mobilebert/modeling_tf_mobilebert.py/0 | {
"file_path": "transformers/src/transformers/models/mobilebert/modeling_tf_mobilebert.py",
"repo_id": "transformers",
"token_count": 35828
} | 714 |
from langchain_core.prompts import PromptTemplate
llm_context_prompt_template = """
Answer the user query using provided passages. Each passage has metadata given as
a nested JSON object you can also use. When answering, cite source name of the passages
you are answering from below the answer in a unique bullet poin... | langchain/templates/self-query-qdrant/self_query_qdrant/prompts.py/0 | {
"file_path": "langchain/templates/self-query-qdrant/self_query_qdrant/prompts.py",
"repo_id": "langchain",
"token_count": 157
} | 704 |
from typing import Any, Dict, List, Optional, Protocol, runtime_checkable
import fsspec
DEFAULT_PERSIST_DIR = "./storage"
DEFAULT_PERSIST_FNAME = "graph_store.json"
@runtime_checkable
class GraphStore(Protocol):
"""Abstract graph store protocol.
This protocol defines the interface for a graph store, which ... | llama_index/llama-index-legacy/llama_index/legacy/graph_stores/types.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/graph_stores/types.py",
"repo_id": "llama_index",
"token_count": 832
} | 1,711 |
# Copyright (c) 2023 Dominic Rampas MIT License
# 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/licen... | diffusers/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py",
"repo_id": "diffusers",
"token_count": 1658
} | 259 |
python_test_utils(
name="test_utils",
)
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/storage/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/storage/BUILD",
"repo_id": "llama_index",
"token_count": 35
} | 1,199 |
# How Each Index Works
This guide describes how each index works with diagrams.
Some terminology:
- **Node**: Corresponds to a chunk of text from a Document. LlamaIndex takes in Document objects and internally parses/chunks them into Node objects.
- **Response Synthesis**: Our module which synthesizes a response giv... | llama_index/docs/module_guides/indexing/index_guide.md/0 | {
"file_path": "llama_index/docs/module_guides/indexing/index_guide.md",
"repo_id": "llama_index",
"token_count": 639
} | 1,120 |
<jupyter_start><jupyter_text>Vespa>[Vespa](https://vespa.ai/) is a fully featured search engine and vector database. It supports vector search (ANN), lexical search, and search in structured data, all in the same query.This notebook shows how to use `Vespa.ai` as a LangChain vector store.In order to create the vector s... | langchain/docs/docs/integrations/vectorstores/vespa.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/vespa.ipynb",
"repo_id": "langchain",
"token_count": 4994
} | 186 |
export OPENAI_API_KEY="..."
export ASTRA_DB_APPLICATION_TOKEN="AstraCS:..."
export ASTRA_DB_KEYSPACE="..."
export ASTRA_DB_ID="12345678-"
# UNCOMMENT THE FOLLOWING FOR A CASSANDRA CLUSTER ...
# export USE_CASSANDRA_CLUSTER="1"
# ... then provide these parameters as well:
# export CASSANDRA_KEYSPACE="..."
# export CAS... | langchain/templates/cassandra-entomology-rag/.env.template/0 | {
"file_path": "langchain/templates/cassandra-entomology-rag/.env.template",
"repo_id": "langchain",
"token_count": 237
} | 637 |
from typing import Sequence, Union
import google.ai.generativelanguage as glm
import google.generativeai as genai
import PIL
from llama_index.core.base.llms.types import MessageRole
from llama_index.core.llms.base import (
ChatMessage,
ChatResponse,
CompletionResponse,
)
ROLES_TO_GEMINI = {
MessageRol... | llama_index/llama-index-integrations/llms/llama-index-llms-gemini/llama_index/llms/gemini/utils.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-gemini/llama_index/llms/gemini/utils.py",
"repo_id": "llama_index",
"token_count": 1574
} | 1,352 |
from langchain_community.document_loaders.generic import (
GenericLoader,
)
__all__ = ["GenericLoader"]
| langchain/libs/langchain/langchain/document_loaders/generic.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/generic.py",
"repo_id": "langchain",
"token_count": 34
} | 490 |
#!/bin/bash
#
# This script searches for lines starting with "import pydantic" or "from pydantic"
# in tracked files within a Git repository.
#
# Usage: ./scripts/check_pydantic.sh /path/to/repository
# Check if a path argument is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 /path/to/repository"
exit 1
fi
repos... | langchain/libs/partners/ai21/scripts/check_pydantic.sh/0 | {
"file_path": "langchain/libs/partners/ai21/scripts/check_pydantic.sh",
"repo_id": "langchain",
"token_count": 270
} | 678 |
import pytest
@pytest.fixture(scope="module")
def flash_phi_handle(launcher):
with launcher("microsoft/phi-2", num_shard=1) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_phi(flash_phi_handle):
await flash_phi_handle.health(300)
return flash_phi_handle.client
@pytest.m... | text-generation-inference/integration-tests/models/test_flash_phi.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_phi.py",
"repo_id": "text-generation-inference",
"token_count": 749
} | 427 |
"""Integration tests for SearchApi"""
from langchain_community.utilities.searchapi import SearchApiAPIWrapper
def test_call() -> None:
"""Test that call gives correct answer."""
search = SearchApiAPIWrapper()
output = search.run("What is the capital of Lithuania?")
assert "Vilnius" in output
def tes... | langchain/libs/community/tests/integration_tests/utilities/test_searchapi.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_searchapi.py",
"repo_id": "langchain",
"token_count": 708
} | 346 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-json/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-json/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,397 |
<jupyter_start><jupyter_text>Advanced Multi-Modal Retrieval using GPT4V and Multi-Modal Index/RetrieverIn this notebook, we show how to build a Multi-Modal retrieval system using LlamaIndex with GPT4-V and CLIP.LlamaIndex Multi-Modal Retrieval - Text embedding index: Generate GPT text embeddings- Images embedding index... | llama_index/docs/examples/multi_modal/gpt4v_multi_modal_retrieval.ipynb/0 | {
"file_path": "llama_index/docs/examples/multi_modal/gpt4v_multi_modal_retrieval.ipynb",
"repo_id": "llama_index",
"token_count": 4499
} | 1,068 |
python_sources()
| llama_index/llama-index-core/llama_index/core/indices/document_summary/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/indices/document_summary/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,121 |
// Adapted from:
// https://github.com/ChaoningZhang/MobileSAM/blob/master/mobile_sam/modeling/tiny_vit_sam.py
use candle::{IndexOp, Result, Tensor, D};
use candle_nn::{Conv2dConfig, Module, VarBuilder};
const MBCONV_EXPAND_RATIO: usize = 4;
const MLP_RATIO: usize = 4;
const LOCAL_CONV_SIZE: usize = 3;
const IMG_SIZE:... | candle/candle-transformers/src/models/segment_anything/tiny_vit.rs/0 | {
"file_path": "candle/candle-transformers/src/models/segment_anything/tiny_vit.rs",
"repo_id": "candle",
"token_count": 10372
} | 69 |
pods=("standalone" "datacoord" "proxy" "pulsar" "querynode" "rootcoord" "etcd")
for pod in ${pods[*]}
do
echo "run pod kill chaos test for pod $pod "
bash chaos_test.sh $pod pod_kill chaos-test
done
worker_pods=("datanode" "indexnode" "proxy" "querynode")
for pod in ${worker_pods[*]}
do
echo "run pod kill chaos test... | milvus/tests/python_client/chaos/run.sh/0 | {
"file_path": "milvus/tests/python_client/chaos/run.sh",
"repo_id": "milvus",
"token_count": 189
} | 2,114 |
import type { OpenAIClient } from "@langchain/openai";
import type { AgentFinish, AgentAction } from "@langchain/core/agents";
export type OpenAIAssistantFinish = AgentFinish & {
runId: string;
threadId: string;
};
export type OpenAIAssistantAction = AgentAction & {
toolCallId: string;
runId: string;
thr... | langchainjs/langchain/src/experimental/openai_assistant/schema.ts/0 | {
"file_path": "langchainjs/langchain/src/experimental/openai_assistant/schema.ts",
"repo_id": "langchainjs",
"token_count": 181
} | 990 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querynodev2/pipeline/filter_policy.go/0 | {
"file_path": "milvus/internal/querynodev2/pipeline/filter_policy.go",
"repo_id": "milvus",
"token_count": 890
} | 1,907 |
kind: StressChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-querynode-memory-stress
namespace: chaos-testing
spec:
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/instance: milvus-chaos
component: querynode
mode: one
stressors:
cpu:
wo... | milvus/tests/python_client/chaos/chaos_objects/mem_stress/chaos_querynode_mem_stress.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/mem_stress/chaos_querynode_mem_stress.yaml",
"repo_id": "milvus",
"token_count": 172
} | 1,987 |
import logging
from asyncio import iscoroutinefunction
from collections import defaultdict
from typing import Any, Callable, Dict, NamedTuple, Optional, Sequence
from langchain_core.runnables import Runnable
from langchain_core.runnables.base import (
RunnableLambda,
RunnableLike,
coerce_to_runnable,
)
fr... | langgraph/langgraph/graph/graph.py/0 | {
"file_path": "langgraph/langgraph/graph/graph.py",
"repo_id": "langgraph",
"token_count": 3263
} | 993 |
"""Test Chat__ModuleName__ chat model."""
from __module_name__.chat_models import Chat__ModuleName__
def test_stream() -> None:
"""Test streaming tokens from OpenAI."""
llm = Chat__ModuleName__()
for token in llm.stream("I'm Pickle Rick"):
assert isinstance(token.content, str)
async def test_as... | langchain/libs/cli/langchain_cli/integration_template/tests/integration_tests/test_chat_models.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/integration_template/tests/integration_tests/test_chat_models.py",
"repo_id": "langchain",
"token_count": 658
} | 216 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.