text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
from langchain_community.chat_message_histories.streamlit import (
StreamlitChatMessageHistory,
)
__all__ = ["StreamlitChatMessageHistory"]
| langchain/libs/langchain/langchain/memory/chat_message_histories/streamlit.py/0 | {
"file_path": "langchain/libs/langchain/langchain/memory/chat_message_histories/streamlit.py",
"repo_id": "langchain",
"token_count": 43
} | 525 |
from langchain_core.agents import AgentActionMessageLog
from langchain_core.messages import AIMessage, FunctionMessage
from langchain.agents.format_scratchpad.openai_functions import (
format_to_openai_function_messages,
)
def test_calls_convert_agent_action_to_messages() -> None:
additional_kwargs1 = {
... | langchain/libs/langchain/tests/unit_tests/agents/format_scratchpad/test_openai_functions.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/agents/format_scratchpad/test_openai_functions.py",
"repo_id": "langchain",
"token_count": 813
} | 590 |
# 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/tests/models/idefics/test_processor_idefics.py/0 | {
"file_path": "transformers/tests/models/idefics/test_processor_idefics.py",
"repo_id": "transformers",
"token_count": 2692
} | 717 |
version: "3"
services:
redis:
container_name: opengpts-redis
image: redis/redis-stack-server:latest
ports:
- "6379:6379"
volumes:
- ./redis-volume:/data
backend:
container_name: opengpts-backend
build:
context: backend
ports:
- "8100:8000" # Backend is accessible... | opengpts/docker-compose.yml/0 | {
"file_path": "opengpts/docker-compose.yml",
"repo_id": "opengpts",
"token_count": 375
} | 1,988 |
from rag_conversation_zep.chain import chain
__all__ = ["chain"]
| langchain/templates/rag-conversation-zep/rag_conversation_zep/__init__.py/0 | {
"file_path": "langchain/templates/rag-conversation-zep/rag_conversation_zep/__init__.py",
"repo_id": "langchain",
"token_count": 23
} | 672 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({ oldEntrypointName: "llms/hf" });
export * from "@langchain/community/llms/hf";
| langchainjs/langchain/src/llms/hf.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/hf.ts",
"repo_id": "langchainjs",
"token_count": 69
} | 930 |
from llama_index.readers.weather.base import WeatherReader
__all__ = ["WeatherReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-weather/llama_index/readers/weather/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-weather/llama_index/readers/weather/__init__.py",
"repo_id": "llama_index",
"token_count": 26
} | 1,453 |
<jupyter_start><jupyter_text>Multimodal RAG for processing videos using OpenAI GPT4V and LanceDB vectorstoreIn this notebook, we showcase a Multimodal RAG architecture designed for video processing. We utilize OpenAI GPT4V MultiModal LLM class that employs [CLIP](https://github.com/openai/CLIP) to generate multimodal e... | llama_index/docs/examples/multi_modal/multi_modal_video_RAG.ipynb/0 | {
"file_path": "llama_index/docs/examples/multi_modal/multi_modal_video_RAG.ipynb",
"repo_id": "llama_index",
"token_count": 3341
} | 1,069 |
-----BEGIN CERTIFICATE-----
MIIDpzCCAo+gAwIBAgIUXZen56S+MZE8UTb09jyM6szs/ukwDQYJKoZIhvcNAQEL
BQAwYzELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAkdaMQswCQYDVQQHDAJHWjESMBAG
A1UECgwJcm9uZXRoaW5nMRIwEAYDVQQLDAlyb25ldGhpbmcxEjAQBgNVBAMMCWxv
Y2FsaG9zdDAeFw0yMjA1MDEwODU3MzRaFw0zMjA0MjgwODU3MzRaMGMxCzAJBgNV
BAYTAkNOMQswCQYDVQQIDAJHWjELMAkG... | milvus/configs/cert/ca.pem/0 | {
"file_path": "milvus/configs/cert/ca.pem",
"repo_id": "milvus",
"token_count": 970
} | 1,759 |
python_tests()
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate-multi-modal/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate-multi-modal/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,255 |
# Copyright 2024 Kakao Brain and 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 requi... | diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py",
"repo_id": "diffusers",
"token_count": 9940
} | 261 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "llms/base",
newEntrypointName: "language_models/llms",
newPackageName: "@langchain/core",
});
export * from "@langchain/core/language_models/llms";
| langchainjs/langchain/src/llms/base.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/base.ts",
"repo_id": "langchainjs",
"token_count": 99
} | 993 |
"""Node recency post-processor."""
from datetime import datetime
from typing import List, Optional, Set
import numpy as np
import pandas as pd
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.postprocessor.types import BaseNodePostprocessor
from llama_index.legacy.schema import MetadataMo... | llama_index/llama-index-legacy/llama_index/legacy/postprocessor/node_recency.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/postprocessor/node_recency.py",
"repo_id": "llama_index",
"token_count": 3267
} | 1,585 |
## Release Process
This guide covers how to release chroma to PyPi
#### Increase the version number
1. Create a new PR for the release that upgrades the version in code. Name it `release/A.B.C` In [this file](https://github.com/chroma-core/chroma/blob/main/chromadb/__init__.py) update the __ version __.
```
__version... | chroma/RELEASE_PROCESS.md/0 | {
"file_path": "chroma/RELEASE_PROCESS.md",
"repo_id": "chroma",
"token_count": 243
} | 11 |
# How to add one new datasets
Add datasets directly to the 🤗 Hugging Face Hub!
You can share your dataset on https://huggingface.co/datasets directly using your account, see the documentation:
* [Create a dataset and upload files on the website](https://huggingface.co/docs/datasets/upload_dataset)
* [Advanced guide... | datasets/ADD_NEW_DATASET.md/0 | {
"file_path": "datasets/ADD_NEW_DATASET.md",
"repo_id": "datasets",
"token_count": 113
} | 112 |
<!---
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 ... | transformers/examples/tensorflow/summarization/README.md/0 | {
"file_path": "transformers/examples/tensorflow/summarization/README.md",
"repo_id": "transformers",
"token_count": 415
} | 552 |
from langchain.schema.retriever import __all__
EXPECTED_ALL = ["BaseRetriever"]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/langchain/tests/unit_tests/schema/test_retriever.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/schema/test_retriever.py",
"repo_id": "langchain",
"token_count": 62
} | 612 |
use candle::{Result, Tensor, D};
use candle_nn as nn;
use nn::{Module, VarBuilder};
// Based on the Python version from torchvision.
// https://github.com/pytorch/vision/blob/0d75d9e5516f446c9c0ef93bd4ed9fea13992d06/torchvision/models/efficientnet.py#L47
#[derive(Debug, Clone, Copy)]
pub struct MBConvConfig {
expa... | candle/candle-transformers/src/models/efficientnet.rs/0 | {
"file_path": "candle/candle-transformers/src/models/efficientnet.rs",
"repo_id": "candle",
"token_count": 5123
} | 67 |
# 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/consistency_models/pipeline_consistency_models.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py",
"repo_id": "diffusers",
"token_count": 5192
} | 243 |
# coding=utf-8
# Copyright 2023 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/seamless_m4t/processing_seamless_m4t.py/0 | {
"file_path": "transformers/src/transformers/models/seamless_m4t/processing_seamless_m4t.py",
"repo_id": "transformers",
"token_count": 2298
} | 727 |
// 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/constrant.go/0 | {
"file_path": "milvus/internal/rootcoord/constrant.go",
"repo_id": "milvus",
"token_count": 822
} | 2,054 |
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.i... | opengpts/frontend/README.md/0 | {
"file_path": "opengpts/frontend/README.md",
"repo_id": "opengpts",
"token_count": 426
} | 2,139 |
<jupyter_start><jupyter_text>Annoy> [Annoy](https://github.com/spotify/annoy) (`Approximate Nearest Neighbors Oh Yeah`) is a C++ library with Python bindings to search for points in space that are close to a given query point. It also creates large read-only file-based data structures that are mmapped into memory so th... | langchain/docs/docs/integrations/vectorstores/annoy.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/annoy.ipynb",
"repo_id": "langchain",
"token_count": 1555
} | 173 |
# A Guide to Extracting Terms and Definitions
Llama Index has many use cases (semantic search, summarization, etc.) that are well documented. However, this doesn't mean we can't apply Llama Index to very specific use cases!
In this tutorial, we will go through the design process of using Llama Index to extract terms ... | llama_index/docs/understanding/putting_it_all_together/q_and_a/terms_definitions_tutorial.md/0 | {
"file_path": "llama_index/docs/understanding/putting_it_all_together/q_and_a/terms_definitions_tutorial.md",
"repo_id": "llama_index",
"token_count": 9016
} | 1,166 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/models/autoencoderkl.md/0 | {
"file_path": "diffusers/docs/source/en/api/models/autoencoderkl.md",
"repo_id": "diffusers",
"token_count": 784
} | 175 |
<!--Copyright 2024 Custom Diffusion authors 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... | diffusers/docs/source/en/training/custom_diffusion.md/0 | {
"file_path": "diffusers/docs/source/en/training/custom_diffusion.md",
"repo_id": "diffusers",
"token_count": 5470
} | 181 |
<jupyter_start><jupyter_text>Doctran: extract propertiesWe can extract useful features of documents using the [Doctran](https://github.com/psychic-api/doctran) library, which uses OpenAI's function calling feature to extract specific metadata.Extracting metadata from documents is helpful for a variety of tasks, includi... | langchain/docs/docs/integrations/document_transformers/doctran_extract_properties.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_transformers/doctran_extract_properties.ipynb",
"repo_id": "langchain",
"token_count": 1554
} | 123 |
<jupyter_start><jupyter_text>RobocorpThis notebook covers how to get started with [Robocorp Action Server](https://github.com/robocorp/robocorp) action toolkit and LangChain.Robocorp is the easiest way to extend the capabilities of AI agents, assistants and copilots with custom actions. InstallationFirst, see the [Robo... | langchain/docs/docs/integrations/toolkits/robocorp.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/robocorp.ipynb",
"repo_id": "langchain",
"token_count": 1078
} | 171 |
import ujson
import json
from pymilvus.grpc_gen import milvus_pb2 as milvus_types
from pymilvus import connections
sys_info_req = ujson.dumps({"metric_type": "system_info"})
sys_statistics_req = ujson.dumps({"metric_type": "system_statistics"})
sys_logs_req = ujson.dumps({"metric_type": "system_logs"})
class MilvusS... | milvus/tests/python_client/common/milvus_sys.py/0 | {
"file_path": "milvus/tests/python_client/common/milvus_sys.py",
"repo_id": "milvus",
"token_count": 1697
} | 2,119 |
import { getRuntimeEnvironment } from "../env.js";
test("test getRuntimeEnvironment", async () => {
const runtimeEnvironment = await getRuntimeEnvironment();
console.log(runtimeEnvironment);
expect(runtimeEnvironment.runtime).toEqual("node");
});
| langchainjs/langchain-core/src/utils/tests/enviroment.test.ts/0 | {
"file_path": "langchainjs/langchain-core/src/utils/tests/enviroment.test.ts",
"repo_id": "langchainjs",
"token_count": 64
} | 888 |
import type { ObjectId } from "mongodb";
import type { User } from "./User";
import type { Assistant } from "./Assistant";
import type { Timestamps } from "./Timestamps";
export interface Report extends Timestamps {
_id: ObjectId;
createdBy: User["_id"] | string;
assistantId: Assistant["_id"];
reason?: string;
}
| chat-ui/src/lib/types/Report.ts/0 | {
"file_path": "chat-ui/src/lib/types/Report.ts",
"repo_id": "chat-ui",
"token_count": 101
} | 110 |
import { Client } from "../client.js";
import { RunTree, convertToDottedOrderFormat } from "../run_trees.js";
import { v4 as uuidv4 } from "uuid";
async function deleteProject(langchainClient: Client, projectName: string) {
try {
await langchainClient.readProject({ projectName });
await langchainClient.delet... | langsmith-sdk/js/src/tests/batch_client.int.test.ts/0 | {
"file_path": "langsmith-sdk/js/src/tests/batch_client.int.test.ts",
"repo_id": "langsmith-sdk",
"token_count": 2395
} | 1,077 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/datanode/importv2/util_test.go/0 | {
"file_path": "milvus/internal/datanode/importv2/util_test.go",
"repo_id": "milvus",
"token_count": 1172
} | 1,839 |
import ast
from langchain_community.utilities.steam import SteamWebAPIWrapper
def test_get_game_details() -> None:
"""Test for getting game details on Steam"""
steam = SteamWebAPIWrapper()
output = steam.run("get_game_details", "Terraria")
assert "id" in output
assert "link" in output
assert ... | langchain/libs/community/tests/integration_tests/utilities/test_steam_api.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_steam_api.py",
"repo_id": "langchain",
"token_count": 225
} | 368 |
from langchain_community.chat_models.openai import (
ChatOpenAI,
)
__all__ = [
"ChatOpenAI",
]
| langchain/libs/langchain/langchain/chat_models/openai.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chat_models/openai.py",
"repo_id": "langchain",
"token_count": 43
} | 472 |
# Evaluating With `LabelledRagDataset`'s
We have already gone through the core abstractions within the Evaluation module that
enable various kinds of evaluation methodologies of LLM-based applications or systems, including RAG systems. Of course, to evaluate the system one needs an
evaluation method, the system itself... | llama_index/docs/module_guides/evaluating/evaluating_with_llamadatasets.md/0 | {
"file_path": "llama_index/docs/module_guides/evaluating/evaluating_with_llamadatasets.md",
"repo_id": "llama_index",
"token_count": 1859
} | 1,099 |
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) 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
# "L... | milvus/internal/core/build-support/run_cpplint.py/0 | {
"file_path": "milvus/internal/core/build-support/run_cpplint.py",
"repo_id": "milvus",
"token_count": 1653
} | 1,776 |
from llama_index.llms.predibase.base import PredibaseLLM
__all__ = ["PredibaseLLM"]
| llama_index/llama-index-integrations/llms/llama-index-llms-predibase/llama_index/llms/predibase/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-predibase/llama_index/llms/predibase/__init__.py",
"repo_id": "llama_index",
"token_count": 34
} | 1,328 |
"""Init file."""
from llama_index.readers.web.async_web.base import (
AsyncWebPageReader,
)
from llama_index.readers.web.beautiful_soup_web.base import (
BeautifulSoupWebReader,
)
from llama_index.readers.web.knowledge_base.base import (
KnowledgeBaseWebReader,
)
from llama_index.readers.web.main_content_ex... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/__init__.py",
"repo_id": "llama_index",
"token_count": 552
} | 1,565 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/trainer/test_trainer_tpu.py/0 | {
"file_path": "transformers/tests/trainer/test_trainer_tpu.py",
"repo_id": "transformers",
"token_count": 1651
} | 850 |
import unittest
from typing import List
from llama_index.core.schema import NodeRelationship, RelatedNodeInfo, TextNode
from llama_index.core.vector_stores import SimpleVectorStore
from llama_index.core.vector_stores.types import (
ExactMatchFilter,
MetadataFilters,
VectorStoreQuery,
)
_NODE_ID_WEIGHT_1_R... | llama_index/llama-index-core/tests/vector_stores/test_simple.py/0 | {
"file_path": "llama_index/llama-index-core/tests/vector_stores/test_simple.py",
"repo_id": "llama_index",
"token_count": 2813
} | 1,202 |
"""Ad-hoc data loader tool.
Tool that wraps any data loader, and is able to load data on-demand.
"""
from typing import Any, Callable, Dict, List, Optional, Tuple, Type
from llama_index.legacy.bridge.pydantic import BaseModel
from llama_index.legacy.indices.base import BaseIndex
from llama_index.legacy.indices.vect... | llama_index/llama-index-legacy/llama_index/legacy/tools/ondemand_loader_tool.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/tools/ondemand_loader_tool.py",
"repo_id": "llama_index",
"token_count": 2634
} | 1,719 |
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from transformers import AutoConfig, TFAutoModel, is_tensorflow_text_available, is_tf_available
from transformers.models.bert.tokenization_bert import BertTokenizer
from transformers.testing_utils import require_tensorflow_text, require_t... | transformers/tests/models/bert/test_tokenization_bert_tf.py/0 | {
"file_path": "transformers/tests/models/bert/test_tokenization_bert_tf.py",
"repo_id": "transformers",
"token_count": 2059
} | 733 |
"""Logic for converting internal query language to a valid AstraDB query."""
from typing import Dict, Tuple, Union
from langchain.chains.query_constructor.ir import (
Comparator,
Comparison,
Operation,
Operator,
StructuredQuery,
Visitor,
)
MULTIPLE_ARITY_COMPARATORS = [Comparator.IN, Comparato... | langchain/libs/langchain/langchain/retrievers/self_query/astradb.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/self_query/astradb.py",
"repo_id": "langchain",
"token_count": 949
} | 559 |
---
sidebar_class_name: node-only
---
# Prisma
For augmenting existing models in PostgreSQL database with vector search, Langchain supports using [Prisma](https://www.prisma.io/) together with PostgreSQL and [`pgvector`](https://github.com/pgvector/pgvector) Postgres extension.
## Setup
### Setup database instance ... | langchainjs/docs/core_docs/docs/integrations/vectorstores/prisma.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/prisma.mdx",
"repo_id": "langchainjs",
"token_count": 863
} | 775 |
import { test } from "@jest/globals";
import { BaseLanguageModelInput } from "@langchain/core/language_models/base";
import { ChatPromptValue } from "@langchain/core/prompt_values";
import {
AIMessage,
AIMessageChunk,
BaseMessage,
BaseMessageChunk,
HumanMessage,
MessageContentComplex,
MessageContentText,
... | langchainjs/libs/langchain-google-gauth/src/tests/chat_models.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-google-gauth/src/tests/chat_models.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1391
} | 1,060 |
"""Init file."""
| llama_index/llama-index-core/tests/indices/tree/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/tests/indices/tree/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,152 |
from typing import Any, Sequence
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
)
from llama_index.legacy.llms.base import (
llm_chat_callback,
llm_completion_callback,
)
... | llama_index/llama-index-legacy/llama_index/legacy/llms/custom.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/custom.py",
"repo_id": "llama_index",
"token_count": 1032
} | 1,678 |
# Query Pipeline
## Concept
LlamaIndex 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 variety of modules (from LLMs to prompts to retrievers to... | llama_index/docs/module_guides/querying/pipeline/root.md/0 | {
"file_path": "llama_index/docs/module_guides/querying/pipeline/root.md",
"repo_id": "llama_index",
"token_count": 617
} | 1,230 |
# 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/p_tuning/model.py/0 | {
"file_path": "peft/src/peft/tuners/p_tuning/model.py",
"repo_id": "peft",
"token_count": 2476
} | 335 |
python_sources()
| llama_index/llama-index-core/llama_index/core/chat_engine/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/chat_engine/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,201 |
# coding=utf-8
# Copyright 2022 Meta Platforms, 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... | transformers/src/transformers/models/regnet/configuration_regnet.py/0 | {
"file_path": "transformers/src/transformers/models/regnet/configuration_regnet.py",
"repo_id": "transformers",
"token_count": 1486
} | 686 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/llama_index/readers/chatgpt_plugin/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/llama_index/readers/chatgpt_plugin/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,273 |
# coding=utf-8
# Copyright 2023, 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 a... | transformers/src/transformers/models/nllb_moe/configuration_nllb_moe.py/0 | {
"file_path": "transformers/src/transformers/models/nllb_moe/configuration_nllb_moe.py",
"repo_id": "transformers",
"token_count": 4486
} | 721 |
import pytest
from datasets import Dataset, DatasetDict, Features, NamedSplit, Value
from datasets.io.text import TextDatasetReader
from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases
def _check_text_dataset(dataset, expected_features):
assert isinstance(dataset, Dataset)
... | datasets/tests/io/test_text.py/0 | {
"file_path": "datasets/tests/io/test_text.py",
"repo_id": "datasets",
"token_count": 1833
} | 148 |
# Corrective Retrieval Augmented Generation Llama Pack
This LlamaPack implements the Corrective Retrieval Augmented Generation (CRAG) [paper](https://arxiv.org/pdf/2401.15884.pdf)
Corrective Retrieval Augmented Generation (CRAG) is a method designed to enhance the robustness of language model generation by evaluating... | llama_index/llama-index-packs/llama-index-packs-corrective-rag/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-corrective-rag/README.md",
"repo_id": "llama_index",
"token_count": 536
} | 1,663 |
# candle-vit
Vision Transformer (ViT) model implementation following the lines of
[vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224)
This uses a classification head trained on the ImageNet dataset and returns the
probabilities for the top-5 classes.
## Running an example
```
$ cargo run --exa... | candle/candle-examples/examples/vit/README.md/0 | {
"file_path": "candle/candle-examples/examples/vit/README.md",
"repo_id": "candle",
"token_count": 219
} | 47 |
{
"name": "test-exports-cjs",
"version": "0.0.0",
"workspaces": [
"libs/*"
],
"private": true,
"description": "CJS Tests for the things exported by the langchain package",
"main": "./index.mjs",
"scripts": {
"build": "tsc",
"test": "npm run test:esm && npm run test:cjs && npm run test:cjs:im... | langchainjs/environment_tests/test-exports-cjs/package.json/0 | {
"file_path": "langchainjs/environment_tests/test-exports-cjs/package.json",
"repo_id": "langchainjs",
"token_count": 498
} | 749 |
# coding=utf-8
# Copyright 2024 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... | diffusers/examples/research_projects/lora/train_text_to_image_lora.py/0 | {
"file_path": "diffusers/examples/research_projects/lora/train_text_to_image_lora.py",
"repo_id": "diffusers",
"token_count": 19058
} | 216 |
"""Test PromptHelper."""
from typing import Optional, Type, Union
import pytest
from llama_index.legacy.indices.prompt_helper import PromptHelper
from llama_index.legacy.indices.tree.utils import get_numbered_text_from_nodes
from llama_index.legacy.node_parser.text.utils import truncate_text
from llama_index.legacy.p... | llama_index/llama-index-legacy/tests/indices/test_prompt_helper.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/indices/test_prompt_helper.py",
"repo_id": "llama_index",
"token_count": 2958
} | 1,801 |
# coding=utf-8
# Copyright 2023 The Suno AI Authors 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/... | transformers/src/transformers/models/bark/generation_configuration_bark.py/0 | {
"file_path": "transformers/src/transformers/models/bark/generation_configuration_bark.py",
"repo_id": "transformers",
"token_count": 6156
} | 634 |
import sys
from typing import Sequence
from typing_extensions import TypedDict, NotRequired
from importlib_resources.abc import Traversable
import re
import hashlib
from chromadb.db.base import SqlDB, Cursor
from abc import abstractmethod
from chromadb.config import System, Settings
from chromadb.telemetry.opentelemetr... | chroma/chromadb/db/migrations.py/0 | {
"file_path": "chroma/chromadb/db/migrations.py",
"repo_id": "chroma",
"token_count": 3713
} | 15 |
import langsmith
import pytest
from langchain import chat_models, prompts, smith
from langchain.schema import output_parser, runnable
@pytest.fixture
def classification_chain() -> runnable.Runnable:
# Defines the chain you want to run.
prompt = prompts.ChatPromptTemplate.from_messages(
[
(... | langsmith-cookbook/testing-examples/pytest/test_model.py/0 | {
"file_path": "langsmith-cookbook/testing-examples/pytest/test_model.py",
"repo_id": "langsmith-cookbook",
"token_count": 769
} | 1,014 |
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-23-11.html#rel-23-11
FROM nvcr.io/nvidia/pytorch:23.11-py3
LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive
ARG PYTORCH='2.1.0'
# Example: `cu102`, `cu113`, etc.
ARG CUDA='cu121'
RUN apt -y update
RUN apt install -y libaio-... | transformers/docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 893
} | 441 |
<jupyter_start><jupyter_text>SlackThis notebook walks through connecting LangChain to your `Slack` account.To use this toolkit, you will need to get a token explained in the [Slack API docs](https://api.slack.com/tutorials/tracks/getting-a-token). Once you've received a SLACK_USER_TOKEN, you can input it as an environm... | langchain/docs/docs/integrations/toolkits/slack.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/slack.ipynb",
"repo_id": "langchain",
"token_count": 1465
} | 170 |
python_sources()
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/llama_index/storage/kvstore/firestore/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/llama_index/storage/kvstore/firestore/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,408 |
from typing import Any, Dict, List, Optional
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models import BaseLLM
from langchain_core.outputs import Generation, LLMResult
from langchain_core.pydantic_v1 import Field, root_validator
class Aphrodite(BaseLLM):
"""Aphrodit... | langchain/libs/community/langchain_community/llms/aphrodite.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/aphrodite.py",
"repo_id": "langchain",
"token_count": 3568
} | 274 |
from llama_index.core.postprocessor.types import BaseNodePostprocessor
from llama_index.postprocessor.sbert_rerank import SentenceTransformerRerank
def test_class():
names_of_base_classes = [b.__name__ for b in SentenceTransformerRerank.__mro__]
assert BaseNodePostprocessor.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-sbert-rerank/tests/test_postprocessor_sbert_rerank.py/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-sbert-rerank/tests/test_postprocessor_sbert_rerank.py",
"repo_id": "llama_index",
"token_count": 103
} | 1,328 |
from llama_index.readers.file.video_audio.base import VideoAudioReader
__all__ = ["VideoAudioReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/video_audio/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/video_audio/__init__.py",
"repo_id": "llama_index",
"token_count": 32
} | 1,353 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,502 |
<!--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/ja/model_doc/blenderbot-small.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/blenderbot-small.md",
"repo_id": "transformers",
"token_count": 1831
} | 493 |
import {
LLMSingleActionAgent,
AgentActionOutputParser,
AgentExecutor,
} from "langchain/agents";
import { LLMChain } from "langchain/chains";
import { OpenAI } from "@langchain/openai";
import { Calculator } from "langchain/tools/calculator";
import {
BaseStringPromptTemplate,
SerializedBasePromptTemplate,
... | langchainjs/examples/src/agents/custom_llm_agent.ts/0 | {
"file_path": "langchainjs/examples/src/agents/custom_llm_agent.ts",
"repo_id": "langchainjs",
"token_count": 1502
} | 809 |
import os
from openai import OpenAI
from opensearchpy import OpenSearch
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
OPENSEARCH_URL = os.getenv("OPENSEARCH_URL", "https://localhost:9200")
OPENSEARCH_USERNAME = os.getenv("OPENSEARCH_USERNAME", "admin")
OPENSEARCH_PASSWORD = os.getenv("OPENSEARCH_PASSWORD", "admin")
OP... | langchain/templates/rag-opensearch/dummy_index_setup.py/0 | {
"file_path": "langchain/templates/rag-opensearch/dummy_index_setup.py",
"repo_id": "langchain",
"token_count": 669
} | 682 |
from llama_index.vector_stores.qdrant.base import QdrantVectorStore
__all__ = ["QdrantVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/llama_index/vector_stores/qdrant/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/llama_index/vector_stores/qdrant/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,473 |
<jupyter_start><jupyter_text>Twitter Reader<jupyter_code>%pip install llama-index-readers-twitter
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))<jupyter_output><empty_output><jupyter_text>If you're opening th... | llama_index/docs/examples/data_connectors/TwitterDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/TwitterDemo.ipynb",
"repo_id": "llama_index",
"token_count": 345
} | 1,049 |
python_tests()
| llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-kuzu/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/graph_stores/llama-index-graph-stores-kuzu/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,332 |
# 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/utils/py_utils.py/0 | {
"file_path": "datasets/src/datasets/utils/py_utils.py",
"repo_id": "datasets",
"token_count": 10402
} | 141 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/custom_diffusion/test_custom_diffusion.py/0 | {
"file_path": "diffusers/examples/custom_diffusion/test_custom_diffusion.py",
"repo_id": "diffusers",
"token_count": 2234
} | 219 |
from __future__ import annotations
import json
import re
from collections import defaultdict
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union
import requests
from langchain_community.chat_models import ChatOpenAI
from langchain_community.utilities.openapi import OpenAPISpec
from lan... | langchain/libs/langchain/langchain/chains/openai_functions/openapi.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/openai_functions/openapi.py",
"repo_id": "langchain",
"token_count": 5344
} | 471 |
from llama_index.embeddings.sagemaker_endpoint.base import SageMakerEmbedding
__all__ = ["SageMakerEmbedding"]
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/__init__.py",
"repo_id": "llama_index",
"token_count": 39
} | 1,202 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/dinat/test_modeling_dinat.py/0 | {
"file_path": "transformers/tests/models/dinat/test_modeling_dinat.py",
"repo_id": "transformers",
"token_count": 6347
} | 796 |
import json
import logging
from typing import Any, Dict, List, Mapping, Optional, Set
import requests
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import Field
from langchain_community.llms.utils import enforce_stop_t... | langchain/libs/community/langchain_community/llms/yuan2.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/yuan2.py",
"repo_id": "langchain",
"token_count": 2667
} | 294 |
# coding=utf-8
# Copyright 2022 SHI Labs 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/oneformer/modeling_oneformer.py/0 | {
"file_path": "transformers/src/transformers/models/oneformer/modeling_oneformer.py",
"repo_id": "transformers",
"token_count": 62740
} | 722 |
"""Prompt schema definition."""
from __future__ import annotations
import warnings
from pathlib import Path
from typing import Any, Dict, List, Literal, Optional, Union
from langchain_core.prompts.string import (
DEFAULT_FORMATTER_MAPPING,
StringPromptTemplate,
check_valid_template,
get_template_varia... | langchain/libs/core/langchain_core/prompts/prompt.py/0 | {
"file_path": "langchain/libs/core/langchain_core/prompts/prompt.py",
"repo_id": "langchain",
"token_count": 4137
} | 395 |
import { GRAMMAR } from "./grammar/parser_grammar.js";
/**
* Abstract class for handling nodes in an expression language. Subclasses
* must implement the `accepts` and `handle` methods.
*/
export abstract class NodeHandler {
constructor(protected parentHandler?: NodeHandler) {}
/**
* Determines whether the ... | langchainjs/langchain/src/output_parsers/expression_type_handlers/base.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/expression_type_handlers/base.ts",
"repo_id": "langchainjs",
"token_count": 1640
} | 951 |
python_sources()
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-firestore/llama_index/storage/index_store/firestore/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-firestore/llama_index/storage/index_store/firestore/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,462 |
import importlib
def is_sagemaker_available():
return importlib.util.find_spec("sagemaker") is not None
| transformers/tests/sagemaker/__init__.py/0 | {
"file_path": "transformers/tests/sagemaker/__init__.py",
"repo_id": "transformers",
"token_count": 36
} | 801 |
# ReAct
This walkthrough showcases using an agent to implement the [ReAct](https://react-lm.github.io/) logic.
## Setup
Install the OpenAI integration package, retrieve your key, and store it as an environment variable named `OPENAI_API_KEY`:
import IntegrationInstallTooltip from "@mdx_components/integration_instal... | langchainjs/docs/core_docs/docs/modules/agents/agent_types/react.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/agents/agent_types/react.mdx",
"repo_id": "langchainjs",
"token_count": 1019
} | 748 |
"""Waii Tool."""
import json
from typing import Any, List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.response_synthesizers import TreeSummarize
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class WaiiToolSpec(Bas... | llama_index/llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/base.py",
"repo_id": "llama_index",
"token_count": 4116
} | 1,461 |
# LlamaIndex Callbacks Integration: Argilla
| llama_index/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md",
"repo_id": "llama_index",
"token_count": 11
} | 1,261 |
ariga.io/atlas-go-sdk v0.1.1-0.20231001054405-7edfcfc14f1c h1:jvi4KB/7DmYYT+Wy2TFImccaBU0+dw7V8Un67NDGuio=
ariga.io/atlas-go-sdk v0.1.1-0.20231001054405-7edfcfc14f1c/go.mod h1:MLvZ9QwZx1KhI6+8XguxHPUPm0/PTTUr46S5GQAe9WI=
ariga.io/atlas-provider-gorm v0.1.1 h1:Y0VsZCQkXJRYIJxenn2BM6sW2u9SkTca5mLvJumqrgE=
ariga.io/atlas-... | chroma/go/coordinator/go.sum/0 | {
"file_path": "chroma/go/coordinator/go.sum",
"repo_id": "chroma",
"token_count": 26159
} | 46 |
# Microsoft SharePoint Reader
The loader loads the files from a folder in sharepoint site.
It also supports traversing recursively through the sub-folders.
## Prequsites
### App Authentication using Microsoft Entra ID(formerly Azure AD)
1. You need to create an App Registeration in Microsoft Entra ID. Refer [here]... | llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-sharepoint/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-sharepoint/README.md",
"repo_id": "llama_index",
"token_count": 498
} | 1,428 |
# 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 required by appl... | trl/examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py/0 | {
"file_path": "trl/examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py",
"repo_id": "trl",
"token_count": 3133
} | 822 |
<jupyter_start><jupyter_text>Weaviate Hybrid Search>[Weaviate](https://weaviate.io/developers/weaviate) is an open-source vector database.>[Hybrid search](https://weaviate.io/blog/hybrid-search-explained) is a technique that combines multiple search algorithms to improve the accuracy and relevance of search results. It... | langchain/docs/docs/integrations/retrievers/weaviate-hybrid.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/weaviate-hybrid.ipynb",
"repo_id": "langchain",
"token_count": 1348
} | 158 |
from pathlib import Path
from typing import Any, Dict, Iterable
from tomlkit import dump, inline_table, load
from tomlkit.items import InlineTable
def _get_dep_inline_table(path: Path) -> InlineTable:
dep = inline_table()
dep.update({"path": str(path), "develop": True})
return dep
def add_dependencies_... | langchain/libs/cli/langchain_cli/utils/pyproject.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/utils/pyproject.py",
"repo_id": "langchain",
"token_count": 682
} | 216 |
import { authCondition } from "$lib/server/auth";
import { collections } from "$lib/server/database";
import { error } from "@sveltejs/kit";
import { ObjectId } from "mongodb";
/**
* Ideally, we'd be able to detect the client-side abort, see https://github.com/huggingface/chat-ui/pull/88#issuecomment-1523173850
*/
e... | chat-ui/src/routes/conversation/[id]/stop-generating/+server.ts/0 | {
"file_path": "chat-ui/src/routes/conversation/[id]/stop-generating/+server.ts",
"repo_id": "chat-ui",
"token_count": 261
} | 103 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,689 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/tokenization_utils_fast.py/0 | {
"file_path": "transformers/src/transformers/tokenization_utils_fast.py",
"repo_id": "transformers",
"token_count": 16473
} | 766 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/optimization/onnx.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/onnx.md",
"repo_id": "diffusers",
"token_count": 1193
} | 182 |
import { BaseLanguageModel } from "@langchain/core/language_models/base";
import { FileLoader, loadFromFile } from "../util/load.js";
import { parseFileConfig } from "../util/parse.js";
/**
* Load an LLM from a local file.
*
* @example
* ```ts
* import { loadLLM } from "langchain/llms/load";
* const model = awai... | langchainjs/langchain/src/llms/load.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/load.ts",
"repo_id": "langchainjs",
"token_count": 194
} | 929 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.