text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
from langchain_community.llms.loading import load_llm, load_llm_from_config
__all__ = ["load_llm_from_config", "load_llm"]
| langchain/libs/langchain/langchain/llms/loading.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/loading.py",
"repo_id": "langchain",
"token_count": 47
} | 539 |
# coding=utf-8
# Copyright 2021 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/utils/tests_fetcher.py/0 | {
"file_path": "diffusers/utils/tests_fetcher.py",
"repo_id": "diffusers",
"token_count": 19568
} | 300 |
import CodeBlock from "@theme/CodeBlock";
# Lunary
This page covers how to use [Lunary](https://lunary.ai?utm_source=langchain&utm_medium=js&utm_campaign=docs) with LangChain.
## What is Lunary?
Lunary is an [open-source](https://github.com/lunary-ai/lunary) platform that provides observability (tracing, analytics,... | langchainjs/docs/core_docs/docs/ecosystem/integrations/lunary.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/ecosystem/integrations/lunary.mdx",
"repo_id": "langchainjs",
"token_count": 858
} | 702 |
import {
CacheClient,
Configurations,
CredentialProvider,
} from "@gomomento/sdk"; // `from "gomomento/sdk-web";` for browser/edge
import { BufferMemory } from "langchain/memory";
import { ChatOpenAI } from "@langchain/openai";
import { ConversationChain } from "langchain/chains";
import { MomentoChatMessageHisto... | langchainjs/examples/src/memory/momento.ts/0 | {
"file_path": "langchainjs/examples/src/memory/momento.ts",
"repo_id": "langchainjs",
"token_count": 574
} | 829 |
# 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 applicabl... | accelerate/src/accelerate/optimizer.py/0 | {
"file_path": "accelerate/src/accelerate/optimizer.py",
"repo_id": "accelerate",
"token_count": 3103
} | 16 |
<jupyter_start><jupyter_text>**⚠️ This notebook is deprecated in favor of the [Quickstart notebook](https://github.com/huggingface/notebooks/blob/main/datasets_doc/quickstart.ipynb)** HuggingFace 🤗 Datasets library - Quick overviewModels come and go (linear models, LSTM, Transformers, ...) but two core elements have ... | datasets/notebooks/Overview.ipynb/0 | {
"file_path": "datasets/notebooks/Overview.ipynb",
"repo_id": "datasets",
"token_count": 10406
} | 127 |
"""Chroma vector store."""
import logging
import math
from typing import Any, Dict, Generator, List, Optional, cast
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.schema import BaseNode, MetadataMode, TextNode
from llama_index.legacy.utils import truncate_text
from llama_ind... | llama_index/llama-index-legacy/llama_index/legacy/vector_stores/chroma.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/vector_stores/chroma.py",
"repo_id": "llama_index",
"token_count": 5176
} | 1,723 |
# 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/utils/check_config_docstrings.py/0 | {
"file_path": "diffusers/utils/check_config_docstrings.py",
"repo_id": "diffusers",
"token_count": 1113
} | 294 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.dashvector import DashVectorReader
def test_class():
names_of_base_classes = [b.__name__ for b in DashVectorReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-dashvector/tests/test_readers_dashvector.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-dashvector/tests/test_readers_dashvector.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,349 |
from typing import TYPE_CHECKING, List, Optional, Sequence, cast
from llama_index.core.prompts.guidance_utils import convert_to_handlebars
from llama_index.core.prompts.mixin import PromptDictType
from llama_index.core.question_gen.prompts import (
DEFAULT_SUB_QUESTION_PROMPT_TMPL,
build_tools_text,
)
from lla... | llama_index/llama-index-integrations/question_gen/llama-index-question-gen-guidance/llama_index/question_gen/guidance/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/question_gen/llama-index-question-gen-guidance/llama_index/question_gen/guidance/base.py",
"repo_id": "llama_index",
"token_count": 970
} | 1,255 |
# Readme
### Rust version
Use rust 1.74.0 or greater.
| chroma/rust/worker/README/0 | {
"file_path": "chroma/rust/worker/README",
"repo_id": "chroma",
"token_count": 22
} | 55 |
# Wolfram Alpha Tool
This tool connects to a Wolfram alpha account and allows an Agent to perform searches
You will need to provide an API key: https://products.wolframalpha.com/api
## Usage
This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tr... | llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/README.md",
"repo_id": "llama_index",
"token_count": 315
} | 1,507 |
.PHONY: all format lint test tests test_watch integration_tests docker_tests help extended_tests
# Default target executed when no arguments are given to make.
all: help
# Define a variable for the test file path.
TEST_FILE ?= tests/unit_tests/
integration_tests: TEST_FILE = tests/integration_tests/
# Run unit tests... | langchain/libs/community/Makefile/0 | {
"file_path": "langchain/libs/community/Makefile",
"repo_id": "langchain",
"token_count": 934
} | 222 |
import unittest
import pytest
from langchain_community.document_loaders.parsers.language.rust import RustSegmenter
@pytest.mark.requires("tree_sitter", "tree_sitter_languages")
class TestRustSegmenter(unittest.TestCase):
def setUp(self) -> None:
self.example_code = """fn foo() -> i32 {
return 1;
}
... | langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_rust.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_rust.py",
"repo_id": "langchain",
"token_count": 609
} | 389 |
<jupyter_start><jupyter_text>Huggingface Sagemaker-sdk - Getting Started Demo Binary Classification with `Keras` and `imdb` dataset 1. [Introduction](Introduction) 2. [Development Environment and Permissions](Development-Environment-and-Permissions) 1. [Installation](Installation) 2. [Development environment](... | notebooks/sagemaker/02_getting_started_tensorflow/sagemaker-notebook.ipynb/0 | {
"file_path": "notebooks/sagemaker/02_getting_started_tensorflow/sagemaker-notebook.ipynb",
"repo_id": "notebooks",
"token_count": 3730
} | 325 |
import pytest
import time
from pymilvus import connections
from utils.util_log import test_log as log
from base.collection_wrapper import ApiCollectionWrapper
from base.utility_wrapper import ApiUtilityWrapper
from common import common_func as cf
from common import common_type as ct
from milvus_operator import MilvusO... | milvus/tests/python_client/customize/test_customize_segment_size.py/0 | {
"file_path": "milvus/tests/python_client/customize/test_customize_segment_size.py",
"repo_id": "milvus",
"token_count": 2678
} | 2,120 |
import { test, expect } from "@jest/globals";
import { ChatOpenAI } from "@langchain/openai";
import { AgentAction, AgentFinish } from "@langchain/core/agents";
import { ChatConversationalAgentOutputParserWithRetries } from "../chat_convo/outputParser.js";
test.skip("Can parse JSON with text in front of it", async () ... | langchainjs/langchain/src/agents/tests/chat_convo_output_parser_with_retries.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/chat_convo_output_parser_with_retries.int.test.ts",
"repo_id": "langchainjs",
"token_count": 873
} | 880 |
package model
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus/internal/proto/indexpb"
)
var (
indexID int64 = 1
indexName = "idx"
indexParams = []*commonpb.KeyValuePair{
{
Key: "field110-i1",
... | milvus/internal/metastore/model/index_test.go/0 | {
"file_path": "milvus/internal/metastore/model/index_test.go",
"repo_id": "milvus",
"token_count": 523
} | 1,800 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/informer/configuration_informer.py/0 | {
"file_path": "transformers/src/transformers/models/informer/configuration_informer.py",
"repo_id": "transformers",
"token_count": 4821
} | 652 |
""" Dataset reader for HF IterableDataset
"""
import math
import os
from itertools import repeat, chain
from typing import Optional
import torch
import torch.distributed as dist
from PIL import Image
try:
import datasets
from datasets.distributed import split_dataset_by_node
from datasets.splits import Sp... | pytorch-image-models/timm/data/readers/reader_hfids.py/0 | {
"file_path": "pytorch-image-models/timm/data/readers/reader_hfids.py",
"repo_id": "pytorch-image-models",
"token_count": 3722
} | 328 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-multion/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-multion/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,489 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-onedrive/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-microsoft-onedrive/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,398 |
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | milvus/build/docker/heaptrack/Dockerfile/0 | {
"file_path": "milvus/build/docker/heaptrack/Dockerfile",
"repo_id": "milvus",
"token_count": 681
} | 1,715 |
"""LangSmith evaluation utilities.
This module provides utilities for evaluating Chains and other language model
applications using LangChain evaluators and LangSmith.
For more information on the LangSmith API, see the `LangSmith API documentation <https://docs.smith.langchain.com/docs/>`_.
**Example**
.. code-bloc... | langchain/libs/langchain/langchain/smith/evaluation/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/smith/evaluation/__init__.py",
"repo_id": "langchain",
"token_count": 815
} | 579 |
<!--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/video_classification.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/video_classification.md",
"repo_id": "transformers",
"token_count": 10074
} | 501 |
import time
import warnings
from abc import ABC
from copy import deepcopy
from typing import Optional
import torch
from ..utils import add_start_docstrings, logging
logger = logging.get_logger(__name__)
STOPPING_CRITERIA_INPUTS_DOCSTRING = r"""
Args:
input_ids (`torch.LongTensor` of shape `(batch_size... | transformers/src/transformers/generation/stopping_criteria.py/0 | {
"file_path": "transformers/src/transformers/generation/stopping_criteria.py",
"repo_id": "transformers",
"token_count": 2484
} | 608 |
import logging
from milvus_benchmark.env.base import BaseEnv
logger = logging.getLogger("milvus_benchmark.env.docker")
class DockerEnv(BaseEnv):
"""docker env class wrapper"""
env_mode = "docker"
def __init__(self, deploy_mode=None):
super(DockerEnv, self).__init__(deploy_mode)
| milvus/tests/benchmark/milvus_benchmark/env/docker.py/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/env/docker.py",
"repo_id": "milvus",
"token_count": 116
} | 1,924 |
// 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/grpcclient/client.go/0 | {
"file_path": "milvus/internal/util/grpcclient/client.go",
"repo_id": "milvus",
"token_count": 7222
} | 2,016 |
import datetime
import pytest
from pymilvus import connections, MilvusException
from base.collection_wrapper import ApiCollectionWrapper
from common.common_type import CaseLabel
from customize.milvus_operator import MilvusOperator
from scale import constants
from common import common_func as cf
from common import com... | milvus/tests/python_client/scale/test_index_node_scale.py/0 | {
"file_path": "milvus/tests/python_client/scale/test_index_node_scale.py",
"repo_id": "milvus",
"token_count": 4089
} | 2,126 |
python_sources()
| llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/llama_index/llms/rungpt/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/llama_index/llms/rungpt/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,372 |
import {
MutableRefObject,
createContext,
useContext,
useEffect,
useRef,
} from "react";
import { StreamCallback } from "./types";
export const AppCallbackContext = createContext<MutableRefObject<{
onStart: Exclude<StreamCallback["onStart"], undefined>[];
onSuccess: Exclude<StreamCallback["onSuccess"], ... | langserve/langserve/playground/src/useStreamCallback.tsx/0 | {
"file_path": "langserve/langserve/playground/src/useStreamCallback.tsx",
"repo_id": "langserve",
"token_count": 728
} | 1,003 |
# Preparing the Model
Text Generation Inference improves the model in several aspects.
## Quantization
TGI supports [bits-and-bytes](https://github.com/TimDettmers/bitsandbytes#bitsandbytes), [GPT-Q](https://arxiv.org/abs/2210.17323) and [AWQ](https://arxiv.org/abs/2306.00978) quantization. To speed up inference wi... | text-generation-inference/docs/source/basic_tutorials/preparing_model.md/0 | {
"file_path": "text-generation-inference/docs/source/basic_tutorials/preparing_model.md",
"repo_id": "text-generation-inference",
"token_count": 551
} | 389 |
import { Issuer, BaseClient, type UserinfoResponse, TokenSet, custom } from "openid-client";
import { addHours, addWeeks } from "date-fns";
import {
COOKIE_NAME,
OPENID_CLIENT_ID,
OPENID_CLIENT_SECRET,
OPENID_PROVIDER_URL,
OPENID_SCOPES,
OPENID_TOLERANCE,
OPENID_RESOURCE,
OPENID_CONFIG,
} from "$env/static/priv... | chat-ui/src/lib/server/auth.ts/0 | {
"file_path": "chat-ui/src/lib/server/auth.ts",
"repo_id": "chat-ui",
"token_count": 1500
} | 97 |
<jupyter_start><jupyter_text>ClickHouse> [ClickHouse](https://clickhouse.com/) is the fastest and most resource efficient open-source database for real-time apps and analytics with full SQL support and a wide range of functions to assist users in writing analytical queries. Lately added data structures and distance sea... | langchain/docs/docs/integrations/vectorstores/clickhouse.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/clickhouse.ipynb",
"repo_id": "langchain",
"token_count": 1918
} | 193 |
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { ConversationalRetrievalQAChain } from "langchain/chains";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import { BufferMemory } from "langchain/memo... | langchainjs/examples/src/chains/conversational_qa_legacy.ts/0 | {
"file_path": "langchainjs/examples/src/chains/conversational_qa_legacy.ts",
"repo_id": "langchainjs",
"token_count": 453
} | 789 |
<jupyter_start><jupyter_code>from transformers import AutoModelForCausalLM
from peft import get_peft_config, get_peft_model, PromptTuningInit, PromptTuningConfig, TaskType, PeftType
import torch
from datasets import load_dataset
import os
from transformers import AutoTokenizer
from torch.utils.data import DataLoader
fr... | peft/examples/causal_language_modeling/peft_prompt_tuning_clm.ipynb/0 | {
"file_path": "peft/examples/causal_language_modeling/peft_prompt_tuning_clm.ipynb",
"repo_id": "peft",
"token_count": 4787
} | 339 |
# coding=utf-8
# Copyright 2021 The Google Flax Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | transformers/src/transformers/models/vit/modeling_flax_vit.py/0 | {
"file_path": "transformers/src/transformers/models/vit/modeling_flax_vit.py",
"repo_id": "transformers",
"token_count": 10847
} | 693 |
import {
RemoteRetriever,
RemoteRetrieverParams,
RemoteRetrieverValues,
} from "@langchain/community/retrievers/remote";
import { Document } from "@langchain/core/documents";
/** @deprecated */
export interface RemoteLangChainRetrieverParams extends RemoteRetrieverParams {
/**
* The key in the JSON body to ... | langchainjs/langchain/src/retrievers/remote/remote-retriever.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/remote/remote-retriever.ts",
"repo_id": "langchainjs",
"token_count": 860
} | 943 |
{
"name": "tokenizers-linux-arm64-musl",
"version": "0.13.4-rc1",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "tokenizers.linux-arm64-musl.node",
"files": [
"tokenizers.linux-arm64-musl.node"
],
"description": "Tokenizers platform specific bindings",
"keywords": [
"napi-rs",
... | tokenizers/bindings/node/npm/linux-arm64-musl/package.json/0 | {
"file_path": "tokenizers/bindings/node/npm/linux-arm64-musl/package.json",
"repo_id": "tokenizers",
"token_count": 291
} | 440 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package datacoord
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockChannelManager is an autogenerated mock type for the ChannelManager type
type MockChannelManager struct {
mock.Mock
}
type MockChannelManager_Expecter struct {
mock *... | milvus/internal/datacoord/mock_channelmanager.go/0 | {
"file_path": "milvus/internal/datacoord/mock_channelmanager.go",
"repo_id": "milvus",
"token_count": 6808
} | 1,694 |
"""Tests for the VSDX parsers."""
from pathlib import Path
from typing import Iterator
import pytest
from langchain_community.document_loaders.base import BaseBlobParser
from langchain_community.document_loaders.blob_loaders import Blob
from langchain_community.document_loaders.parsers import VsdxParser
_THIS_DIR = ... | langchain/libs/community/tests/unit_tests/document_loaders/parsers/test_vsdx_parser.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/parsers/test_vsdx_parser.py",
"repo_id": "langchain",
"token_count": 551
} | 390 |
Hugging Face Optimized Inference License 1.0 (HFOILv1.0)
This License Agreement governs the use of the Software and its Modifications. It is a
binding agreement between the Licensor and You.
This License Agreement shall be referred to as Hugging Face Optimized Inference License
1.0 or HFOILv1.0. We may publish revis... | text-generation-inference/LICENSE/0 | {
"file_path": "text-generation-inference/LICENSE",
"repo_id": "text-generation-inference",
"token_count": 2207
} | 367 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,406 |
from typing import Any, Dict, List, Optional
from llama_index_client import TextNodeWithScore
from llama_index_client.resources.pipeline.client import OMIT
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.constants import DEFAULT_PROJECT_NAME
from llama_index.core.ingestion.api_uti... | llama_index/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py",
"repo_id": "llama_index",
"token_count": 2026
} | 1,210 |
"""Set of constants."""
DEFAULT_TEMPERATURE = 0.1
DEFAULT_CONTEXT_WINDOW = 3900 # tokens
DEFAULT_NUM_OUTPUTS = 256 # tokens
DEFAULT_NUM_INPUT_FILES = 10 # files
DEFAULT_EMBED_BATCH_SIZE = 10
DEFAULT_CHUNK_SIZE = 1024 # tokens
DEFAULT_CHUNK_OVERLAP = 20 # tokens
DEFAULT_SIMILARITY_TOP_K = 2
DEFAULT_IMAGE_SIMILAR... | llama_index/llama-index-legacy/llama_index/legacy/constants.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/constants.py",
"repo_id": "llama_index",
"token_count": 300
} | 1,551 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/developer_guides/quantization.md/0 | {
"file_path": "peft/docs/source/developer_guides/quantization.md",
"repo_id": "peft",
"token_count": 1932
} | 294 |
# fly.toml app configuration file generated for weblangchain on 2023-10-03T20:09:50-07:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "weblangchain"
primary_region = "lax"
[build]
dockerfile = "Dockerfile"
[env]
PORT = "8080"
[http_service]
internal... | weblangchain/fly.toml/0 | {
"file_path": "weblangchain/fly.toml",
"repo_id": "weblangchain",
"token_count": 171
} | 2,027 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/blip_2/configuration_blip_2.py/0 | {
"file_path": "transformers/src/transformers/models/blip_2/configuration_blip_2.py",
"repo_id": "transformers",
"token_count": 6313
} | 628 |
# LlamaIndex Llms Integration: Anthropic
| llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/README.md",
"repo_id": "llama_index",
"token_count": 11
} | 1,215 |
export { ListOutputParser, CommaSeparatedListOutputParser } from "./list.js";
export { RegexParser } from "./regex.js";
export {
StructuredOutputParser,
AsymmetricStructuredOutputParser,
JsonMarkdownStructuredOutputParser,
type JsonMarkdownFormatInstructionsOptions,
type JsonMarkdownStructuredOutputParserInpu... | langchainjs/langchain/src/output_parsers/index.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/index.ts",
"repo_id": "langchainjs",
"token_count": 342
} | 1,003 |
from langchain_community.llms.symblai_nebula import (
Nebula,
)
__all__ = [
"Nebula",
]
| langchain/libs/langchain/langchain/llms/symblai_nebula.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/symblai_nebula.py",
"repo_id": "langchain",
"token_count": 46
} | 525 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.hatena_blog import HatenaBlogReader
def test_class():
names_of_base_classes = [b.__name__ for b in HatenaBlogReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/tests/test_readers_hatena_blog.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/tests/test_readers_hatena_blog.py",
"repo_id": "llama_index",
"token_count": 92
} | 1,311 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.replicate import Replicate
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in Replicate.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-replicate/tests/test_llms_replicate.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-replicate/tests/test_llms_replicate.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,279 |
from langchain import chains
from tests.unit_tests import assert_all_importable
EXPECTED_ALL = [
"APIChain",
"AnalyzeDocumentChain",
"ArangoGraphQAChain",
"ChatVectorDBChain",
"ConstitutionalChain",
"ConversationChain",
"ConversationalRetrievalChain",
"FalkorDBQAChain",
"FlareChain"... | langchain/libs/langchain/tests/unit_tests/chains/test_imports.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/chains/test_imports.py",
"repo_id": "langchain",
"token_count": 798
} | 651 |
// 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/distributed/rootcoord/service_test.go/0 | {
"file_path": "milvus/internal/distributed/rootcoord/service_test.go",
"repo_id": "milvus",
"token_count": 3821
} | 1,791 |
"""Util that calls gitlab."""
from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any, Dict, List, Optional
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
if TYPE_CHECKING:
from gitlab.v4.objects import Is... | langchain/libs/community/langchain_community/utilities/gitlab.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/gitlab.py",
"repo_id": "langchain",
"token_count": 5723
} | 315 |
// 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/meta_service.go/0 | {
"file_path": "milvus/internal/datanode/meta_service.go",
"repo_id": "milvus",
"token_count": 920
} | 1,698 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/es/tasks/image_classification.md/0 | {
"file_path": "transformers/docs/source/es/tasks/image_classification.md",
"repo_id": "transformers",
"token_count": 2441
} | 529 |
package cgoconverter
/*
#include <stdlib.h>
#include <string.h>
*/
import "C"
import "unsafe"
func copyToCBytes(data []byte) unsafe.Pointer {
return C.CBytes(data)
}
func mallocCBytes(v byte, len int) unsafe.Pointer {
p := C.malloc(C.size_t(len))
C.memset(p, C.int(v), C.size_t(len))
return p
}
| milvus/internal/util/cgoconverter/test_utils.go/0 | {
"file_path": "milvus/internal/util/cgoconverter/test_utils.go",
"repo_id": "milvus",
"token_count": 135
} | 1,798 |
import { concat } from "../utils/stream.js";
import {
Runnable,
RunnableAssign,
RunnableMap,
RunnableMapLike,
} from "./base.js";
import type { RunnableConfig } from "./config.js";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type RunnablePassthroughFunc<RunInput = any> =
| ((input: RunInpu... | langchainjs/langchain-core/src/runnables/passthrough.ts/0 | {
"file_path": "langchainjs/langchain-core/src/runnables/passthrough.ts",
"repo_id": "langchainjs",
"token_count": 1569
} | 931 |
"""Test Atlas functionality."""
import time
from langchain_community.vectorstores import AtlasDB
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
ATLAS_TEST_API_KEY = "7xDPkYXSYDc1_ErdTPIcoAR9RNd8YDlkS3nVNXcVoIMZ6"
def test_atlas() -> None:
"""Test end to end construction and sear... | langchain/libs/community/tests/integration_tests/vectorstores/test_atlas.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_atlas.py",
"repo_id": "langchain",
"token_count": 554
} | 353 |
[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 = ["MultiDocumentAgentsPack"]
contains_example = false
import_path = "llama_index.packs.multi... | llama_index/llama-index-packs/llama-index-packs-multi-document-agents/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-multi-document-agents/pyproject.toml",
"repo_id": "llama_index",
"token_count": 688
} | 1,575 |
# AWS
The `LangChain` integrations related to [Amazon AWS](https://aws.amazon.com/) platform.
## LLMs
### Bedrock
>[Amazon Bedrock](https://aws.amazon.com/bedrock/) is a fully managed service that offers a choice of
> high-performing foundation models (FMs) from leading AI companies like `AI21 Labs`, `Anthropic`, ... | langchain/docs/docs/integrations/platforms/aws.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/platforms/aws.mdx",
"repo_id": "langchain",
"token_count": 2608
} | 138 |
---
sidebar_class_name: node-only
---
# Confluence
:::tip Compatibility
Only available on Node.js.
:::
This covers how to load document objects from pages in a Confluence space.
## Credentials
- You'll need to set up an access token and provide it along with your confluence username in order to authenticate the re... | langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/confluence.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/confluence.mdx",
"repo_id": "langchainjs",
"token_count": 243
} | 704 |
[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 = ["PostgresIndexStore"]
contains_example = false
import_path = "llama_index.storage.index_st... | llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-postgres/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-postgres/pyproject.toml",
"repo_id": "llama_index",
"token_count": 641
} | 1,420 |
# Voyage AI
The `VoyageEmbeddings` class uses the Voyage AI REST API to generate embeddings for a given text.
```typescript
import { VoyageEmbeddings } from "langchain/embeddings/voyage";
const embeddings = new VoyageEmbeddings({
apiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.VOYAGEAI_API_KEY
});
``... | langchainjs/docs/core_docs/docs/integrations/text_embedding/voyageai.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/text_embedding/voyageai.mdx",
"repo_id": "langchainjs",
"token_count": 113
} | 744 |
from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments, AutoTokenizer
from sklearn.metrics import accuracy_score, precision_recall_fscore_support
from datasets import load_from_disk
import random
import logging
import sys
import argparse
import os
import torch
if __name__ == "__main__"... | notebooks/sagemaker/01_getting_started_pytorch/scripts/train.py/0 | {
"file_path": "notebooks/sagemaker/01_getting_started_pytorch/scripts/train.py",
"repo_id": "notebooks",
"token_count": 1418
} | 328 |
import { QdrantClient } from "@qdrant/js-client-rest";
import type { Schemas as QdrantSchemas } from "@qdrant/js-client-rest";
import { v4 as uuid } from "uuid";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { VectorStore } from "@langchain/core/vectorstores";
import { Document } from "@... | langchainjs/libs/langchain-community/src/vectorstores/qdrant.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/qdrant.ts",
"repo_id": "langchainjs",
"token_count": 3194
} | 1,004 |
"""Macrometa GDN Reader."""
import json
from typing import List
import requests
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class MacrometaGDNReader(BaseReader):
"""Macrometa GDN Reader.
Reads vectors from Macrometa GDN
"""
def __init__(self,... | llama_index/llama-index-integrations/readers/llama-index-readers-macrometa-gdn/llama_index/readers/macrometa_gdn/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-macrometa-gdn/llama_index/readers/macrometa_gdn/base.py",
"repo_id": "llama_index",
"token_count": 1251
} | 1,330 |
DEFAULT_CROP_PCT = 0.875
DEFAULT_CROP_MODE = 'center'
IMAGENET_DEFAULT_MEAN = (0.485, 0.456, 0.406)
IMAGENET_DEFAULT_STD = (0.229, 0.224, 0.225)
IMAGENET_INCEPTION_MEAN = (0.5, 0.5, 0.5)
IMAGENET_INCEPTION_STD = (0.5, 0.5, 0.5)
IMAGENET_DPN_MEAN = (124 / 255, 117 / 255, 104 / 255)
IMAGENET_DPN_STD = tuple([1 / (.0167 *... | pytorch-image-models/timm/data/constants.py/0 | {
"file_path": "pytorch-image-models/timm/data/constants.py",
"repo_id": "pytorch-image-models",
"token_count": 236
} | 338 |
loop_stability:
collections:
-
server:
suffix_path: true
db_config.primary_path: /test/milvus/db_data_11/loop_stability
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 10
gpu_resource_config.enable: true
gpu_resource_config.cache_... | milvus/tests/benchmark/milvus_benchmark/suites/loop_stability.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/loop_stability.yaml",
"repo_id": "milvus",
"token_count": 256
} | 2,010 |
import math
from typing import Any
import candle
from candle import Tensor
from .module import Module
# See https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/linear.py
class Identity(Module):
r"""A placeholder identity operator that is argument-insensitive.
Args:
args: any argument (unu... | candle/candle-pyo3/py_src/candle/nn/linear.py/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/nn/linear.py",
"repo_id": "candle",
"token_count": 1947
} | 61 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/text_to_video_synthesis/test_video_to_video.py/0 | {
"file_path": "diffusers/tests/pipelines/text_to_video_synthesis/test_video_to_video.py",
"repo_id": "diffusers",
"token_count": 3465
} | 278 |
# 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/utils/test_activations.py/0 | {
"file_path": "transformers/tests/utils/test_activations.py",
"repo_id": "transformers",
"token_count": 1061
} | 794 |
apiVersion: apps/v1
kind: Deployment
metadata:
name: server
namespace: chroma
spec:
replicas: 2
selector:
matchLabels:
app: server
template:
metadata:
labels:
app: server
spec:
containers:
- name: server
image: server
imagePullPolicy: IfNotPres... | chroma/k8s/dev/server.yaml/0 | {
"file_path": "chroma/k8s/dev/server.yaml",
"repo_id": "chroma",
"token_count": 832
} | 56 |
<jupyter_start><jupyter_text>Unit 6: Advantage Actor Critic (A2C) using Robotics Simulations with Panda-Gym 🤖In this notebook, you'll learn to use A2C with [Panda-Gym](https://github.com/qgallouedec/panda-gym). You're going **to train a robotic arm** (Franka Emika Panda robot) to perform a task:- `Reach`: the robot mu... | deep-rl-class/notebooks/unit6/unit6.ipynb/0 | {
"file_path": "deep-rl-class/notebooks/unit6/unit6.ipynb",
"repo_id": "deep-rl-class",
"token_count": 4384
} | 173 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/common/Tracer.cpp/0 | {
"file_path": "milvus/internal/core/src/common/Tracer.cpp",
"repo_id": "milvus",
"token_count": 2091
} | 1,655 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | transformers/src/transformers/tools/text_to_speech.py/0 | {
"file_path": "transformers/src/transformers/tools/text_to_speech.py",
"repo_id": "transformers",
"token_count": 859
} | 768 |
# coding=utf-8
# Copyright 2020 The Google AI Language Team Authors, The HuggingFace Inc. team and Microsoft Corporation.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py/0 | {
"file_path": "transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py",
"repo_id": "transformers",
"token_count": 12995
} | 579 |
"""ReAct agent worker."""
import asyncio
import uuid
from itertools import chain
from threading import Thread
from typing import (
Any,
AsyncGenerator,
Dict,
Generator,
List,
Optional,
Sequence,
Tuple,
cast,
)
from llama_index.legacy.agent.react.formatter import ReActChatFormatter
... | llama_index/llama-index-legacy/llama_index/legacy/agent/react/step.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/react/step.py",
"repo_id": "llama_index",
"token_count": 10575
} | 1,689 |
import os
from typing import Any, Dict, List, Optional
from uuid import UUID
from langchain_core.callbacks import BaseCallbackHandler
from langchain_core.messages import (
AIMessage,
BaseMessage,
ChatMessage,
FunctionMessage,
HumanMessage,
SystemMessage,
)
from langchain_core.outputs import LLM... | langchain/libs/community/langchain_community/callbacks/trubrics_callback.py/0 | {
"file_path": "langchain/libs/community/langchain_community/callbacks/trubrics_callback.py",
"repo_id": "langchain",
"token_count": 2020
} | 229 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,247 |
import logging
import os
from argparse import ArgumentParser
from pathlib import Path
from shutil import copyfile, rmtree
from typing import Generator
import datasets.config
from datasets.builder import DatasetBuilder
from datasets.commands import BaseDatasetsCLICommand
from datasets.download.download_manager import D... | datasets/src/datasets/commands/test.py/0 | {
"file_path": "datasets/src/datasets/commands/test.py",
"repo_id": "datasets",
"token_count": 4202
} | 128 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {
"timesteps": [
"fast27_timesteps",
... | diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py",
"repo_id": "diffusers",
"token_count": 1266
} | 238 |
# flake8: noqa
"""Test SQL database wrapper with schema support.
Using DuckDB as SQLite does not support schemas.
"""
import pytest
from sqlalchemy import (
Column,
Integer,
MetaData,
Sequence,
String,
Table,
create_engine,
event,
insert,
schema,
)
from langchain_community.uti... | langchain/libs/community/tests/unit_tests/test_sql_database_schema.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/test_sql_database_schema.py",
"repo_id": "langchain",
"token_count": 969
} | 380 |
# rag-multi-modal-local
Visual search is a famililar application to many with iPhones or Android devices. It allows user to serch photos using natural language.
With the release of open source, multi-modal LLMs it's possible to build this kind of application for yourself for your own private photo collection.
Th... | langchain/templates/rag-multi-modal-local/README.md/0 | {
"file_path": "langchain/templates/rag-multi-modal-local/README.md",
"repo_id": "langchain",
"token_count": 1346
} | 738 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/mq/mqimpl/rocksmq/server/rocksmq_impl_test.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/server/rocksmq_impl_test.go",
"repo_id": "milvus",
"token_count": 15469
} | 1,950 |
from langchain_core.tools import (
BaseTool,
SchemaAnnotationError,
StructuredTool,
Tool,
ToolException,
create_schema_from_function,
tool,
)
__all__ = [
"SchemaAnnotationError",
"create_schema_from_function",
"ToolException",
"BaseTool",
"Tool",
"StructuredTool",
... | langchain/libs/langchain/langchain/tools/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/base.py",
"repo_id": "langchain",
"token_count": 142
} | 555 |
<jupyter_start><jupyter_text>Multi-Step Query EngineWe have a multi-step query engine that's able to decompose a complex query into sequential subquestions. Thisguide walks you through how to set it up! If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install ... | llama_index/docs/examples/query_transformations/SimpleIndexDemo-multistep.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_transformations/SimpleIndexDemo-multistep.ipynb",
"repo_id": "llama_index",
"token_count": 969
} | 1,140 |
# Preprocess
In addition to loading datasets, 🤗 Datasets other main goal is to offer a diverse set of preprocessing functions to get a dataset into an appropriate format for training with your machine learning framework.
There are many possible ways to preprocess a dataset, and it all depends on your specific datas... | datasets/docs/source/use_dataset.mdx/0 | {
"file_path": "datasets/docs/source/use_dataset.mdx",
"repo_id": "datasets",
"token_count": 3252
} | 135 |
# 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/src/transformers/models/dialogpt/convert_dialogpt_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/dialogpt/convert_dialogpt_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 560
} | 651 |
from typing import List, Optional
import pytest
from langchain_community.docstore.document import Document
from langchain_community.vectorstores import Yellowbrick
from tests.integration_tests.vectorstores.fake_embeddings import (
FakeEmbeddings,
fake_texts,
)
YELLOWBRICK_URL = "postgres://username:password@... | langchain/libs/community/tests/integration_tests/vectorstores/test_yellowbrick.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_yellowbrick.py",
"repo_id": "langchain",
"token_count": 852
} | 396 |
---
sidebar_position: 3
---
# Contribute Documentation
The docs directory contains Documentation and API Reference.
Documentation is built using [Quarto](https://quarto.org) and [Docusaurus 2](https://docusaurus.io/).
API Reference are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the... | langchain/docs/docs/contributing/documentation.mdx/0 | {
"file_path": "langchain/docs/docs/contributing/documentation.mdx",
"repo_id": "langchain",
"token_count": 576
} | 85 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | transformers/examples/flax/question-answering/utils_qa.py/0 | {
"file_path": "transformers/examples/flax/question-answering/utils_qa.py",
"repo_id": "transformers",
"token_count": 9468
} | 519 |
{
"modelname": "TemplateFLAX",
"uppercase_modelname": "TEMPLATE_FLAX",
"lowercase_modelname": "template_flax",
"camelcase_modelname": "TemplateFlax",
"authors": "The HuggingFace Team",
"checkpoint_identifier": "brand-new-bert-base-cased",
"tokenizer_type": "Based on BERT",
"generate_tensorflow_pytorch_a... | transformers/templates/adding_a_new_model/tests/flax-encoder-bert-tokenizer.json/0 | {
"file_path": "transformers/templates/adding_a_new_model/tests/flax-encoder-bert-tokenizer.json",
"repo_id": "transformers",
"token_count": 150
} | 741 |
<jupyter_start><jupyter_text>Building hotel room search with self-querying retrievalIn this example we'll walk through how to build and iterate on a hotel room search service that leverages an LLM to generate structured filter queries that can then be passed to a vector store.For an introduction to self-querying retrie... | langchain/cookbook/self_query_hotel_search.ipynb/0 | {
"file_path": "langchain/cookbook/self_query_hotel_search.ipynb",
"repo_id": "langchain",
"token_count": 3639
} | 76 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "chat_models/fake",
newEntrypointName: "utils/testing",
newPackageName: "@langchain/core",
});
export {
type FakeChatInput,
FakeListChatModel,
} from "@langcha... | langchainjs/langchain/src/chat_models/fake.ts/0 | {
"file_path": "langchainjs/langchain/src/chat_models/fake.ts",
"repo_id": "langchainjs",
"token_count": 110
} | 914 |
# Copyright 2020 The HuggingFace 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
#
# Unless required by applicable law or agreed to... | datasets/src/datasets/formatting/np_formatter.py/0 | {
"file_path": "datasets/src/datasets/formatting/np_formatter.py",
"repo_id": "datasets",
"token_count": 1871
} | 130 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.milvus import MilvusReader
def test_class():
names_of_base_classes = [b.__name__ for b in MilvusReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-milvus/tests/test_readers_milvus.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-milvus/tests/test_readers_milvus.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,485 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/electra/test_modeling_electra.py/0 | {
"file_path": "transformers/tests/models/electra/test_modeling_electra.py",
"repo_id": "transformers",
"token_count": 8357
} | 814 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.