text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
from neo4j_cypher_ft.chain import chain
if __name__ == "__main__":
original_query = "Did tom cruis act in top gun?"
print(chain.invoke({"question": original_query})) # noqa: T201
| langchain/templates/neo4j-cypher-ft/main.py/0 | {
"file_path": "langchain/templates/neo4j-cypher-ft/main.py",
"repo_id": "langchain",
"token_count": 69
} | 661 |
import { v4 } from "uuid";
import type { D1Database } from "@cloudflare/workers-types";
import { BaseListChatMessageHistory } from "@langchain/core/chat_history";
import {
BaseMessage,
StoredMessage,
StoredMessageData,
mapChatMessagesToStoredMessages,
mapStoredMessagesToChatMessages,
} from "@langchain/core/m... | langchainjs/libs/langchain-community/src/stores/message/cloudflare_d1.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/stores/message/cloudflare_d1.ts",
"repo_id": "langchainjs",
"token_count": 2003
} | 1,010 |
use super::k_quants::{
BlockQ2K, BlockQ3K, BlockQ4K, BlockQ4_0, BlockQ5K, BlockQ6K, BlockQ8K, BlockQ8_0, QK8_0, QK_K,
};
use crate::Result;
use byteorder::{ByteOrder, LittleEndian};
#[allow(unused_imports)]
#[cfg(target_arch = "arm")]
use core::arch::arm::*;
#[allow(unused_imports)]
#[cfg(target_arch = "aarch64")... | candle/candle-core/src/quantized/neon.rs/0 | {
"file_path": "candle/candle-core/src/quantized/neon.rs",
"repo_id": "candle",
"token_count": 15290
} | 33 |
[tool.poetry]
name = "rag-multi-index-fusion"
version = "0.0.1"
description = "RAG with routing and fusion between different domain-specific retrievers"
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
xmltodict = "^0.13.0"
kay = "^0.1.2"
wikipedia =... | langchain/templates/rag-multi-index-fusion/pyproject.toml/0 | {
"file_path": "langchain/templates/rag-multi-index-fusion/pyproject.toml",
"repo_id": "langchain",
"token_count": 346
} | 703 |
import logging
from pymongo import MongoClient
from .models.env import Env
from .models.hardware import Hardware
from .models.metric import Metric
from .models.server import Server
from .config import DB, UNIQUE_ID_COLLECTION, DOC_COLLECTION
from milvus_benchmark import config
# Initialize the mongoDB client
_client... | milvus/tests/benchmark/milvus_benchmark/metrics/api.py/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/metrics/api.py",
"repo_id": "milvus",
"token_count": 662
} | 1,925 |
# Metadata Extraction Usage Pattern
You can use LLMs to automate metadata extraction with our `Metadata Extractor` modules.
Our metadata extractor modules include the following "feature extractors":
- `SummaryExtractor` - automatically extracts a summary over a set of Nodes
- `QuestionsAnsweredExtractor` - extracts ... | llama_index/docs/module_guides/loading/documents_and_nodes/usage_metadata_extractor.md/0 | {
"file_path": "llama_index/docs/module_guides/loading/documents_and_nodes/usage_metadata_extractor.md",
"repo_id": "llama_index",
"token_count": 581
} | 1,094 |
# LlamaIndex Output_Parsers Integration: Guardrails
| llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-guardrails/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/output_parsers/llama-index-output-parsers-guardrails/README.md",
"repo_id": "llama_index",
"token_count": 15
} | 1,432 |
import os
from abc import ABC, abstractmethod
from typing import List, Optional
import fsspec
from llama_index.legacy.data_structs.data_structs import IndexStruct
DEFAULT_PERSIST_DIR = "./storage"
DEFAULT_PERSIST_FNAME = "index_store.json"
DEFAULT_PERSIST_PATH = os.path.join(DEFAULT_PERSIST_DIR, DEFAULT_PERSIST_FNAM... | llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/types.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/types.py",
"repo_id": "llama_index",
"token_count": 385
} | 1,645 |
"""Test HyDE."""
from typing import Any, List, Optional
import numpy as np
from langchain_core.embeddings import Embeddings
from langchain_core.language_models.llms import BaseLLM
from langchain_core.outputs import Generation, LLMResult
from langchain.callbacks.manager import (
AsyncCallbackManagerForLLMRun,
... | langchain/libs/langchain/tests/unit_tests/chains/test_hyde.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/chains/test_hyde.py",
"repo_id": "langchain",
"token_count": 946
} | 596 |
#!/usr/bin/env bash
set -e
function cleanup {
# Restore the previous kube context
kubectl config use-context $PREV_CHROMA_KUBE_CONTEXT
# Kill the tunnel process
kill $TUNNEL_PID
minikube delete -p chroma-test
}
trap cleanup EXIT
# Save the current kube context into a variable
export PREV_CHROMA_... | chroma/bin/cluster-test.sh/0 | {
"file_path": "chroma/bin/cluster-test.sh",
"repo_id": "chroma",
"token_count": 824
} | 9 |
# Porting a custom kernel
| candle/candle-book/src/inference/cuda/porting.md/0 | {
"file_path": "candle/candle-book/src/inference/cuda/porting.md",
"repo_id": "candle",
"token_count": 7
} | 28 |
from typing import Sequence
from uuid import UUID
from overrides import overrides
from chromadb.config import System
from chromadb.ingest import CollectionAssignmentPolicy
from chromadb.ingest.impl.utils import create_topic_name
class SimpleAssignmentPolicy(CollectionAssignmentPolicy):
"""Simple assignment policy... | chroma/chromadb/ingest/impl/simple_policy.py/0 | {
"file_path": "chroma/chromadb/ingest/impl/simple_policy.py",
"repo_id": "chroma",
"token_count": 783
} | 16 |
<!---
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/pytorch/question-answering/README.md/0 | {
"file_path": "transformers/examples/pytorch/question-answering/README.md",
"repo_id": "transformers",
"token_count": 2413
} | 514 |
[tool.poetry]
name = "rag-codellama-fireworks"
version = "0.1.0"
description = "RAG using OSS LLMs via Fireworks"
authors = [
"Lance Martin <lance@langchain.dev>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
langchain = "^0.1"
gpt4all = ">=1.0.8"
tiktoken = ">=0.5.1"
chromadb = ">=0.4.1... | langchain/templates/rag-codellama-fireworks/pyproject.toml/0 | {
"file_path": "langchain/templates/rag-codellama-fireworks/pyproject.toml",
"repo_id": "langchain",
"token_count": 319
} | 693 |
FROM rocm/dev-ubuntu-22.04:5.6
LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive
ARG PYTORCH='2.1.1'
ARG TORCH_VISION='0.16.1'
ARG TORCH_AUDIO='2.1.1'
ARG ROCM='5.6'
RUN apt update && \
apt install -y --no-install-recommends \
libaio-dev \
git \
# These are required to build deepspeed... | transformers/docker/transformers-pytorch-deepspeed-amd-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-pytorch-deepspeed-amd-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 639
} | 428 |
-- SQLite does not support adding check with alter table, as a result, adding a check
-- involve creating a new table and copying the data over. It is over kill with adding
-- a boolean type column. The application write to the table needs to ensure the data
-- integrity.
ALTER TABLE embedding_metadata ADD COLUMN bool_... | chroma/chromadb/migrations/metadb/00002-embedding-metadata.sqlite.sql/0 | {
"file_path": "chroma/chromadb/migrations/metadb/00002-embedding-metadata.sqlite.sql",
"repo_id": "chroma",
"token_count": 79
} | 18 |
"""Pytorch impl of Aligned Xception 41, 65, 71
This is a correct, from scratch impl of Aligned Xception (Deeplab) models compatible with TF weights at
https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md
Hacked together by / Copyright 2020 Ross Wightman
"""
from functools import partia... | pytorch-image-models/timm/models/xception_aligned.py/0 | {
"file_path": "pytorch-image-models/timm/models/xception_aligned.py",
"repo_id": "pytorch-image-models",
"token_count": 7719
} | 360 |
""" MobileViT
Paper:
V1: `MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer` - https://arxiv.org/abs/2110.02178
V2: `Separable Self-attention for Mobile Vision Transformers` - https://arxiv.org/abs/2206.02680
MobileVitBlock and checkpoints adapted from https://github.com/apple/ml-cvnets... | pytorch-image-models/timm/models/mobilevit.py/0 | {
"file_path": "pytorch-image-models/timm/models/mobilevit.py",
"repo_id": "pytorch-image-models",
"token_count": 12812
} | 400 |
<jupyter_start><jupyter_text>ElasticsearchWalkthrough of how to generate embeddings using a hosted embedding model in ElasticsearchThe easiest way to instantiate the `ElasticsearchEmbeddings` class it either- using the `from_credentials` constructor if you are using Elastic Cloud- or using the `from_es_connection` cons... | langchain/docs/docs/integrations/text_embedding/elasticsearch.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/elasticsearch.ipynb",
"repo_id": "langchain",
"token_count": 757
} | 163 |
diff --git a/package.json b/package.json
index 1823128f20579c0c70acfb394d84d5f2997aafb9..663f5b611870e762cf355b1d4810765f9c89b318 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,7 @@
{
"name": "voy-search",
+ "type": "module",
+ "main": "voy_search.js",
"collaborators": [
"Daw-Chih Liou <dawochih.... | langchainjs/.yarn/patches/voy-search-npm-0.6.2-d4aca30a0e.patch/0 | {
"file_path": "langchainjs/.yarn/patches/voy-search-npm-0.6.2-d4aca30a0e.patch",
"repo_id": "langchainjs",
"token_count": 165
} | 709 |
<jupyter_start><jupyter_text>Multidoc Autoretrieval PackThis is the LlamaPack version of our structured hierarchical retrieval guide in the [core repo](https://docs.llamaindex.ai/en/stable/examples/query_engine/multi_doc_auto_retrieval/multi_doc_auto_retrieval.html). Setup and Download DataIn this section, we'll load ... | llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/examples/multidoc_autoretrieval.ipynb/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/examples/multidoc_autoretrieval.ipynb",
"repo_id": "llama_index",
"token_count": 2378
} | 1,856 |
import os
import re
import subprocess # nosec
import tempfile
from langchain.agents import AgentType, initialize_agent
from langchain.agents.tools import Tool
from langchain.pydantic_v1 import BaseModel, Field, ValidationError, validator
from langchain_community.chat_models import ChatOpenAI
from langchain_core.langu... | langchain/templates/python-lint/python_lint/agent_executor.py/0 | {
"file_path": "langchain/templates/python-lint/python_lint/agent_executor.py",
"repo_id": "langchain",
"token_count": 2797
} | 672 |
import { PromptTemplate } from "@langchain/core/prompts";
export const NAIVE_FIX_TEMPLATE = `Instructions:
--------------
{instructions}
--------------
Completion:
--------------
{completion}
--------------
Above, the Completion did not satisfy the constraints given in the Instructions.
Error:
--------------
{error}
... | langchainjs/langchain/src/output_parsers/prompts.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/prompts.ts",
"repo_id": "langchainjs",
"token_count": 148
} | 911 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/util/gc/gc_tuner.go/0 | {
"file_path": "milvus/pkg/util/gc/gc_tuner.go",
"repo_id": "milvus",
"token_count": 1613
} | 1,934 |
#!/usr/bin/env bash
# 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... | milvus/scripts/core_build.sh/0 | {
"file_path": "milvus/scripts/core_build.sh",
"repo_id": "milvus",
"token_count": 3312
} | 1,846 |
# College Confidential
>[College Confidential](https://www.collegeconfidential.com/) gives information on 3,800+ colleges and universities.
## Installation and Setup
There isn't any special setup for it.
## Document Loader
See a [usage example](/docs/integrations/document_loaders/college_confidential).
```python... | langchain/docs/docs/integrations/providers/college_confidential.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/college_confidential.mdx",
"repo_id": "langchain",
"token_count": 104
} | 132 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-snscrape-twitter/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-snscrape-twitter/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,378 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,667 |
import pytest
import torch
from copy import copy
from transformers import AutoTokenizer
from text_generation_server.pb import generate_pb2
from text_generation_server.models.causal_lm import CausalLMBatch
from text_generation_server.utils import weight_hub_files, download_weights
from text_generation_server.models.bl... | text-generation-inference/server/tests/models/test_bloom.py/0 | {
"file_path": "text-generation-inference/server/tests/models/test_bloom.py",
"repo_id": "text-generation-inference",
"token_count": 5296
} | 411 |
# LlamaIndex Postprocessor Integration: Rankgpt Rerank
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-rankgpt-rerank/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-rankgpt-rerank/README.md",
"repo_id": "llama_index",
"token_count": 15
} | 1,438 |
package dbmodel
import (
"time"
"github.com/chroma/chroma-coordinator/internal/types"
)
type CollectionMetadata struct {
CollectionID string `gorm:"collection_id;primaryKey"`
Key *string `gorm:"key;primaryKey"`
StrValue *string `gorm:"str_value"`
IntValue *int64 ... | chroma/go/coordinator/internal/metastore/db/dbmodel/collection_metadata.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/db/dbmodel/collection_metadata.go",
"repo_id": "chroma",
"token_count": 379
} | 49 |
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitem... | langchain/libs/community/tests/integration_tests/examples/docusaurus-sitemap.xml/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/examples/docusaurus-sitemap.xml",
"repo_id": "langchain",
"token_count": 616
} | 364 |
# LlamaIndex Llms Integration: Rungpt
| llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,420 |
import asyncio
from typing import Any, Dict, List, Optional, Sequence, Tuple, cast
from llama_index.core.async_utils import asyncio_module
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import RESPONSE_TYPE, Response
from llama_index.core.evaluation.base ... | llama_index/llama-index-core/llama_index/core/evaluation/batch_runner.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/evaluation/batch_runner.py",
"repo_id": "llama_index",
"token_count": 5320
} | 1,254 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-spotify/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-spotify/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,444 |
# Introduction [[introduction]]
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit0/thumbnail.png" alt="Thumbnail"/>
Since the beginning of this course, we learned to train agents in a *single-agent system* where our agent was alone in its environment: it was **no... | deep-rl-class/units/en/unit7/introduction.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit7/introduction.mdx",
"repo_id": "deep-rl-class",
"token_count": 574
} | 163 |
# SingleStore Loader
The SingleStore Loader retrieves a set of documents from a specified table in a SingleStore database. The user initializes the loader with database information and then provides a search embedding for retrieving similar documents.
## Usage
Here's an example usage of the SingleStoreReader:
```py... | llama_index/llama-index-integrations/readers/llama-index-readers-singlestore/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-singlestore/README.md",
"repo_id": "llama_index",
"token_count": 353
} | 1,379 |
export * from "./qa/index.js";
export * from "./criteria/index.js";
export * from "./agents/index.js";
export * from "./embedding_distance/index.js";
export * from "./comparison/index.js";
export * from "./types.js";
export * from "./loader.js";
| langchainjs/langchain/src/evaluation/index.ts/0 | {
"file_path": "langchainjs/langchain/src/evaluation/index.ts",
"repo_id": "langchainjs",
"token_count": 86
} | 878 |
// 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/storage/primary_keys.go/0 | {
"file_path": "milvus/internal/storage/primary_keys.go",
"repo_id": "milvus",
"token_count": 1442
} | 1,873 |
<jupyter_start><jupyter_text>RSS FeedsThis covers how to load HTML news articles from a list of RSS feed URLs into a document format that we can use downstream.<jupyter_code>%pip install --upgrade --quiet feedparser newspaper3k listparser
from langchain_community.document_loaders import RSSFeedLoader
urls = ["https://... | langchain/docs/docs/integrations/document_loaders/rss.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/rss.ipynb",
"repo_id": "langchain",
"token_count": 617
} | 119 |
<jupyter_start><jupyter_text>Getting Started Installing Vertex AI To Install Vertex AI you need to follow the following steps* Install Vertex Cloud SDK (https://googleapis.dev/python/aiplatform/latest/index.html)* Setup your Default Project, credentials, region Basic auth example for service account<jupyter_code>%pip i... | llama_index/docs/examples/llm/vertex.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/vertex.ipynb",
"repo_id": "llama_index",
"token_count": 7768
} | 1,091 |
from __future__ import annotations
from copy import deepcopy
from typing import Any, Dict, List, Optional, Sequence, Union
from langchain_core.documents import Document
from langchain_core.pydantic_v1 import Extra, root_validator
from langchain.callbacks.manager import Callbacks
from langchain.retrievers.document_co... | langchain/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py",
"repo_id": "langchain",
"token_count": 1773
} | 557 |
<jupyter_start><jupyter_text>Diffusion Models from ScratchSometimes it is helpful to consider the simplest possible version of something to better understand how it works. We're going to try that in this notebook, beginning with a 'toy' diffusion model to see how the different pieces work, and then examining how they d... | diffusion-models-class/unit1/02_diffusion_models_from_scratch.ipynb/0 | {
"file_path": "diffusion-models-class/unit1/02_diffusion_models_from_scratch.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 8444
} | 285 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/mq/msgstream/mqwrapper/pulsar/pulsar_consumer.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/pulsar/pulsar_consumer.go",
"repo_id": "milvus",
"token_count": 2210
} | 1,826 |
import { ChatOpenAI } from "@langchain/openai";
import { UpstashRedisCache } from "@langchain/community/caches/upstash_redis";
// See https://docs.upstash.com/redis/howto/connectwithupstashredis#quick-start for connection options
const cache = new UpstashRedisCache({
config: {
url: "UPSTASH_REDIS_REST_URL",
... | langchainjs/examples/src/cache/chat_models/upstash_redis.ts/0 | {
"file_path": "langchainjs/examples/src/cache/chat_models/upstash_redis.ts",
"repo_id": "langchainjs",
"token_count": 149
} | 784 |
from langchain.chains import LLMChain
from langchain.prompts import PromptTemplate
from langchain_core.language_models import BaseLanguageModel
class TaskExecutionChain(LLMChain):
"""Chain to execute tasks."""
@classmethod
def from_llm(cls, llm: BaseLanguageModel, verbose: bool = True) -> LLMChain:
... | langchain/libs/experimental/langchain_experimental/autonomous_agents/baby_agi/task_execution.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/autonomous_agents/baby_agi/task_execution.py",
"repo_id": "langchain",
"token_count": 323
} | 414 |
"""Wrapper around Redis vector database."""
from __future__ import annotations
import logging
import os
import uuid
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
List,
Mapping,
Optional,
Tuple,
Type,
Union,
cast,
)
import numpy as np
import yaml
fr... | langchain/libs/community/langchain_community/vectorstores/redis/base.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/redis/base.py",
"repo_id": "langchain",
"token_count": 24928
} | 311 |
#!/usr/bin/env bash
SCRIPTS_DIR=$(dirname "$0")
THIRD_PARTY_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty
API_VERSION=$(go list -m github.com/milvus-io/milvus-proto/go-api/v2 | awk -F' ' '{print $2}')
if [ ! -d "$THIRD_PARTY_DIR/milvus-proto" ]; then
mkdir -p $THIRD_PARTY_DIR
pushd $THIRD_PARTY_DIR
git clone https... | milvus/scripts/download_milvus_proto.sh/0 | {
"file_path": "milvus/scripts/download_milvus_proto.sh",
"repo_id": "milvus",
"token_count": 401
} | 1,984 |
# Metric Card for Recall
## Metric Description
Recall is the fraction of the positive examples that were correctly labeled by the model as positive. It can be computed with the equation:
Recall = TP / (TP + FN)
Where TP is the number of true positives and FN is the number of false negatives.
## How to Use
At mini... | datasets/metrics/recall/README.md/0 | {
"file_path": "datasets/metrics/recall/README.md",
"repo_id": "datasets",
"token_count": 1704
} | 121 |
<p align="center">
<br>
<img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/>
<br>
<p>
<p align="center">
<img alt="Build" src="https://github.com/huggingface/tokenizers/workflows/Rust/badge.svg">
<a href="https://github.com/huggingface/tokenizers/blob/main/LI... | tokenizers/README.md/0 | {
"file_path": "tokenizers/README.md",
"repo_id": "tokenizers",
"token_count": 945
} | 423 |
python_sources()
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-dashscope/llama_index/multi_modal_llms/dashscope/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-dashscope/llama_index/multi_modal_llms/dashscope/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,246 |
-- Create "collection_metadata" table
CREATE TABLE "public"."collection_metadata" (
"collection_id" text NOT NULL,
"key" text NOT NULL,
"str_value" text NULL,
"int_value" bigint NULL,
"float_value" numeric NULL,
"ts" bigint NULL DEFAULT 0,
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
"upda... | chroma/go/coordinator/migrations/20231116210409.sql/0 | {
"file_path": "chroma/go/coordinator/migrations/20231116210409.sql",
"repo_id": "chroma",
"token_count": 908
} | 57 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-deeplake/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-deeplake/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,391 |
package datacoord
import (
"context"
"sync"
"time"
"github.com/samber/lo"
"go.uber.org/zap"
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/util/logutil"
)
type CompactionViewManager struct {
view *FullViews
viewGuard sync.RWM... | milvus/internal/datacoord/compaction_view_manager.go/0 | {
"file_path": "milvus/internal/datacoord/compaction_view_manager.go",
"repo_id": "milvus",
"token_count": 1710
} | 1,764 |
# ForefrontAI
This page covers how to use the ForefrontAI ecosystem within LangChain.
It is broken into two parts: installation and setup, and then references to specific ForefrontAI wrappers.
## Installation and Setup
- Get an ForefrontAI api key and set it as an environment variable (`FOREFRONTAI_API_KEY`)
## Wrap... | langchain/docs/docs/integrations/providers/forefrontai.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/forefrontai.mdx",
"repo_id": "langchain",
"token_count": 127
} | 137 |
---
sidebar-position: 0
---
# Self-querying retriever
Learn about how the self-querying retriever works [here](/docs/modules/data_connection/retrievers/self_query).
import DocCardList from "@theme/DocCardList";
<DocCardList />
| langchain/docs/docs/integrations/retrievers/self_query/index.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/self_query/index.mdx",
"repo_id": "langchain",
"token_count": 74
} | 167 |
// Just enough pickle support to be able to read PyTorch checkpoints.
// This hardcodes objects that are required for tensor reading, we may want to make this a bit more
// composable/tensor agnostic at some point.
use crate::{DType, Error as E, Layout, Result, Tensor};
use byteorder::{LittleEndian, ReadBytesExt};
use ... | candle/candle-core/src/pickle.rs/0 | {
"file_path": "candle/candle-core/src/pickle.rs",
"repo_id": "candle",
"token_count": 14132
} | 32 |
import { test, expect } from "@jest/globals";
import * as url from "node:url";
import * as path from "node:path";
import { TextLoader } from "../fs/text.js";
test("Test Text loader from file", async () => {
const filePath = path.resolve(
path.dirname(url.fileURLToPath(import.meta.url)),
"./example_data/examp... | langchainjs/langchain/src/document_loaders/tests/text.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/text.test.ts",
"repo_id": "langchainjs",
"token_count": 246
} | 911 |
{
"name": "tokenizers-darwin-x64",
"version": "0.13.4-rc1",
"os": [
"darwin"
],
"cpu": [
"x64"
],
"main": "tokenizers.darwin-x64.node",
"files": [
"tokenizers.darwin-x64.node"
],
"description": "Tokenizers platform specific bindings",
"keywords": [
"napi-rs",
"NAPI",
"N-API... | tokenizers/bindings/node/npm/darwin-x64/package.json/0 | {
"file_path": "tokenizers/bindings/node/npm/darwin-x64/package.json",
"repo_id": "tokenizers",
"token_count": 268
} | 439 |
from __future__ import annotations
from typing import TYPE_CHECKING, Dict, Optional, Sequence
from langchain_core.documents import Document
from langchain_core.pydantic_v1 import Extra, root_validator
from langchain.callbacks.manager import Callbacks
from langchain.retrievers.document_compressors.base import BaseDoc... | langchain/libs/langchain/langchain/retrievers/document_compressors/flashrank_rerank.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/document_compressors/flashrank_rerank.py",
"repo_id": "langchain",
"token_count": 943
} | 534 |
"""Xorbits toolkit."""
| langchain/libs/experimental/langchain_experimental/agents/agent_toolkits/xorbits/__init__.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/agents/agent_toolkits/xorbits/__init__.py",
"repo_id": "langchain",
"token_count": 9
} | 436 |
"""
This tool allows agents to interact with the NASA API, specifically
the the NASA Image & Video Library and Exoplanet
"""
from typing import Optional
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import Field
from langchain_core.tools import BaseTool
from langchai... | langchain/libs/community/langchain_community/tools/nasa/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/nasa/tool.py",
"repo_id": "langchain",
"token_count": 276
} | 302 |
from llama_index.retrievers.you.base import YouRetriever
__all__ = ["YouRetriever"]
| llama_index/llama-index-integrations/retrievers/llama-index-retrievers-you/llama_index/retrievers/you/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/retrievers/llama-index-retrievers-you/llama_index/retrievers/you/__init__.py",
"repo_id": "llama_index",
"token_count": 31
} | 1,449 |
from langchain_community.chat_message_histories.in_memory import ChatMessageHistory
__all__ = ["ChatMessageHistory"]
| langchain/libs/langchain/langchain/memory/chat_message_histories/in_memory.py/0 | {
"file_path": "langchain/libs/langchain/langchain/memory/chat_message_histories/in_memory.py",
"repo_id": "langchain",
"token_count": 32
} | 546 |
from langchain_community.callbacks.sagemaker_callback import (
SageMakerCallbackHandler,
)
__all__ = ["SageMakerCallbackHandler"]
| langchain/libs/langchain/langchain/callbacks/sagemaker_callback.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/sagemaker_callback.py",
"repo_id": "langchain",
"token_count": 41
} | 475 |
from llama_index.vector_stores.docarray.hnsw import DocArrayHnswVectorStore
from llama_index.vector_stores.docarray.in_memory import DocArrayInMemoryVectorStore
__all__ = [
"DocArrayInMemoryVectorStore",
"DocArrayHnswVectorStore",
]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-docarray/llama_index/vector_stores/docarray/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-docarray/llama_index/vector_stores/docarray/__init__.py",
"repo_id": "llama_index",
"token_count": 82
} | 1,653 |
# coding=utf-8
# Copyright 2024 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... | diffusers/src/diffusers/utils/dynamic_modules_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dynamic_modules_utils.py",
"repo_id": "diffusers",
"token_count": 7559
} | 276 |
<jupyter_start><jupyter_text>SingleStoreDB>[SingleStoreDB](https://singlestore.com/) is a high-performance distributed SQL database that supports deployment both in the [cloud](https://www.singlestore.com/cloud/) and on-premises. It provides vector storage, and vector functions including [dot_product](https://docs.sing... | langchain/docs/docs/integrations/vectorstores/singlestoredb.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/singlestoredb.ipynb",
"repo_id": "langchain",
"token_count": 740
} | 185 |
version: "3"
services:
clickhouse:
image: clickhouse/clickhouse-server:24.1
user: "101:101"
container_name: clickhouse-server
hostname: clickhouse-server
ports:
- "8123:8123"
- "9000:9000"
ulimits:
nofile:
soft: 262144
hard: 262144
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-clickhouse/docker-compose.yml/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-clickhouse/docker-compose.yml",
"repo_id": "llama_index",
"token_count": 140
} | 1,552 |
import { logVersion010MigrationWarning } from "../../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "stores/message/planetscale",
});
export * from "@langchain/community/stores/message/planetscale";
| langchainjs/langchain/src/stores/message/planetscale.ts/0 | {
"file_path": "langchainjs/langchain/src/stores/message/planetscale.ts",
"repo_id": "langchainjs",
"token_count": 77
} | 953 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/visual_question_answering.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/visual_question_answering.md",
"repo_id": "transformers",
"token_count": 7952
} | 490 |
# coding=utf-8
# Copyright 2021 Google Research and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | transformers/src/transformers/models/big_bird/configuration_big_bird.py/0 | {
"file_path": "transformers/src/transformers/models/big_bird/configuration_big_bird.py",
"repo_id": "transformers",
"token_count": 3227
} | 585 |
# Motherduck
>[Motherduck](https://motherduck.com/) is a managed DuckDB-in-the-cloud service.
## Installation and Setup
First, you need to install `duckdb` python package.
```bash
pip install duckdb
```
You will also need to sign up for an account at [Motherduck](https://motherduck.com/)
After that, you should se... | langchain/docs/docs/integrations/providers/motherduck.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/motherduck.mdx",
"repo_id": "langchain",
"token_count": 429
} | 143 |
python_sources()
python_tests(
name="tests",
dependencies=["llama-index-core/tests/playground:playground"]
)
| llama_index/llama-index-core/tests/node_parser/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/node_parser/BUILD",
"repo_id": "llama_index",
"token_count": 44
} | 1,211 |
from langchain.indexes import __all__
EXPECTED_ALL = [
# Keep sorted
"aindex",
"GraphIndexCreator",
"index",
"IndexingResult",
"SQLRecordManager",
"VectorstoreIndexCreator",
]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/langchain/tests/unit_tests/indexes/test_imports.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/indexes/test_imports.py",
"repo_id": "langchain",
"token_count": 117
} | 661 |
# This example shows how the candle Python api can be used to replicate llama.cpp.
import sys
from typing import Dict, Tuple, Any
import candle
from candle.models.llama import QuantizedLlama
from candle import utils
MAX_SEQ_LEN = 4096
def gguf_rename(tensor_name: str):
if tensor_name == "token_embd.weight":
... | candle/candle-pyo3/quant-llama.py/0 | {
"file_path": "candle/candle-pyo3/quant-llama.py",
"repo_id": "candle",
"token_count": 1318
} | 69 |
# coding=utf-8
# Copyright 2023 Microsoft and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | transformers/src/transformers/models/phi/configuration_phi.py/0 | {
"file_path": "transformers/src/transformers/models/phi/configuration_phi.py",
"repo_id": "transformers",
"token_count": 3668
} | 716 |
from llama_index.packs.fusion_retriever.hybrid_fusion.base import (
HybridFusionRetrieverPack,
)
from llama_index.packs.fusion_retriever.query_rewrite.base import (
QueryRewritingRetrieverPack,
)
__all__ = ["HybridFusionRetrieverPack", "QueryRewritingRetrieverPack"]
| llama_index/llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/__init__.py",
"repo_id": "llama_index",
"token_count": 104
} | 1,583 |
// 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/util/importutilv2/binlog/reader_test.go/0 | {
"file_path": "milvus/internal/util/importutilv2/binlog/reader_test.go",
"repo_id": "milvus",
"token_count": 6203
} | 1,939 |
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | accelerate/tests/test_modeling_utils.py/0 | {
"file_path": "accelerate/tests/test_modeling_utils.py",
"repo_id": "accelerate",
"token_count": 12826
} | 16 |
[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 = ["ArizePhoenixQueryEnginePack"]
contains_example = true
import_path = "llama_index.packs.ar... | llama_index/llama-index-packs/llama-index-packs-arize-phoenix-query-engine/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-arize-phoenix-query-engine/pyproject.toml",
"repo_id": "llama_index",
"token_count": 721
} | 1,644 |
export const timeout = <T>(prom: Promise<T>, time: number): Promise<T> => {
let timer: NodeJS.Timeout;
return Promise.race([prom, new Promise<T>((_r, rej) => (timer = setTimeout(rej, time)))]).finally(
() => clearTimeout(timer)
);
};
| chat-ui/src/lib/utils/timeout.ts/0 | {
"file_path": "chat-ui/src/lib/utils/timeout.ts",
"repo_id": "chat-ui",
"token_count": 87
} | 106 |
.main {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 6rem;
min-height: 100vh;
}
.description {
display: inherit;
justify-content: inherit;
align-items: inherit;
font-size: 0.85rem;
max-width: var(--max-width);
width: 100%;
z-index: 2;
... | langchainjs/environment_tests/test-exports-vercel/src/styles/Home.module.css/0 | {
"file_path": "langchainjs/environment_tests/test-exports-vercel/src/styles/Home.module.css",
"repo_id": "langchainjs",
"token_count": 1973
} | 750 |
from typing import Any, Mapping, Optional
from llama_index.readers.airbyte_cdk.base import AirbyteCDKReader, RecordHandler
class AirbyteTypeformReader(AirbyteCDKReader):
"""AirbyteTypeformReader reader.
Retrieve documents from Typeform
Args:
config: The config object for the typeform source.
... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-typeform/llama_index/readers/airbyte_typeform/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-typeform/llama_index/readers/airbyte_typeform/base.py",
"repo_id": "llama_index",
"token_count": 281
} | 1,315 |
<jupyter_start><jupyter_text>GithubThe `Github` toolkit contains tools that enable an LLM agent to interact with a github repository. The tool is a wrapper for the [PyGitHub](https://github.com/PyGithub/PyGithub) library. Quickstart1. Install the pygithub library2. Create a Github app3. Set your environmental variable... | langchain/docs/docs/integrations/toolkits/github.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/github.ipynb",
"repo_id": "langchain",
"token_count": 4146
} | 168 |
"""Node postprocessor tests."""
from importlib.util import find_spec
from pathlib import Path
from typing import Dict, cast
import pytest
from llama_index.core.postprocessor.node import (
KeywordNodePostprocessor,
PrevNextNodePostprocessor,
)
from llama_index.core.postprocessor.node_recency import (
Embed... | llama_index/llama-index-core/tests/postprocessor/test_base.py/0 | {
"file_path": "llama_index/llama-index-core/tests/postprocessor/test_base.py",
"repo_id": "llama_index",
"token_count": 6180
} | 1,212 |
# MangaDex Loader
This loader fetches information from the MangaDex API, by manga title.
## Usage
```python
from llama_index import download_loader
MangaDexReader = download_loader("MangaDexReader")
loader = MangaDexReader()
documents = loader.load_data(
titles=["manga title 1", "manga title 2"], lang="en"
)
`... | llama_index/llama-index-integrations/readers/llama-index-readers-mangadex/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mangadex/README.md",
"repo_id": "llama_index",
"token_count": 1109
} | 1,343 |
<jupyter_start><jupyter_text>Semantic ChunkingSplits the text based on semantic similarity.Taken from Greg Kamradt's wonderful notebook:https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/5_Levels_Of_Text_Splitting.ipynbAll credit to him.At a high level, this splits into sentences, then groups into g... | langchain/docs/docs/modules/data_connection/document_transformers/semantic-chunker.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/data_connection/document_transformers/semantic-chunker.ipynb",
"repo_id": "langchain",
"token_count": 579
} | 200 |
# coding=utf-8
# Copyright 2024 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... | diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py",
"repo_id": "diffusers",
"token_count": 36056
} | 248 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/mq/msgstream/mqwrapper/nmq/nmq_id.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/nmq/nmq_id.go",
"repo_id": "milvus",
"token_count": 712
} | 1,922 |
import * as yaml from "js-yaml";
import { OpenAPIV3, OpenAPIV3_1 } from "openapi-types";
export class OpenAPISpec {
constructor(public document: OpenAPIV3_1.Document) {}
get baseUrl() {
return this.document.servers ? this.document.servers[0].url : undefined;
}
getPathsStrict() {
if (!this.document.pa... | langchainjs/langchain/src/util/openapi.ts/0 | {
"file_path": "langchainjs/langchain/src/util/openapi.ts",
"repo_id": "langchainjs",
"token_count": 2995
} | 978 |
-----BEGIN CERTIFICATE-----
MIIDizCCAnOgAwIBAgIUNCeQzjvQkinJwUgQ4quG0opHAL4wDQYJKoZIhvcNAQEL
BQAwYzELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAkdaMQswCQYDVQQHDAJHWjESMBAG
A1UECgwJcm9uZXRoaW5nMRIwEAYDVQQLDAlyb25ldGhpbmcxEjAQBgNVBAMMCWxv
Y2FsaG9zdDAeFw0yMjA1MDEwODU3MzRaFw0zMjA0MjgwODU3MzRaMEkxCzAJBgNV
BAYTAkNOMRIwEAYDVQQKDAlyb25ldGhp... | milvus/configs/cert/server.pem/0 | {
"file_path": "milvus/configs/cert/server.pem",
"repo_id": "milvus",
"token_count": 953
} | 1,845 |
<jupyter_start><jupyter_text>2Markdown>[2markdown](https://2markdown.com/) service transforms website content into structured markdown files.<jupyter_code># You will need to get your own API key. See https://2markdown.com/login
api_key = ""
from langchain_community.document_loaders import ToMarkdownLoader
loader = ToM... | langchain/docs/docs/integrations/document_loaders/tomarkdown.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/tomarkdown.ipynb",
"repo_id": "langchain",
"token_count": 399
} | 111 |
from typing import Tuple
import torch
def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]:
"""generate N-D grid in dimension order.
The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
That is, the statement
[X1,X2,X3] = ndgrid(x1,x2,x3)
produc... | pytorch-image-models/timm/layers/grid.py/0 | {
"file_path": "pytorch-image-models/timm/layers/grid.py",
"repo_id": "pytorch-image-models",
"token_count": 565
} | 354 |
flash_att_commit := 3a9bfd076f98746c73362328958dbc68d145fbec
flash-attention:
# Clone flash attention
pip install -U packaging ninja --no-cache-dir
git clone https://github.com/HazyResearch/flash-attention.git
build-flash-attention: flash-attention
cd flash-attention && git fetch && git checkout $(flash_att_c... | text-generation-inference/server/Makefile-flash-att/0 | {
"file_path": "text-generation-inference/server/Makefile-flash-att",
"repo_id": "text-generation-inference",
"token_count": 242
} | 418 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/llama_index/vector_stores/dashvector/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/llama_index/vector_stores/dashvector/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,478 |
import { test, expect } from "@jest/globals";
import { ChatOpenAI } from "@langchain/openai";
import { AgentAction, AgentFinish } from "@langchain/core/agents";
import { StructuredChatOutputParserWithRetries } from "../structured_chat/outputParser.js";
test("Can parse JSON with text in front of it", async () => {
co... | langchainjs/langchain/src/agents/tests/structured_chat_output_parser_with_retries.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/structured_chat_output_parser_with_retries.int.test.ts",
"repo_id": "langchainjs",
"token_count": 918
} | 918 |
---
hide_table_of_contents: true
---
import CodeBlock from "@theme/CodeBlock";
# Redis-Backed Chat Memory
For longer-term persistence across chat sessions, you can swap out the default in-memory `chatHistory` that backs chat memory classes like `BufferMemory` for a [Redis](https://redis.io/) instance.
## Setup
You... | langchainjs/docs/core_docs/docs/integrations/chat_memory/redis.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/chat_memory/redis.mdx",
"repo_id": "langchainjs",
"token_count": 560
} | 700 |
from langchain_community.llms.deepinfra import (
DeepInfra,
)
__all__ = [
"DeepInfra",
]
| langchain/libs/langchain/langchain/llms/deepinfra.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/deepinfra.py",
"repo_id": "langchain",
"token_count": 43
} | 510 |
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
export * as agents from "../agents.js";
export * as caches from "../caches.js";
export * as callbacks__base from "../callbacks/base.js";
export * as callbacks__manager from "../callbacks/manager.js";
export * as callbacks__promises from "../ca... | langchainjs/langchain-core/src/load/import_map.ts/0 | {
"file_path": "langchainjs/langchain-core/src/load/import_map.ts",
"repo_id": "langchainjs",
"token_count": 818
} | 860 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.