text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# MEP: Refactor QueryNode v2
Current state: Merged
ISSUE: [[Enhancement]: Refactor QueryNode #21624](https://github.com/milvus-io/milvus/issues/21624)
Keywords: Search, ANN
Released: v2.3.0
## Summary
By refactoring querynode, we plan to achieve:
- Separate "Delegator" and "Worker"
- Remove delta channel for de... | milvus/docs/design_docs/20230418-querynode_v2.md/0 | {
"file_path": "milvus/docs/design_docs/20230418-querynode_v2.md",
"repo_id": "milvus",
"token_count": 3057
} | 1,853 |
"""Util that calls Steam-WebAPI."""
from typing import Any, List
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
class SteamWebAPIWrapper(BaseModel):
"""Wrapper for Steam API."""
steam: Any # for python-steam-api
from langchain_community.tools.steam.prompt import (
STE... | langchain/libs/community/langchain_community/utilities/steam.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/steam.py",
"repo_id": "langchain",
"token_count": 2567
} | 331 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/objects/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/objects/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,745 |
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
| chat-ui/.eslintignore/0 | {
"file_path": "chat-ui/.eslintignore",
"repo_id": "chat-ui",
"token_count": 69
} | 92 |
/* eslint-disable no-process-env */
import { test } from "@jest/globals";
import { Neo4jGraph } from "../neo4j_graph.js";
describe.skip("Neo4j Graph Tests", () => {
const url = process.env.NEO4J_URI as string;
const username = process.env.NEO4J_USERNAME as string;
const password = process.env.NEO4J_PASSWORD as ... | langchainjs/libs/langchain-community/src/graphs/tests/neo4j_graph.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/graphs/tests/neo4j_graph.int.test.ts",
"repo_id": "langchainjs",
"token_count": 862
} | 955 |
from typing import Any, List
from unittest.mock import patch
from llama_index.legacy.indices.list.base import SummaryIndex
from llama_index.legacy.indices.list.retrievers import (
SummaryIndexEmbeddingRetriever,
)
from llama_index.legacy.llms.mock import MockLLM
from llama_index.legacy.prompts import BasePromptTem... | llama_index/llama-index-legacy/tests/indices/list/test_retrievers.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/indices/list/test_retrievers.py",
"repo_id": "llama_index",
"token_count": 991
} | 1,619 |
h1:j28ectYxexGfQz/LClD7yYVUHAfIcPHlboAJ1Qw0G7I=
20231116210409.sql h1:vwZRvrXrUMOuDykEaheyEzsnNCpmH73x0QEefzUtf8o=
20231129183041.sql h1:FglI5Hjf7kqvjCsSYWkK2IGS2aThQBaVhpg9WekhNEA=
| chroma/go/coordinator/migrations/atlas.sum/0 | {
"file_path": "chroma/go/coordinator/migrations/atlas.sum",
"repo_id": "chroma",
"token_count": 132
} | 56 |
#!/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... | notebooks/sagemaker/22_accelerate_sagemaker_examples/src/seq2seq/run_seq2seq_no_trainer.py/0 | {
"file_path": "notebooks/sagemaker/22_accelerate_sagemaker_examples/src/seq2seq/run_seq2seq_no_trainer.py",
"repo_id": "notebooks",
"token_count": 16658
} | 309 |
export * from "./base.js";
export * from "./chat.js";
export * from "./few_shot.js";
export * from "./pipeline.js";
export * from "./prompt.js";
export * from "./serde.js";
export * from "./string.js";
export * from "./template.js";
export * from "./image.js";
| langchainjs/langchain-core/src/prompts/index.ts/0 | {
"file_path": "langchainjs/langchain-core/src/prompts/index.ts",
"repo_id": "langchainjs",
"token_count": 96
} | 836 |
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.supabase import SupabaseVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in SupabaseVectorStore.__mro__]
assert VectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-supabase/tests/test_vector_stores_supabase.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-supabase/tests/test_vector_stores_supabase.py",
"repo_id": "llama_index",
"token_count": 92
} | 1,477 |
"""Init file."""
from llama_index.legacy.embeddings.adapter import (
AdapterEmbeddingModel,
LinearAdapterEmbeddingModel,
)
from llama_index.legacy.embeddings.anyscale import AnyscaleEmbedding
from llama_index.legacy.embeddings.azure_openai import AzureOpenAIEmbedding
from llama_index.legacy.embeddings.base imp... | llama_index/llama-index-legacy/llama_index/legacy/embeddings/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/embeddings/__init__.py",
"repo_id": "llama_index",
"token_count": 1464
} | 1,489 |
# coding=utf-8
# Copyright 2021 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | transformers/tests/models/segformer/test_image_processing_segformer.py/0 | {
"file_path": "transformers/tests/models/segformer/test_image_processing_segformer.py",
"repo_id": "transformers",
"token_count": 4300
} | 839 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-gpt-repo/llama_index/readers/gpt_repo/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-gpt-repo/llama_index/readers/gpt_repo/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,452 |
import { RemoteRunnable } from "langchain/runnables/remote";
const remoteChain = new RemoteRunnable({
url: "https://your_hostname.com/path",
options: {
timeout: 10000,
headers: {
Authorization: "Bearer YOUR_TOKEN",
},
},
});
const result = await remoteChain.invoke({
param1: "param1",
param... | langchainjs/examples/src/ecosystem/langsmith_options.ts/0 | {
"file_path": "langchainjs/examples/src/ecosystem/langsmith_options.ts",
"repo_id": "langchainjs",
"token_count": 132
} | 799 |
// 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/timestamp.go/0 | {
"file_path": "milvus/internal/proxy/timestamp.go",
"repo_id": "milvus",
"token_count": 1005
} | 1,835 |
from langchain.chains.openai_functions.base import (
convert_to_openai_function,
create_openai_fn_chain,
create_structured_output_chain,
)
from langchain.chains.openai_functions.citation_fuzzy_match import (
create_citation_fuzzy_match_chain,
)
from langchain.chains.openai_functions.extraction import (
... | langchain/libs/langchain/langchain/chains/openai_functions/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/openai_functions/__init__.py",
"repo_id": "langchain",
"token_count": 518
} | 494 |
<jupyter_start><jupyter_text>Fauna>[Fauna](https://fauna.com/) is a Document Database.Query `Fauna` documents<jupyter_code>%pip install --upgrade --quiet fauna<jupyter_output><empty_output><jupyter_text>Query data example<jupyter_code>from langchain_community.document_loaders.fauna import FaunaLoader
secret = "<enter... | langchain/docs/docs/integrations/document_loaders/fauna.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/fauna.ipynb",
"repo_id": "langchain",
"token_count": 383
} | 103 |
<jupyter_start><jupyter_text>Lemon Agent>[Lemon Agent](https://github.com/felixbrock/lemon-agent) helps you build powerful AI assistants in minutes and automate workflows by allowing for accurate and reliable read and write operations in tools like `Airtable`, `Hubspot`, `Discord`, `Notion`, `Slack` and `Github`.See [f... | langchain/docs/docs/integrations/tools/lemonai.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/tools/lemonai.ipynb",
"repo_id": "langchain",
"token_count": 1172
} | 188 |
<jupyter_start><jupyter_text>LlamaHub DemostrationHere we give a simple overview of how to use data loaders and tools (for agents) within [LlamaHub](llamahub.ai).**NOTES**: - You can learn how to use everything in LlamaHub by clicking into each module and looking at the code snippet.- Also, you can find a [full list of... | llama_index/docs/examples/llama_hub/llama_hub.ipynb/0 | {
"file_path": "llama_index/docs/examples/llama_hub/llama_hub.ipynb",
"repo_id": "llama_index",
"token_count": 743
} | 1,191 |
import {
RetrieveCommand,
BedrockAgentRuntimeClient,
BedrockAgentRuntimeClientConfig,
} from "@aws-sdk/client-bedrock-agent-runtime";
import { BaseRetriever } from "@langchain/core/retrievers";
import { Document } from "@langchain/core/documents";
/**
* Interface for the arguments required to initialize an
* ... | langchainjs/libs/langchain-community/src/retrievers/amazon_knowledge_base.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/retrievers/amazon_knowledge_base.ts",
"repo_id": "langchainjs",
"token_count": 1063
} | 977 |
<jupyter_start><jupyter_text>Diffusion for Audio In this notebook, we're going to take a brief look at generating audio with diffusion models. What you will learn:- How audio is represented in a computer- Methods to convert between raw audio data and spectrograms- How to prepare a dataloader with a custom collate funct... | diffusion-models-class/unit4/02_diffusion_for_audio.ipynb/0 | {
"file_path": "diffusion-models-class/unit4/02_diffusion_for_audio.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 4553
} | 286 |
"""Weaviate Sub-Question Query Engine Pack."""
from typing import Any, Dict, List, Optional
from llama_index.core.indices.vector_store import VectorStoreIndex
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.query_engine import SubQuestionQueryEngine
from llama_index.core.schema impor... | llama_index/llama-index-packs/llama-index-packs-sub-question-weaviate/llama_index/packs/sub_question_weaviate/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-sub-question-weaviate/llama_index/packs/sub_question_weaviate/base.py",
"repo_id": "llama_index",
"token_count": 1152
} | 1,733 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-cohere-rerank/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-cohere-rerank/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,260 |
// 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/indexbuilder/index_c.h/0 | {
"file_path": "milvus/internal/core/src/indexbuilder/index_c.h",
"repo_id": "milvus",
"token_count": 1882
} | 1,789 |
kind: Schedule
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-kafka-pod-kill
namespace: chaos-testing
spec:
schedule: '*/5 * * * * *'
startingDeadlineSeconds: 60
concurrencyPolicy: Forbid
historyLimit: 1
type: PodChaos
podChaos:
selector:
namespaces:
- chaos-testing
lab... | milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_kafka_pod_kill.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_kafka_pod_kill.yaml",
"repo_id": "milvus",
"token_count": 211
} | 1,967 |
use serde::Deserialize;
#[derive(Deserialize)]
/// The type of hasher to use.
/// # Options
/// - Murmur3: The murmur3 hasher.
pub(crate) enum HasherType {
Murmur3,
}
#[derive(Deserialize)]
/// The configuration for the assignment policy.
/// # Options
/// - RendezvousHashing: The rendezvous hashing assignment po... | chroma/rust/worker/src/assignment/config.rs/0 | {
"file_path": "chroma/rust/worker/src/assignment/config.rs",
"repo_id": "chroma",
"token_count": 248
} | 59 |
from llama_index.tools.ionic_shopping.base import IonicShoppingToolSpec
__all__ = ["IonicShoppingToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/llama_index/tools/ionic_shopping/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/llama_index/tools/ionic_shopping/__init__.py",
"repo_id": "llama_index",
"token_count": 36
} | 1,484 |
import { test, expect } from "@jest/globals";
import { TogetherAIEmbeddings } from "../togetherai.js";
test.skip("Test TogetherAIEmbeddings.embedQuery", async () => {
const embeddings = new TogetherAIEmbeddings();
const res = await embeddings.embedQuery("Hello world");
expect(typeof res[0]).toBe("number");
exp... | langchainjs/libs/langchain-community/src/embeddings/tests/togetherai.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/tests/togetherai.int.test.ts",
"repo_id": "langchainjs",
"token_count": 253
} | 942 |
from typing import Any, List
from langchain_core.documents import Document
from langchain.retrievers.multi_vector import MultiVectorRetriever
from langchain.storage import InMemoryStore
from tests.unit_tests.indexes.test_indexing import InMemoryVectorStore
class InMemoryVectorstoreWithSearch(InMemoryVectorStore):
... | langchain/libs/langchain/tests/unit_tests/retrievers/test_multi_vector.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/test_multi_vector.py",
"repo_id": "langchain",
"token_count": 585
} | 632 |
# Self-training
This is an implementation of the self-training algorithm (without task augmentation) in the [EMNLP 2021](https://2021.emnlp.org/) paper: [STraTA: Self-Training with Task Augmentation for Better Few-shot Learning](https://arxiv.org/abs/2109.06270). Please check out https://github.com/google-research/goo... | transformers/examples/research_projects/self-training-text-classification/README.md/0 | {
"file_path": "transformers/examples/research_projects/self-training-text-classification/README.md",
"repo_id": "transformers",
"token_count": 2131
} | 614 |
extend = "../pyproject.toml"
ignore = [
"S101", # assert gets used in tests
]
| llama_index/llama-index-core/tests/ruff.toml/0 | {
"file_path": "llama_index/llama-index-core/tests/ruff.toml",
"repo_id": "llama_index",
"token_count": 33
} | 1,276 |
# Available LLM integrations
We support integrations with OpenAI, Anthropic, Hugging Face, PaLM, and more.
## AI21
```{toctree}
---
maxdepth: 1
---
/examples/llm/ai21.ipynb
```
## Anthropic
```{toctree}
---
maxdepth: 1
---
/examples/llm/anthropic.ipynb
```
## AnyScale
```{toctree}
---
maxdepth: 1
---
/examples/l... | llama_index/docs/module_guides/models/llms/modules.md/0 | {
"file_path": "llama_index/docs/module_guides/models/llms/modules.md",
"repo_id": "llama_index",
"token_count": 1640
} | 1,158 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["BoardDocsReader"]
contains_example = false
import_path = "llama_index.readers.boarddocs"
... | llama_index/llama-index-integrations/readers/llama-index-readers-boarddocs/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-boarddocs/pyproject.toml",
"repo_id": "llama_index",
"token_count": 690
} | 1,272 |
# This is a Dockerfile for running unit tests
ARG POETRY_HOME=/opt/poetry
# Use the Python base image
FROM python:3.11.2-bullseye AS builder
# Define the version of Poetry to install (default is 1.4.2)
ARG POETRY_VERSION=1.4.2
# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_HOME
# C... | langchain/libs/langchain/Dockerfile/0 | {
"file_path": "langchain/libs/langchain/Dockerfile",
"repo_id": "langchain",
"token_count": 485
} | 434 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/llama_index/readers/hatena_blog/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/llama_index/readers/hatena_blog/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,310 |
from llama_index.storage.kvstore.redis.base import RedisKVStore
__all__ = ["RedisKVStore"]
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/llama_index/storage/kvstore/redis/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/llama_index/storage/kvstore/redis/__init__.py",
"repo_id": "llama_index",
"token_count": 36
} | 1,471 |
""" Activations (memory-efficient w/ custom autograd)
A collection of activations fn and modules with a common interface so that they can
easily be swapped. All have an `inplace` arg even if not used.
These activations are not compatible with jit scripting or ONNX export of the model, please use either
the JIT or bas... | pytorch-image-models/timm/layers/activations_me.py/0 | {
"file_path": "pytorch-image-models/timm/layers/activations_me.py",
"repo_id": "pytorch-image-models",
"token_count": 2598
} | 364 |
// Adapted from turboderp exllama: https://github.com/turboderp/exllama
#define _cuda_buffers_cu
#include "cuda_buffers.cuh"
CudaBuffers* g_buffers[CUDA_MAX_DEVICES] = {NULL};
// __constant__ half2 q4_table[16][256];
// half2 q4_table_host[16][256];
// bool q4_table_init = false;
CudaBuffers::CudaBuffers
(
int _... | text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cu/0 | {
"file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cu",
"repo_id": "text-generation-inference",
"token_count": 680
} | 407 |
/* eslint-disable */
/**
* Generated data model types.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@1.3.1.
* To regenerate, run `npx convex dev`.
* @module
*/
import { AnyDataModel } from "convex/server";
import type { GenericId } from "convex/values";
/**
* No `schema.ts` file found!
*... | langchainjs/examples/src/indexes/vector_stores/convex/_generated/dataModel.d.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/convex/_generated/dataModel.d.ts",
"repo_id": "langchainjs",
"token_count": 495
} | 873 |
import unittest
from typing import Any
from unittest.mock import patch
import pytest
import requests_mock
from requests_mock.mocker import Mocker
from langchain_community.document_loaders.lakefs import LakeFSLoader
@pytest.fixture
def mock_lakefs_client() -> Any:
with patch(
"langchain_community.documen... | langchain/libs/community/tests/unit_tests/document_loaders/test_lakefs.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_lakefs.py",
"repo_id": "langchain",
"token_count": 1428
} | 391 |
<jupyter_start><jupyter_text>Milvus>[Milvus](https://milvus.io/docs/overview.md) is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.This notebook shows how to use functionality related to the Milvus vector database.To run, y... | langchain/docs/docs/integrations/vectorstores/milvus.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/milvus.ipynb",
"repo_id": "langchain",
"token_count": 1615
} | 183 |
<jupyter_start><jupyter_text>DocArray InMemory Vector Store[DocArrayInMemoryVectorStore](https://docs.docarray.org/user_guide/storing/index_in_memory/) is a document index provided by [Docarray](https://github.com/docarray/docarray) that stores documents in memory. It is a great starting point for small datasets, where... | llama_index/docs/examples/vector_stores/DocArrayInMemoryIndexDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/DocArrayInMemoryIndexDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1370
} | 1,131 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/llama_index/readers/airbyte_salesforce/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/llama_index/readers/airbyte_salesforce/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,452 |
import { test, expect, jest } from "@jest/globals";
import { insecureHash } from "@langchain/core/utils/hash";
import { RedisCache } from "../ioredis.js";
const sha1 = (str: string) => insecureHash(str);
test("RedisCache", async () => {
const redis = {
get: jest.fn(async (key: string) => {
if (key === sh... | langchainjs/libs/langchain-community/src/caches/tests/ioredis.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/caches/tests/ioredis.test.ts",
"repo_id": "langchainjs",
"token_count": 251
} | 990 |
from llama_index.legacy.agent.react.output_parser import (
extract_final_response,
extract_tool_use,
parse_action_reasoning_step,
)
def test_parse_action_reasoning_step() -> None:
mock_input_text = """\
Thought: Gotta use a tool.
Action: tool
Action Input: {'pages': ['coffee'] /* comment */, 'load_kwa... | llama_index/llama-index-legacy/tests/agent/react/test_react_output_parser.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/agent/react/test_react_output_parser.py",
"repo_id": "llama_index",
"token_count": 1600
} | 1,792 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/clip/test_modeling_clip.py/0 | {
"file_path": "transformers/tests/models/clip/test_modeling_clip.py",
"repo_id": "transformers",
"token_count": 14877
} | 707 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/autoclass_tutorial.md/0 | {
"file_path": "transformers/docs/source/en/autoclass_tutorial.md",
"repo_id": "transformers",
"token_count": 2525
} | 445 |
---
sidebar_position: 0
sidebar_custom_props:
description: Interface with language models
sidebar_class_name: hidden
---
# Model I/O
The core element of any language model application is...the model. LangChain gives you the building blocks to interface with any language model.
![Flowchart illustrating the Model I/... | langchain/docs/docs/modules/model_io/index.mdx/0 | {
"file_path": "langchain/docs/docs/modules/model_io/index.mdx",
"repo_id": "langchain",
"token_count": 501
} | 196 |
[tool.poetry]
name = "openai-functions-agent"
version = "0.1.0"
description = "Agent using OpenAI function calling to execute functions, including search"
authors = [
"Lance Martin <lance@langchain.dev>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
tav... | langchain/templates/openai-functions-agent/pyproject.toml/0 | {
"file_path": "langchain/templates/openai-functions-agent/pyproject.toml",
"repo_id": "langchain",
"token_count": 296
} | 668 |
# Callbacks
## Concept
LlamaIndex provides callbacks to help debug, track, and trace the inner workings of the library.
Using the callback manager, as many callbacks as needed can be added.
In addition to logging data related to events, you can also track the duration and number of occurrences
of each event.
Furthe... | llama_index/docs/module_guides/observability/callbacks/root.md/0 | {
"file_path": "llama_index/docs/module_guides/observability/callbacks/root.md",
"repo_id": "llama_index",
"token_count": 852
} | 1,180 |
"""Integration test for Embedchain."""
import os
from typing import Any
from unittest.mock import patch
import pytest
from langchain_core.documents import Document
from langchain_community.retrievers.embedchain import EmbedchainRetriever
try:
from embedchain import Pipeline
except ImportError:
pytest.skip("... | langchain/libs/community/tests/integration_tests/retrievers/test_embedchain.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/retrievers/test_embedchain.py",
"repo_id": "langchain",
"token_count": 449
} | 347 |
function isAccessibleObject(x: unknown): x is Record<string | number, unknown> {
return typeof x === "object" && x != null;
}
export function getNormalizedJsonPath(
path: string | number | Array<string | number>
) {
return Array.isArray(path) ? path : [path];
}
export function traverseNaiveJsonPath(
x: unknow... | langserve/langserve/playground/src/utils/path.ts/0 | {
"file_path": "langserve/langserve/playground/src/utils/path.ts",
"repo_id": "langserve",
"token_count": 264
} | 1,015 |
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | datasets/src/datasets/keyhash.py/0 | {
"file_path": "datasets/src/datasets/keyhash.py",
"repo_id": "datasets",
"token_count": 1378
} | 134 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/llama_index/packs/cogniswitch_agent/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/llama_index/packs/cogniswitch_agent/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,836 |
version: '3.9'
networks:
net:
driver: bridge
services:
server:
image: server
build:
context: ${PWD}
dockerfile: Dockerfile
volumes:
- ${PWD}/:/chroma
# Be aware that indexed data are located in "/chroma/chroma/"
# Default configuration for persist_directory in chromad... | chroma/examples/server_side_embeddings/huggingface/docker-compose.yml/0 | {
"file_path": "chroma/examples/server_side_embeddings/huggingface/docker-compose.yml",
"repo_id": "chroma",
"token_count": 823
} | 39 |
# CSP-DarkNet
**CSPDarknet53** is a convolutional neural network and backbone for object detection that uses [DarkNet-53](https://paperswithcode.com/method/darknet-53). It employs a CSPNet strategy to partition the feature map of the base layer into two parts and then merges them through a cross-stage hierarchy. The u... | pytorch-image-models/docs/models/csp-darknet.md/0 | {
"file_path": "pytorch-image-models/docs/models/csp-darknet.md",
"repo_id": "pytorch-image-models",
"token_count": 1753
} | 353 |
"""
Official evaluation script for ReCoRD v1.0.
(Some functions are adopted from the SQuAD evaluation script.)
"""
import argparse
import json
import re
import string
import sys
from collections import Counter
def normalize_answer(s):
"""Lower text and remove punctuation, articles and extra whitespace."""
... | datasets/metrics/super_glue/record_evaluation.py/0 | {
"file_path": "datasets/metrics/super_glue/record_evaluation.py",
"repo_id": "datasets",
"token_count": 1480
} | 135 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/xlm_roberta/test_modeling_tf_xlm_roberta.py/0 | {
"file_path": "transformers/tests/models/xlm_roberta/test_modeling_tf_xlm_roberta.py",
"repo_id": "transformers",
"token_count": 850
} | 853 |
"""Base class for Gmail tools."""
from __future__ import annotations
from typing import TYPE_CHECKING
from langchain_core.pydantic_v1 import Field
from langchain_core.tools import BaseTool
from langchain_community.tools.gmail.utils import build_resource_service
if TYPE_CHECKING:
# This is for linting and IDE ty... | langchain/libs/community/langchain_community/tools/gmail/base.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/gmail/base.py",
"repo_id": "langchain",
"token_count": 359
} | 284 |
import { AIMessage, BaseMessage } from "@langchain/core/messages";
import { ChatResult } from "@langchain/core/outputs";
import {
BaseChatModel,
BaseChatModelCallOptions,
BaseChatModelParams,
} from "@langchain/core/language_models/chat_models";
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/... | langchainjs/examples/src/models/chat/custom_advanced.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/custom_advanced.ts",
"repo_id": "langchainjs",
"token_count": 621
} | 893 |
from typing import (
Any,
Callable,
Iterator,
List,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
)
from langchain_core.stores import BaseStore
K = TypeVar("K")
V = TypeVar("V")
class EncoderBackedStore(BaseStore[K, V]):
"""Wraps a store with key and value encoders/decoders.
... | langchain/libs/langchain/langchain/storage/encoder_backed.py/0 | {
"file_path": "langchain/libs/langchain/langchain/storage/encoder_backed.py",
"repo_id": "langchain",
"token_count": 1283
} | 568 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-reddit/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-reddit/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,433 |
import { get_options, run } from "./common.js";
const reference_latency_ms = 22;
const host = __ENV.HOST || '127.0.0.1:8000';
const max_new_tokens = 50;
function generate_payload(gpt){
const input = gpt["conversations"][0]["value"];
return {"prompt": input, "temperature": 0.5, "ignore_eos": true}
}
export ... | text-generation-inference/load_tests/vllm.js/0 | {
"file_path": "text-generation-inference/load_tests/vllm.js",
"repo_id": "text-generation-inference",
"token_count": 170
} | 432 |
from llama_index.readers.mbox.base import MboxReader
__all__ = ["MboxReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-mbox/llama_index/readers/mbox/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mbox/llama_index/readers/mbox/__init__.py",
"repo_id": "llama_index",
"token_count": 29
} | 1,478 |
import psutil
import time
from loguru import logger
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='config for rolling update process')
parser.add_argument('--wait_time', type=int, default=60, help='wait time after rolling update started')
args = parser.parse_a... | milvus/tests/python_client/deploy/scripts/breakdown_rolling_update.py/0 | {
"file_path": "milvus/tests/python_client/deploy/scripts/breakdown_rolling_update.py",
"repo_id": "milvus",
"token_count": 923
} | 2,002 |
from typing import List, Optional, Sequence, cast
from llama_index.core.llms.llm import LLM
from llama_index.core.output_parsers.base import StructuredOutput
from llama_index.core.prompts.base import BasePromptTemplate, PromptTemplate
from llama_index.core.prompts.mixin import PromptDictType
from llama_index.core.prom... | llama_index/llama-index-core/llama_index/core/question_gen/llm_generators.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/question_gen/llm_generators.py",
"repo_id": "llama_index",
"token_count": 1539
} | 1,201 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-deeplake/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-deeplake/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,457 |
# coding=utf-8
# 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 requir... | transformers/tests/models/codegen/test_tokenization_codegen.py/0 | {
"file_path": "transformers/tests/models/codegen/test_tokenization_codegen.py",
"repo_id": "transformers",
"token_count": 4905
} | 808 |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseGen,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr
from llama_index.core.c... | llama_index/llama-index-integrations/llms/llama-index-llms-ai21/llama_index/llms/ai21/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-ai21/llama_index/llms/ai21/base.py",
"repo_id": "llama_index",
"token_count": 1909
} | 1,246 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-faiss/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-faiss/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,465 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-discord/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-discord/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,424 |
# 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/src/peft/tuners/ia3/bnb.py/0 | {
"file_path": "peft/src/peft/tuners/ia3/bnb.py",
"repo_id": "peft",
"token_count": 2193
} | 335 |
# LangChain Decorators ✨
~~~
Disclaimer: `LangChain decorators` is not created by the LangChain team and is not supported by it.
~~~
>`LangChain decorators` is a layer on the top of LangChain that provides syntactic sugar 🍭 for writing custom langchain prompts and chains
>
>For Feedback, Issues, Contributions - plea... | langchain/docs/docs/integrations/providers/langchain_decorators.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/langchain_decorators.mdx",
"repo_id": "langchain",
"token_count": 3816
} | 150 |
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { formatDocumentsAsString } from "langchain/util/document";
import { PromptTemplate } from "@langchain/core/prompts";
import {
RunnableSequence,
RunnablePassthrough,
} from "... | langchainjs/examples/src/guides/expression_language/cookbook_retriever.ts/0 | {
"file_path": "langchainjs/examples/src/guides/expression_language/cookbook_retriever.ts",
"repo_id": "langchainjs",
"token_count": 355
} | 819 |
"""Test Anthropic API wrapper."""
from typing import Generator
import pytest
from langchain_core.callbacks import CallbackManager
from langchain_core.outputs import LLMResult
from langchain_community.llms.anthropic import Anthropic
from tests.unit_tests.callbacks.fake_callback_handler import FakeCallbackHandler
@py... | langchain/libs/community/tests/integration_tests/llms/test_anthropic.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_anthropic.py",
"repo_id": "langchain",
"token_count": 777
} | 360 |
# coding=utf-8
# Copyright 2022 ABEJA, 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/LICENSE-... | transformers/src/transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py/0 | {
"file_path": "transformers/src/transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py",
"repo_id": "transformers",
"token_count": 2151
} | 625 |
# 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/tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py/0 | {
"file_path": "transformers/tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py",
"repo_id": "transformers",
"token_count": 23094
} | 749 |
import asyncio
import logging
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
logger = logging.getLogger(__name__)
class AsyncWebPageReader(BaseReader):
"""Asynchronous web page reader.
Reads pages from the web asynchronously.
A... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/async_web/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/async_web/base.py",
"repo_id": "llama_index",
"token_count": 1726
} | 1,432 |
# Nebula
This page covers how to use [Nebula](https://symbl.ai/nebula), [Symbl.ai](https://symbl.ai/)'s LLM, ecosystem within LangChain.
It is broken into two parts: installation and setup, and then references to specific Nebula wrappers.
## Installation and Setup
- Get an [Nebula API Key](https://info.symbl.ai/Nebu... | langchain/docs/docs/integrations/providers/symblai_nebula.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/symblai_nebula.mdx",
"repo_id": "langchain",
"token_count": 239
} | 161 |
# rag-chroma-private
This template performs RAG with no reliance on external APIs.
It utilizes Ollama the LLM, GPT4All for embeddings, and Chroma for the vectorstore.
The vectorstore is created in `chain.py` and by default indexes a [popular blog posts on Agents](https://lilianweng.github.io/posts/2023-06-23-agent... | langchain/templates/rag-chroma-private/README.md/0 | {
"file_path": "langchain/templates/rag-chroma-private/README.md",
"repo_id": "langchain",
"token_count": 865
} | 659 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/amused/pipeline_amused_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/amused/pipeline_amused_img2img.py",
"repo_id": "diffusers",
"token_count": 7513
} | 236 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["AzureCosmosDBMongoDBVectorSearch"]
contains_example = false
import_path = "llama_index.ve... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azurecosmosmongo/pyproject.toml",
"repo_id": "llama_index",
"token_count": 668
} | 1,450 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-zapier/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-zapier/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,468 |
import ChatThumbnail from "./ChatThumbnail.svelte";
import { collections } from "$lib/server/database";
import { error, type RequestHandler } from "@sveltejs/kit";
import { ObjectId } from "mongodb";
import type { SvelteComponent } from "svelte";
import { Resvg } from "@resvg/resvg-js";
import satori from "satori";
im... | chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/+server.ts/0 | {
"file_path": "chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/+server.ts",
"repo_id": "chat-ui",
"token_count": 833
} | 112 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "llms/ai21",
});
export * from "@langchain/community/llms/ai21";
| langchainjs/langchain/src/llms/ai21.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/ai21.ts",
"repo_id": "langchainjs",
"token_count": 72
} | 901 |
"""Vector SQL Database Chain Retriever"""
from typing import Any, Dict, List
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
CallbackManagerForRetrieverRun,
)
from langchain.schema import BaseRetriever, Document
from langchain_experimental.sql.vector_sql import VectorSQLDatabase... | langchain/libs/experimental/langchain_experimental/retrievers/vector_sql_database.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/retrievers/vector_sql_database.py",
"repo_id": "langchain",
"token_count": 459
} | 425 |
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.cassandra import CassandraVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in CassandraVectorStore.__mro__]
assert VectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-cassandra/tests/test_vector_stores_cassandra.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-cassandra/tests/test_vector_stores_cassandra.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,513 |
import { GradientLLM } from "@langchain/community/llms/gradient_ai";
// Note that inferenceParameters are optional
const model = new GradientLLM({
adapterId: process.env.GRADIENT_ADAPTER_ID,
inferenceParameters: {
maxGeneratedTokenCount: 20,
temperature: 0,
},
});
const res = await model.invoke(
"What ... | langchainjs/examples/src/llms/gradient_ai-adapter.ts/0 | {
"file_path": "langchainjs/examples/src/llms/gradient_ai-adapter.ts",
"repo_id": "langchainjs",
"token_count": 127
} | 885 |
# Xata
> [Xata](https://xata.io) is a serverless data platform, based on `PostgreSQL`.
> It provides a Python SDK for interacting with your database, and a UI
> for managing your data.
> `Xata` has a native vector type, which can be added to any table, and
> supports similarity search. LangChain inserts vectors dir... | langchain/docs/docs/integrations/providers/xata.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/xata.mdx",
"repo_id": "langchain",
"token_count": 219
} | 153 |
# coding=utf-8
# Copyright 2020 Mesh TensorFlow authors, T5 Authors and 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... | transformers/src/transformers/models/mt5/modeling_mt5.py/0 | {
"file_path": "transformers/src/transformers/models/mt5/modeling_mt5.py",
"repo_id": "transformers",
"token_count": 49792
} | 697 |
<jupyter_start><jupyter_text>Safeguarding Your RAG Pipeline with LlamaGuardModeratorPackThis notebook shows how we can use LlamaGuardModeratorPack to safeguard the LLM inputs and outputs of a RAG pipeline using [Llama Guard](https://huggingface.co/meta-llama/LlamaGuard-7b). The RAG pipeline uses the following models:*... | llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/examples/rag_moderator_llama_guard_pack.ipynb/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/examples/rag_moderator_llama_guard_pack.ipynb",
"repo_id": "llama_index",
"token_count": 5517
} | 1,658 |
from langchain.chains.elasticsearch_database.base import ElasticsearchDatabaseChain
__all__ = ["ElasticsearchDatabaseChain"]
| langchain/libs/langchain/langchain/chains/elasticsearch_database/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/elasticsearch_database/__init__.py",
"repo_id": "langchain",
"token_count": 32
} | 457 |
**If you want to use git hooks, you need to install hooks first!**
## Install git-hooks
```shell script
export GO111MODULE="on"
go get -u github.com/git-hooks/git-hooks
```
## Install hooks
run
```shell script
git hooks install
``` | milvus/githooks/README.md/0 | {
"file_path": "milvus/githooks/README.md",
"repo_id": "milvus",
"token_count": 80
} | 1,648 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/deberta-v2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/deberta-v2.md",
"repo_id": "transformers",
"token_count": 1846
} | 505 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_caption/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_caption/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,361 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { describe, expect, it } from "vitest";
import { insertLegacyConversation, insertSideBranchesConversation } from "./treeHelpers.spec";
import type { Message } from "$lib/types/Message";
import { addSibling } from "./addSibli... | chat-ui/src/lib/utils/tree/addSibling.spec.ts/0 | {
"file_path": "chat-ui/src/lib/utils/tree/addSibling.spec.ts",
"repo_id": "chat-ui",
"token_count": 950
} | 99 |
// @ts-nocheck
import type {
VectorizeIndex,
Fetcher,
Request,
} from "@cloudflare/workers-types";
import {
CloudflareVectorizeStore,
CloudflareWorkersAIEmbeddings,
} from "@langchain/cloudflare";
export interface Env {
VECTORIZE_INDEX: VectorizeIndex;
AI: Fetcher;
}
export default {
async fetch(req... | langchainjs/examples/src/indexes/vector_stores/cloudflare_vectorize/example.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/cloudflare_vectorize/example.ts",
"repo_id": "langchainjs",
"token_count": 659
} | 812 |
from dataclasses import dataclass, field
from typing import ClassVar, Dict
from ..features import Features, Value
from .base import TaskTemplate
@dataclass(frozen=True)
class Summarization(TaskTemplate):
# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
task... | datasets/src/datasets/tasks/summarization.py/0 | {
"file_path": "datasets/src/datasets/tasks/summarization.py",
"repo_id": "datasets",
"token_count": 254
} | 144 |
try {
dir ("milvus-helm-charts") {
// sh 'helm init --client-only --skip-refresh --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts'
// sh 'helm repo update'
checkout([$class: 'GitSCM', branches: [[name: "${HELM_BRANCH}"]], userRemoteConfigs: [[url: "${HELM_URL}", name:... | milvus/tests/benchmark/ci/jenkinsfile/deploy_test.groovy/0 | {
"file_path": "milvus/tests/benchmark/ci/jenkinsfile/deploy_test.groovy",
"repo_id": "milvus",
"token_count": 688
} | 1,987 |
from dataclasses import dataclass
from typing import Literal, Optional, Tuple
from transformers import PreTrainedModel, PreTrainedTokenizer
# TODO: Add Abstract Base Class if more formats are added
@dataclass
class ChatMlSpecialTokens:
"""Dataclass for special tokens used in ChatML, including system, user, assis... | trl/trl/models/utils.py/0 | {
"file_path": "trl/trl/models/utils.py",
"repo_id": "trl",
"token_count": 1250
} | 816 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.