text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<!--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/torchscript.md/0 | {
"file_path": "transformers/docs/source/ja/torchscript.md",
"repo_id": "transformers",
"token_count": 4342
} | 491 |
""" Hybrid Vision Transformer (ViT) in PyTorch
A PyTorch implement of the Hybrid Vision Transformers as described in:
'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale'
- https://arxiv.org/abs/2010.11929
`How to train your ViT? Data, Augmentation, and Regularization in Vision Transfor... | pytorch-image-models/timm/models/vision_transformer_hybrid.py/0 | {
"file_path": "pytorch-image-models/timm/models/vision_transformer_hybrid.py",
"repo_id": "pytorch-image-models",
"token_count": 8049
} | 404 |
---
sidebar_position: 0
---
# Document loaders
:::info
Head to [Integrations](/docs/integrations/document_loaders) for documentation on built-in integrations with document loader providers.
:::
Use document loaders to load data from a source as `Document`'s. A `Document` is a piece of text
and associated metadata. F... | langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/index.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/index.mdx",
"repo_id": "langchainjs",
"token_count": 243
} | 755 |
from __future__ import annotations
from typing import Dict, List, Optional, Type
from langchain_core.pydantic_v1 import root_validator
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools import BaseTool
from langchain_community.tools.file_management.copy import CopyFileTool... | langchain/libs/community/langchain_community/agent_toolkits/file_management/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/file_management/toolkit.py",
"repo_id": "langchain",
"token_count": 1110
} | 209 |
# 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 applicabl... | transformers/tests/models/llama/test_modeling_flax_llama.py/0 | {
"file_path": "transformers/tests/models/llama/test_modeling_flax_llama.py",
"repo_id": "transformers",
"token_count": 4765
} | 792 |
from typing import Any, List, Optional, Type, Union
from langchain_core.language_models import BaseLanguageModel
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_core.output_parsers import BaseLLMOutputParser
from langchain_core.prompts import PromptTemplate
from langchain_core.prompts.ch... | langchain/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py",
"repo_id": "langchain",
"token_count": 1490
} | 462 |
<jupyter_start><jupyter_text>Comparing Chain Outputs[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/examples/comparisons.ipynb)Suppose you have two different prompts (or LLMs). How do you know which will generate "better" results?One automated way to predict th... | langchain/docs/docs/guides/evaluation/examples/comparisons.ipynb/0 | {
"file_path": "langchain/docs/docs/guides/evaluation/examples/comparisons.ipynb",
"repo_id": "langchain",
"token_count": 2838
} | 93 |
import logging
from datetime import datetime as dt
from typing import Dict, Optional, Type
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_community.tools.amadeus.base import AmadeusBaseTool
logger = logging.getLogger(__name__)
c... | langchain/libs/community/langchain_community/tools/amadeus/flight_search.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/amadeus/flight_search.py",
"repo_id": "langchain",
"token_count": 2418
} | 291 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 17,
"prefill": [
{
"id": 1276,
"logprob": null,
"text": "What"
},
{
"id": 310,
"logprob": -1.5117188,
"text": " is"
},
{
"id": ... | text-generation-inference/integration-tests/models/__snapshots__/test_mpt/test_mpt.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_mpt/test_mpt.json",
"repo_id": "text-generation-inference",
"token_count": 1691
} | 397 |
import { test } from "@jest/globals";
import { StructuredQueryOutputParser } from "../index.js";
import {
Comparators,
Comparison,
Operation,
Operators,
StructuredQuery,
} from "../ir.js";
const correctQuery = new StructuredQuery(
"teenager love",
new Operation(Operators.and, [
new Operation(Operator... | langchainjs/langchain/src/chains/query_constructor/tests/query_parser.test.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/query_constructor/tests/query_parser.test.ts",
"repo_id": "langchainjs",
"token_count": 452
} | 929 |
SPECULATE = None
def get_speculate() -> int:
global SPECULATE
return SPECULATE
def set_speculate(speculate: int):
global SPECULATE
SPECULATE = speculate
| text-generation-inference/server/text_generation_server/utils/speculate.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/speculate.py",
"repo_id": "text-generation-inference",
"token_count": 66
} | 403 |
from typing import Optional
import pyspark
from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader
class SparkDatasetReader(AbstractDatasetReader):
"""A dataset reader that reads from a Spark DataFrame.
... | datasets/src/datasets/io/spark.py/0 | {
"file_path": "datasets/src/datasets/io/spark.py",
"repo_id": "datasets",
"token_count": 787
} | 144 |
# Metric Card for CUAD
## Metric description
This metric wraps the official scoring script for version 1 of the [Contract Understanding Atticus Dataset (CUAD)](https://huggingface.co/datasets/cuad), which is a corpus of more than 13,000 labels in 510 commercial legal contracts that have been manually labeled to ident... | datasets/metrics/cuad/README.md/0 | {
"file_path": "datasets/metrics/cuad/README.md",
"repo_id": "datasets",
"token_count": 2380
} | 128 |
"""Test Epsilla indexes."""
from typing import List
import pytest
try:
from pyepsilla import vectordb
except ImportError:
vectordb = None # type: ignore
from llama_index.legacy.schema import NodeRelationship, RelatedNodeInfo, TextNode
from llama_index.legacy.vector_stores import EpsillaVectorStore
from lla... | llama_index/llama-index-legacy/tests/vector_stores/test_epsilla.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/vector_stores/test_epsilla.py",
"repo_id": "llama_index",
"token_count": 840
} | 1,824 |
## 🔗 SummaryIndex
### Index Construction
SummaryIndex is a simple list-based data structure. During index construction, SummaryIndex takes in a dataset of text documents as input, chunks them up into smaller document chunks, and concatenates them into a list. GPT is not called at all during index construction.
### ... | llama_index/llama-index-legacy/llama_index/legacy/indices/list/README.md/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/list/README.md",
"repo_id": "llama_index",
"token_count": 241
} | 1,716 |
# (Gluon) ResNet
**Residual Networks**, or **ResNets**, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping. They stack [residu... | pytorch-image-models/docs/models/.templates/models/gloun-resnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/gloun-resnet.md",
"repo_id": "pytorch-image-models",
"token_count": 6383
} | 316 |
// create a cloudclient class that takes in an api key and an optional database
// this should wrap ChromaClient and specify the auth scheme correctly
import { ChromaClient } from "./ChromaClient";
interface CloudClientParams {
apiKey?: string;
database?: string;
cloudHost?: string;
cloudPort?: strin... | chroma/clients/js/src/CloudClient.ts/0 | {
"file_path": "chroma/clients/js/src/CloudClient.ts",
"repo_id": "chroma",
"token_count": 505
} | 31 |
import unittest
import pytest
from langchain_community.document_loaders.parsers.language.javascript import (
JavaScriptSegmenter,
)
@pytest.mark.requires("esprima")
class TestJavaScriptSegmenter(unittest.TestCase):
def setUp(self) -> None:
self.example_code = """const os = require('os');
function h... | langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_javascript.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_javascript.py",
"repo_id": "langchain",
"token_count": 515
} | 366 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/meta/collection_manager.go/0 | {
"file_path": "milvus/internal/querycoordv2/meta/collection_manager.go",
"repo_id": "milvus",
"token_count": 5782
} | 1,760 |
"""A unit test meant to catch accidental introduction of non-optional dependencies."""
from pathlib import Path
from typing import Any, Dict, Mapping
import pytest
import toml
HERE = Path(__file__).parent
PYPROJECT_TOML = HERE / "../../pyproject.toml"
@pytest.fixture()
def poetry_conf() -> Dict[str, Any]:
"""L... | langchain/libs/community/tests/unit_tests/test_dependencies.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/test_dependencies.py",
"repo_id": "langchain",
"token_count": 1450
} | 402 |
"""Product extraction pack."""
import asyncio
from typing import Any, Dict
from llama_index.core import SimpleDirectoryReader
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.output_parsers import PydanticOutputParser
from llama_index.core.program.multi_modal_llm_program import (
Mu... | llama_index/llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/base.py",
"repo_id": "llama_index",
"token_count": 1390
} | 1,771 |
#!/bin/bash
export CUDA_VISIBLE_DEVICES=0
PATH_TO_DATA=/h/xinji/projects/GLUE
MODEL_TYPE=bert # bert or roberta
MODEL_SIZE=base # base or large
DATASET=MRPC # SST-2, MRPC, RTE, QNLI, QQP, or MNLI
MODEL_NAME=${MODEL_TYPE}-${MODEL_SIZE}
if [ $MODEL_TYPE = 'bert' ]
then
MODEL_NAME=${MODEL_NAME}-uncased
fi
ENTROPI... | transformers/examples/research_projects/deebert/entropy_eval.sh/0 | {
"file_path": "transformers/examples/research_projects/deebert/entropy_eval.sh",
"repo_id": "transformers",
"token_count": 437
} | 572 |
import copy
import inspect
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import PIL
import torch
import torch.nn.functional as F
from torch.nn.functional import grid_sample
from transformers import (
CLIPImageProcessor,
CLIPTextModel,
... | diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py",
"repo_id": "diffusers",
"token_count": 28719
} | 267 |
import CodeBlock from "@theme/CodeBlock";
# BabyAGI
:::info
Original Repo: https://github.com/yoheinakajima/babyagi
:::
BabyAGI is made up of 3 components:
- A chain responsible for creating tasks
- A chain responsible for prioritising tasks
- A chain responsible for executing tasks
These chains are executed in se... | langchainjs/docs/core_docs/docs/use_cases/autonomous_agents/baby_agi.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/autonomous_agents/baby_agi.mdx",
"repo_id": "langchainjs",
"token_count": 386
} | 797 |
import os
from datetime import datetime
from tempfile import TemporaryDirectory
import pytest
from langchain_core.documents import Document
from langchain_community.retrievers.tfidf import TFIDFRetriever
@pytest.mark.requires("sklearn")
def test_from_texts() -> None:
input_texts = ["I have a pen.", "Do you have... | langchain/libs/community/tests/unit_tests/retrievers/test_tfidf.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/retrievers/test_tfidf.py",
"repo_id": "langchain",
"token_count": 966
} | 379 |
from __future__ import annotations
import uuid
from typing import Any, Dict, List, Optional, Sequence
from uuid import UUID
from langchain.callbacks.base import AsyncCallbackHandler
from langchain.callbacks.manager import (
BaseRunManager,
ahandle_event,
handle_event,
)
from langchain.schema import AgentA... | langserve/langserve/callbacks.py/0 | {
"file_path": "langserve/langserve/callbacks.py",
"repo_id": "langserve",
"token_count": 7378
} | 1,084 |
import os
from typing import Any, Dict, Optional, Union
from urllib.parse import urlsplit
from timm.layers import set_layer_config
from ._helpers import load_checkpoint
from ._hub import load_model_config_from_hf
from ._pretrained import PretrainedCfg
from ._registry import is_model, model_entrypoint, split_model_name... | pytorch-image-models/timm/models/_factory.py/0 | {
"file_path": "pytorch-image-models/timm/models/_factory.py",
"repo_id": "pytorch-image-models",
"token_count": 1944
} | 350 |
metrics:
serviceMonitor:
enabled: true
proxy:
nodeSelector:
nvidia.com/gpu.present: 'true'
resources:
requests:
cpu: "0.1"
memory: "256Mi"
rootCoordinator:
nodeSelector:
nvidia.com/gpu.present: 'true'
resources:
requests:
cpu: "0.1"
memory: "256Mi"
queryCoordinato... | milvus/tests/scripts/values/ci/pr-gpu.yaml/0 | {
"file_path": "milvus/tests/scripts/values/ci/pr-gpu.yaml",
"repo_id": "milvus",
"token_count": 2231
} | 1,910 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 1,
"logprob": null,
"text": "<s>"
},
{
"id": 806,
"logprob": -11.890625,
"text": "Wh"
},
{
"id": 1446,... | text-generation-inference/integration-tests/models/__snapshots__/test_grammar_llama/test_flash_llama_grammar_regex.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_grammar_llama/test_flash_llama_grammar_regex.json",
"repo_id": "text-generation-inference",
"token_count": 1292
} | 403 |
import os
import sys
import warnings
from dataclasses import dataclass, field
from io import BytesIO
from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Optional, Union
import numpy as np
import pyarrow as pa
from .. import config
from ..download.download_config import DownloadConfig
from ..download.streamin... | datasets/src/datasets/features/image.py/0 | {
"file_path": "datasets/src/datasets/features/image.py",
"repo_id": "datasets",
"token_count": 6802
} | 131 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/examples/legacy/token-classification/utils_ner.py/0 | {
"file_path": "transformers/examples/legacy/token-classification/utils_ner.py",
"repo_id": "transformers",
"token_count": 7657
} | 512 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,847 |
[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 = ["AnswerConsistencyBinaryEvaluator", "AnswerConsistencyEvaluator", "AnswerSimilarityEvaluat... | llama_index/llama-index-integrations/evaluation/llama-index-evaluation-tonic-validate/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/evaluation/llama-index-evaluation-tonic-validate/pyproject.toml",
"repo_id": "llama_index",
"token_count": 719
} | 1,377 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/data_collator.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/data_collator.md",
"repo_id": "transformers",
"token_count": 681
} | 482 |
// 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/unittest/test_concurrent_vector.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_concurrent_vector.cpp",
"repo_id": "milvus",
"token_count": 1715
} | 1,817 |
/** @ignore We don't need API refs for these */
export declare type PackageJSONDependencyTypes =
| "dependencies"
| "devDependencies"
| "peerDependencies"
| "optionalDependencies";
/** @ignore We don't need API refs for these */
export interface PackageJSONAddress {
email?: string;
url?: string;
}
/** @ig... | langchainjs/libs/langchain-scripts/src/types.ts/0 | {
"file_path": "langchainjs/libs/langchain-scripts/src/types.ts",
"repo_id": "langchainjs",
"token_count": 1307
} | 1,045 |
# flake8: noqa
from langchain.output_parsers.regex import RegexParser
from langchain_core.prompts import PromptTemplate
output_parser = RegexParser(
regex=r"(.*?)\nScore: (\d*)",
output_keys=["answer", "score"],
)
prompt_template = """Use the following pieces of context to answer the question at the end. If y... | langchain/libs/langchain/langchain/chains/question_answering/map_rerank_prompt.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/question_answering/map_rerank_prompt.py",
"repo_id": "langchain",
"token_count": 468
} | 465 |
from langchain_community.document_transformers.doctran_text_qa import (
DoctranQATransformer,
)
__all__ = ["DoctranQATransformer"]
| langchain/libs/langchain/langchain/document_transformers/doctran_text_qa.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_transformers/doctran_text_qa.py",
"repo_id": "langchain",
"token_count": 49
} | 504 |
apiVersion: chaos-mesh.org/v1alpha1
kind: Workflow
metadata:
name: test-allcluster-pod-kill
namespace: chaos-testing
spec:
entry: entry
templates:
- name: entry
templateType: Serial
deadline: 5m
children:
- test-all-pods-kill
- name: test-first-part-pod-kill
templateType:... | milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_allcluster_pod_kill.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_allcluster_pod_kill.yaml",
"repo_id": "milvus",
"token_count": 706
} | 1,958 |
import { QdrantVectorStore } from "@langchain/community/vectorstores/qdrant";
import { OpenAIEmbeddings } from "@langchain/openai";
import { TextLoader } from "langchain/document_loaders/fs/text";
// Create docs with a loader
const loader = new TextLoader("src/document_loaders/example_data/example.txt");
const docs = ... | langchainjs/examples/src/indexes/vector_stores/qdrant/fromDocs.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/qdrant/fromDocs.ts",
"repo_id": "langchainjs",
"token_count": 265
} | 808 |
from langchain_core.language_models.llms import BaseLLM
from langchain_community import llms
EXPECT_ALL = [
"AI21",
"AlephAlpha",
"AmazonAPIGateway",
"Anthropic",
"Anyscale",
"Aphrodite",
"Arcee",
"Aviary",
"AzureMLOnlineEndpoint",
"AzureOpenAI",
"Banana",
"Baseten",
... | langchain/libs/community/tests/unit_tests/llms/test_imports.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/llms/test_imports.py",
"repo_id": "langchain",
"token_count": 1001
} | 380 |
/* eslint-disable no-process-env */
import { OpenAI } from "@langchain/openai";
import { ChainValues } from "@langchain/core/utils/types";
import { Neo4jGraph } from "@langchain/community/graphs/neo4j_graph";
import { GraphCypherQAChain, INTERMEDIATE_STEPS_KEY } from "../cypher.js";
describe.skip("testCypherGeneratin... | langchainjs/langchain/src/chains/graph_qa/tests/cypher.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/graph_qa/tests/cypher.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1346
} | 926 |
"""RegNet X, Y, Z, and more
Paper: `Designing Network Design Spaces` - https://arxiv.org/abs/2003.13678
Original Impl: https://github.com/facebookresearch/pycls/blob/master/pycls/models/regnet.py
Paper: `Fast and Accurate Model Scaling` - https://arxiv.org/abs/2103.06877
Original Impl: None
Based on original PyTorch... | pytorch-image-models/timm/models/regnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/regnet.py",
"repo_id": "pytorch-image-models",
"token_count": 21400
} | 376 |
{
"compilerOptions": {
"jsx": "react",
"moduleResolution": "node",
"esModuleInterop": true,
"lib": ["es2015", "dom"]
}
}
| langserve/libs/langserve-playground/tsconfig.json/0 | {
"file_path": "langserve/libs/langserve-playground/tsconfig.json",
"repo_id": "langserve",
"token_count": 64
} | 1,050 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,467 |
"""Tair Vector store index.
An index that is built on top of Alibaba Cloud's Tair database.
"""
import logging
from typing import Any, Dict, List, Optional
from llama_index.core.schema import (
BaseNode,
MetadataMode,
NodeRelationship,
RelatedNodeInfo,
TextNode,
)
from llama_index.core.vector_stor... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-tair/llama_index/vector_stores/tair/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-tair/llama_index/vector_stores/tair/base.py",
"repo_id": "llama_index",
"token_count": 4059
} | 1,497 |
#!/bin/bash
set -e
set -x
echo "check os env"
platform='Linux'
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
platform='Linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='Mac'
fi
echo "platform: $platform"
if [ "$platform" == "Mac" ];
then
sed -i "" "s/TESTS_CONFIG_LOCATION =.*/TESTS_CONFIG... | milvus/tests/python_client/chaos/scripts/modify_config.sh/0 | {
"file_path": "milvus/tests/python_client/chaos/scripts/modify_config.sh",
"repo_id": "milvus",
"token_count": 407
} | 1,892 |
"""Init params."""
| llama_index/llama-index-legacy/llama_index/legacy/finetuning/rerankers/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/finetuning/rerankers/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,558 |
export const config = {
entrypoints: "should be an object, not a string",
tsConfigPath: 123, // should be a string
cjsSource: null, // should be a string
cjsDestination: true, // should be a string
abs: "should be a function, not a string",
requiresOptionalDependency: "should be an array, not a string",
d... | langchainjs/libs/langchain-scripts/src/tests/langchain.invalid.config.js/0 | {
"file_path": "langchainjs/libs/langchain-scripts/src/tests/langchain.invalid.config.js",
"repo_id": "langchainjs",
"token_count": 209
} | 1,110 |
<jupyter_start><jupyter_text>Add message history (memory)The `RunnableWithMessageHistory` let us add message history to certain types of chains.Specifically, it can be used for any Runnable that takes as input one of* a sequence of `BaseMessage`* a dict with a key that takes a sequence of `BaseMessage`* a dict with a k... | langchain/docs/docs/expression_language/how_to/message_history.ipynb/0 | {
"file_path": "langchain/docs/docs/expression_language/how_to/message_history.ipynb",
"repo_id": "langchain",
"token_count": 1862
} | 88 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/ddim/pipeline_ddim.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/ddim/pipeline_ddim.py",
"repo_id": "diffusers",
"token_count": 2748
} | 240 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/utils/get_modified_files.py/0 | {
"file_path": "transformers/utils/get_modified_files.py",
"repo_id": "transformers",
"token_count": 448
} | 846 |
#!/usr/bin/env python
# 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
#
# Unles... | accelerate/src/accelerate/commands/tpu.py/0 | {
"file_path": "accelerate/src/accelerate/commands/tpu.py",
"repo_id": "accelerate",
"token_count": 2114
} | 15 |
# coding=utf-8
# Copyright 2021 Tel AViv University, AllenAI and The HuggingFace Inc. team. All rights reserved.
# 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
#
# ... | transformers/src/transformers/models/splinter/tokenization_splinter.py/0 | {
"file_path": "transformers/src/transformers/models/splinter/tokenization_splinter.py",
"repo_id": "transformers",
"token_count": 9785
} | 670 |
<script lang="ts">
import { base } from "$app/paths";
import { clickOutside } from "$lib/actions/clickOutside";
import { afterNavigate, goto } from "$app/navigation";
import { useSettingsStore } from "$lib/stores/settings";
import type { PageData } from "./$types";
import { applyAction, enhance } from "$app/form... | chat-ui/src/routes/assistant/[assistantId]/+page.svelte/0 | {
"file_path": "chat-ui/src/routes/assistant/[assistantId]/+page.svelte",
"repo_id": "chat-ui",
"token_count": 1411
} | 107 |
<!--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/ko/add_tensorflow_model.md/0 | {
"file_path": "transformers/docs/source/ko/add_tensorflow_model.md",
"repo_id": "transformers",
"token_count": 18335
} | 500 |
#!/usr/bin/env python
# coding=utf-8
# 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-... | transformers/examples/research_projects/jax-projects/model_parallel/run_clm_mp.py/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/model_parallel/run_clm_mp.py",
"repo_id": "transformers",
"token_count": 11794
} | 565 |
import { expect, test } from "@jest/globals";
import { CohereEmbeddings } from "@langchain/community/embeddings/cohere";
import { MemoryVectorStore } from "../../vectorstores/memory.js";
import { MultiQueryRetriever } from "../multi_query.js";
import { ChatAnthropic } from "../../chat_models/anthropic.js";
test("Shoul... | langchainjs/langchain/src/retrievers/tests/multi_query.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/tests/multi_query.int.test.ts",
"repo_id": "langchainjs",
"token_count": 714
} | 946 |
import {
BedrockRuntimeClient,
InvokeModelCommand,
} from "@aws-sdk/client-bedrock-runtime";
import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
import type { CredentialType } from "../utils/bedrock.js";
/**
* Interface that extends EmbeddingsParams and defines additional
* parameters spec... | langchainjs/libs/langchain-community/src/embeddings/bedrock.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/bedrock.ts",
"repo_id": "langchainjs",
"token_count": 1485
} | 1,020 |
[tool.poetry]
name = "neo4j-cypher-ft"
version = "0.1.0"
description = "Interact with a Neo4j graph database using natural language"
authors = [
"Tomaz Bratanic <tomaz.bratanic@neo4j.com>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
neo4j = ">5.12"
openai = "<2"
[... | langchain/templates/neo4j-cypher-ft/pyproject.toml/0 | {
"file_path": "langchain/templates/neo4j-cypher-ft/pyproject.toml",
"repo_id": "langchain",
"token_count": 305
} | 695 |
## Cogniswitch ToolSpec
**Use CogniSwitch to build production ready applications that can consume, organize and retrieve knowledge flawlessly. Using the framework of your choice, in this case LlamaIndex, CogniSwitch helps alleviate the stress of decision making when it comes to, choosing the right storage and retrieva... | llama_index/llama-index-integrations/tools/llama-index-tools-cogniswitch/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-cogniswitch/README.md",
"repo_id": "llama_index",
"token_count": 1300
} | 1,435 |
"""Query pipeline."""
from typing import Any, Dict
import pytest
from llama_index.legacy.core.query_pipeline.components import (
FnComponent,
InputComponent,
)
from llama_index.legacy.core.query_pipeline.query_component import (
ChainableMixin,
InputKeys,
Link,
OutputKeys,
QueryComponent,
... | llama_index/llama-index-legacy/tests/query_pipeline/test_query.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/query_pipeline/test_query.py",
"repo_id": "llama_index",
"token_count": 5783
} | 1,814 |
"""Test ad-hoc loader Tool."""
from typing import List
import pytest
try:
import langchain
except ImportError:
langchain = None # type: ignore
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.indices.vector_store.base import VectorStoreIndex
from llama_index.core.readers.string_... | llama_index/llama-index-core/tests/tools/test_ondemand_loader.py/0 | {
"file_path": "llama_index/llama-index-core/tests/tools/test_ondemand_loader.py",
"repo_id": "llama_index",
"token_count": 601
} | 1,247 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/adaption_prompt/model.py/0 | {
"file_path": "peft/src/peft/tuners/adaption_prompt/model.py",
"repo_id": "peft",
"token_count": 2813
} | 345 |
# coding=utf-8
# Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | transformers/src/transformers/models/wav2vec2/modeling_wav2vec2.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/modeling_wav2vec2.py",
"repo_id": "transformers",
"token_count": 46050
} | 675 |
#![allow(unused)]
//! Vectorized version of the gym environment.
use candle::{DType, Device, Result, Tensor};
use pyo3::prelude::*;
use pyo3::types::PyDict;
#[derive(Debug)]
pub struct Step {
pub obs: Tensor,
pub reward: Tensor,
pub is_done: Tensor,
}
pub struct VecGymEnv {
env: PyObject,
action_s... | candle/candle-examples/examples/reinforcement-learning/vec_gym_env.rs/0 | {
"file_path": "candle/candle-examples/examples/reinforcement-learning/vec_gym_env.rs",
"repo_id": "candle",
"token_count": 1563
} | 50 |
[
{
"server": "idc-sh004",
"suite_params": [
{
"suite": "011_cpu_search_debug.yaml",
"image_type": "gpu"
}
]
}
]
| milvus/tests/benchmark/milvus_benchmark/scheduler/idc.json/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/scheduler/idc.json",
"repo_id": "milvus",
"token_count": 138
} | 1,859 |
from llama_index.readers.lilac.base import LilacReader
__all__ = ["LilacReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-lilac/llama_index/readers/lilac/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-lilac/llama_index/readers/lilac/__init__.py",
"repo_id": "llama_index",
"token_count": 31
} | 1,419 |
from typing import Any, Dict, List, Mapping, Optional, Tuple
import requests
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
class MosaicMLInstructorEmbeddings(BaseModel, Embeddings):
""... | langchain/libs/community/langchain_community/embeddings/mosaicml.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/mosaicml.py",
"repo_id": "langchain",
"token_count": 2286
} | 259 |
import logging
from typing import Any, Dict, List, Mapping, Optional
import requests
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Extra
logger = logging.getLogger(__name__)
class OllamaEmbeddings(BaseModel, Embeddings):
"""Ollama locally runs large language ... | langchain/libs/community/langchain_community/embeddings/ollama.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/ollama.py",
"repo_id": "langchain",
"token_count": 3240
} | 272 |
<!---
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 ... | accelerate/CONTRIBUTING.md/0 | {
"file_path": "accelerate/CONTRIBUTING.md",
"repo_id": "accelerate",
"token_count": 2572
} | 0 |
# __init__.py
from llama_index.tools.database.base import (
DatabaseToolSpec,
)
__all__ = ["DatabaseToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-database/llama_index/tools/database/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-database/llama_index/tools/database/__init__.py",
"repo_id": "llama_index",
"token_count": 42
} | 1,422 |
// 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/core/src/common/Schema.cpp/0 | {
"file_path": "milvus/internal/core/src/common/Schema.cpp",
"repo_id": "milvus",
"token_count": 1560
} | 1,641 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/donut/configuration_donut_swin.py/0 | {
"file_path": "transformers/src/transformers/models/donut/configuration_donut_swin.py",
"repo_id": "transformers",
"token_count": 2322
} | 625 |
from langchain_community.vectorstores.qdrant import (
Qdrant,
QdrantException,
)
__all__ = ["QdrantException", "Qdrant"]
| langchain/libs/langchain/langchain/vectorstores/qdrant.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/qdrant.py",
"repo_id": "langchain",
"token_count": 51
} | 586 |
/* Equivalent PyTorch code.
import torch
from torch.nn.functional import group_norm
t = torch.tensor(
[[[-0.3034, 0.2726, -0.9659],
[-1.1845, -1.3236, 0.0172],
[ 1.9507, 1.2554, -0.8625],
[ 1.0682, 0.3604, 0.3985],
[-0.4957, -0.4461, -0.9721],
[ 1.5157, -0.... | candle/candle-nn/tests/group_norm.rs/0 | {
"file_path": "candle/candle-nn/tests/group_norm.rs",
"repo_id": "candle",
"token_count": 2154
} | 64 |
from llama_index.legacy.node_parser.sentence_window import (
SentenceWindowNodeParser,
)
from llama_index.legacy.schema import Document
def test_split_and_window() -> None:
document = Document(text="This is a test 1. This is a test 2. This is a test 3.")
node_parser = SentenceWindowNodeParser.from_defaul... | llama_index/llama-index-legacy/tests/node_parser/sentence_window.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/node_parser/sentence_window.py",
"repo_id": "llama_index",
"token_count": 289
} | 1,628 |
import { AgentExecutor } from "langchain/agents";
import { ChatOpenAI } from "@langchain/openai";
import { Calculator } from "langchain/tools/calculator";
import { OpenAIFunctionsAgentOutputParser } from "langchain/agents/openai/output_parser";
import { convertToOpenAIFunction } from "@langchain/core/utils/function_cal... | langchainjs/examples/src/agents/openai_runnable.ts/0 | {
"file_path": "langchainjs/examples/src/agents/openai_runnable.ts",
"repo_id": "langchainjs",
"token_count": 1045
} | 792 |
from typing import List
from langchain_core.pydantic_v1 import root_validator
from langchain_core.tools import BaseTool
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools.connery import ConneryService
class ConneryToolkit(BaseToolkit):
"""
A LangChain Toolkit with... | langchain/libs/community/langchain_community/agent_toolkits/connery/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/connery/toolkit.py",
"repo_id": "langchain",
"token_count": 561
} | 221 |
# Retrieval-Augmented Generation (RAG) Evaluation Pack
Get benchmark scores on your own RAG pipeline (i.e. `QueryEngine`) on a RAG
dataset (i.e., `LabelledRagDataset`). Specifically this pack takes in as input a
query engine and a `LabelledRagDataset`, which can also be downloaded from
[llama-hub](https://llamahub.ai)... | llama_index/llama-index-packs/llama-index-packs-rag-evaluator/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-rag-evaluator/README.md",
"repo_id": "llama_index",
"token_count": 826
} | 1,583 |
python_tests()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,173 |
from langchain_community.llms.baidu_qianfan_endpoint import QianfanLLMEndpoint
__all__ = ["QianfanLLMEndpoint"]
| langchain/libs/langchain/langchain/llms/baidu_qianfan_endpoint.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/baidu_qianfan_endpoint.py",
"repo_id": "langchain",
"token_count": 42
} | 510 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3257
} | 674 |
# AdvProp (EfficientNet)
**AdvProp** is an adversarial training scheme which treats adversarial examples as additional examples, to prevent overfitting. Key to the method is the usage of a separate auxiliary batch norm for adversarial examples, as they have different underlying distributions to normal examples.
The w... | pytorch-image-models/docs/models/.templates/models/advprop.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/advprop.md",
"repo_id": "pytorch-image-models",
"token_count": 5211
} | 327 |
from typing import Any, Dict
import pytest
from langchain.prompts.prompt import PromptTemplate
from langchain_community.chat_models import FakeListChatModel
from test_utils import MockEncoder, MockEncoderReturnsList
import langchain_experimental.rl_chain.base as rl_chain
import langchain_experimental.rl_chain.pick_be... | langchain/libs/experimental/tests/unit_tests/rl_chain/test_pick_best_chain_call.py/0 | {
"file_path": "langchain/libs/experimental/tests/unit_tests/rl_chain/test_pick_best_chain_call.py",
"repo_id": "langchain",
"token_count": 7211
} | 454 |
{
"name": "langserve-playground",
"version": "0.0.1",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"license": "MIT",
"author": "LangChain",
"scripts": {
"build": "tsup src/index.tsx",
"dev": "tsup src/index.tsx --watch"
},
"files": [
"dist"
],
"key... | langserve/libs/langserve-playground/package.json/0 | {
"file_path": "langserve/libs/langserve-playground/package.json",
"repo_id": "langserve",
"token_count": 313
} | 1,091 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/analyticdb",
});
export * from "@langchain/community/vectorstores/analyticdb";
| langchainjs/langchain/src/vectorstores/analyticdb.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/analyticdb.ts",
"repo_id": "langchainjs",
"token_count": 74
} | 1,002 |
import pytest
@pytest.fixture(scope="module")
def flash_medusa_handle(launcher):
with launcher("FasterDecoding/medusa-vicuna-7b-v1.3", num_shard=2) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_medusa(flash_medusa_handle):
await flash_medusa_handle.health(300)
return fl... | text-generation-inference/integration-tests/models/test_flash_medusa.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_medusa.py",
"repo_id": "text-generation-inference",
"token_count": 750
} | 389 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/bort.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bort.md",
"repo_id": "transformers",
"token_count": 867
} | 485 |
<!--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/de/run_scripts.md/0 | {
"file_path": "transformers/docs/source/de/run_scripts.md",
"repo_id": "transformers",
"token_count": 7454
} | 465 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team, 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.
# You may obtain a copy of the License ... | transformers/src/transformers/models/mpnet/modeling_tf_mpnet.py/0 | {
"file_path": "transformers/src/transformers/models/mpnet/modeling_tf_mpnet.py",
"repo_id": "transformers",
"token_count": 23834
} | 644 |
// 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.go/0 | {
"file_path": "milvus/internal/distributed/rootcoord/service.go",
"repo_id": "milvus",
"token_count": 6919
} | 1,801 |
/* eslint-disable no-loop-func */
/* eslint-disable no-promise-executor-return */
import { test } from "@jest/globals";
import { FakeStreamingLLM } from "../../utils/testing/index.js";
import { BytesOutputParser } from "../bytes.js";
import {
CommaSeparatedListOutputParser,
ListOutputParser,
MarkdownListOutputPa... | langchainjs/langchain-core/src/output_parsers/tests/output_parser.test.ts/0 | {
"file_path": "langchainjs/langchain-core/src/output_parsers/tests/output_parser.test.ts",
"repo_id": "langchainjs",
"token_count": 1157
} | 854 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
context "context"
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
grpc "google.golang.org/grpc"
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/mi... | milvus/internal/mocks/mock_proxy_client.go/0 | {
"file_path": "milvus/internal/mocks/mock_proxy_client.go",
"repo_id": "milvus",
"token_count": 11090
} | 1,730 |
import {
VectaraFilter,
VectaraStore,
} from "@langchain/community/vectorstores/vectara";
import {
Comparator,
Comparators,
Comparison,
NOT,
Operation,
Operator,
Operators,
StructuredQuery,
Visitor,
} from "../../chains/query_constructor/ir.js";
import { BaseTranslator } from "./base.js";
import {... | langchainjs/langchain/src/retrievers/self_query/vectara.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/self_query/vectara.ts",
"repo_id": "langchainjs",
"token_count": 1924
} | 945 |
import { test } from "@jest/globals";
import { GoogleCustomSearch } from "../google_custom_search.js";
test.skip("GoogleCustomSearchTool", async () => {
const tool = new GoogleCustomSearch();
const result = await tool.call("What is Langchain?");
console.log({ result });
});
| langchainjs/libs/langchain-community/src/tools/tests/google_custom_search.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/tests/google_custom_search.int.test.ts",
"repo_id": "langchainjs",
"token_count": 83
} | 1,043 |
# Res2NeXt
**Res2NeXt** is an image model that employs a variation on [ResNeXt](https://paperswithcode.com/method/resnext) bottleneck residual blocks. The motivation is to be able to represent features at multiple scales. This is achieved through a novel building block for CNNs that constructs hierarchical residual-li... | pytorch-image-models/docs/models/.templates/models/res2next.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/res2next.md",
"repo_id": "pytorch-image-models",
"token_count": 905
} | 339 |
// 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/uniquegenerator/unique_int_generator.go/0 | {
"file_path": "milvus/pkg/util/uniquegenerator/unique_int_generator.go",
"repo_id": "milvus",
"token_count": 606
} | 1,919 |
pyproject_str = """[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.codespell]
check-filenames = true
check-hidden = true
# Feel free to un-skip examples, and experimental, you will just need to
# work through many typos (--write-changes and --interactive will help)
skip = "*.c... | llama_index/llama-index-cli/llama_index/cli/new_package/templates/pyproject.py/0 | {
"file_path": "llama_index/llama-index-cli/llama_index/cli/new_package/templates/pyproject.py",
"repo_id": "llama_index",
"token_count": 627
} | 1,239 |
<!--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 to... | transformers/docs/source/ja/peft.md/0 | {
"file_path": "transformers/docs/source/ja/peft.md",
"repo_id": "transformers",
"token_count": 3654
} | 496 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.