text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/wav2vec2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/wav2vec2.md",
"repo_id": "transformers",
"token_count": 3092
} | 518 |
const IDS = ["test1", "test2", "test3"];
const EMBEDDINGS = [
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
];
const METADATAS = [
{ test: "test1", float_value: -2 },
{ test: "test2", float_value: 0 },
{ test: "test3", float_value: 2 },
];
const DOCUMENTS... | chroma/clients/js/test/data.ts/0 | {
"file_path": "chroma/clients/js/test/data.ts",
"repo_id": "chroma",
"token_count": 210
} | 37 |
from langchain_community.chat_models.fireworks import (
ChatFireworks,
)
__all__ = [
"ChatFireworks",
]
| langchain/libs/langchain/langchain/chat_models/fireworks.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chat_models/fireworks.py",
"repo_id": "langchain",
"token_count": 43
} | 504 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-finetuning/BUILD/0 | {
"file_path": "llama_index/llama-index-finetuning/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,219 |
"""Init params."""
| llama_index/llama-index-core/tests/indices/empty/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/tests/indices/empty/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,207 |
<jupyter_start><jupyter_text>Tracking token usageThis notebook goes over how to track your token usage for specific calls. It is currently only implemented for the OpenAI API.Let's first look at an extremely simple example of tracking token usage for a single Chat model call.<jupyter_code>from langchain.callbacks impor... | langchain/docs/docs/modules/model_io/chat/token_usage_tracking.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/model_io/chat/token_usage_tracking.ipynb",
"repo_id": "langchain",
"token_count": 835
} | 191 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/llama_index/tools/playgrounds/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/llama_index/tools/playgrounds/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,577 |
// 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/storage/ChunkCache.cpp/0 | {
"file_path": "milvus/internal/core/src/storage/ChunkCache.cpp",
"repo_id": "milvus",
"token_count": 1505
} | 1,671 |
# Anyscale
>[Anyscale](https://www.anyscale.com) is a platform to run, fine tune and scale LLMs via production-ready APIs.
> [Anyscale Endpoints](https://docs.anyscale.com/endpoints/overview) serve many open-source models in a cost-effective way.
`Anyscale` also provides [an example](https://docs.anyscale.com/endpoin... | langchain/docs/docs/integrations/providers/anyscale.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/anyscale.mdx",
"repo_id": "langchain",
"token_count": 360
} | 140 |
/**
* Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#implementing_basic_set_operations
*/
/**
* returns intersection of two sets
*/
export function intersection<T>(setA: Set<T>, setB: Set<T>) {
const _intersection = new Set<T>();
for (const elem of setB) {
if (... | langchainjs/langchain/src/util/set.ts/0 | {
"file_path": "langchainjs/langchain/src/util/set.ts",
"repo_id": "langchainjs",
"token_count": 319
} | 961 |
import { test, expect, jest } from "@jest/globals";
import { SupabaseClient } from "@supabase/supabase-js";
import { FakeEmbeddings } from "@langchain/core/utils/testing";
import { SupabaseVectorStore } from "../supabase.js";
test("similaritySearchVectorWithScore should call RPC with the vectorstore filters", async (... | langchainjs/libs/langchain-community/src/vectorstores/tests/supabase.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/supabase.test.ts",
"repo_id": "langchainjs",
"token_count": 557
} | 974 |
<jupyter_start><jupyter_text>ver since Stable Diffusion took the world by storm, people have been looking for ways to have more control over the results of the generation process. ControlNet provides a minimal interface allowing users to customize the generation process up to a great extent. With [ControlNet](https://h... | notebooks/diffusers/controlnet.ipynb/0 | {
"file_path": "notebooks/diffusers/controlnet.ipynb",
"repo_id": "notebooks",
"token_count": 4606
} | 299 |
import argparse
import sys
sys.path.append(".")
from base_classes import T2IAdapterBenchmark, T2IAdapterSDXLBenchmark # noqa: E402
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--ckpt",
type=str,
default="TencentARC/t2iadapter_canny_sd14v1",
... | diffusers/benchmarks/benchmark_t2i_adapter.py/0 | {
"file_path": "diffusers/benchmarks/benchmark_t2i_adapter.py",
"repo_id": "diffusers",
"token_count": 393
} | 171 |
from langchain_community.tools.vectorstore.tool import (
VectorStoreQATool,
VectorStoreQAWithSourcesTool,
)
__all__ = [
"VectorStoreQATool",
"VectorStoreQAWithSourcesTool",
]
| langchain/libs/langchain/langchain/tools/vectorstore/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/vectorstore/tool.py",
"repo_id": "langchain",
"token_count": 72
} | 600 |
from enum import Enum
class Constant(Enum):
"""Enum for constants used in the CPAL."""
narrative_input = "narrative_input"
chain_answer = "chain_answer" # natural language answer
chain_data = "chain_data" # pydantic instance
| langchain/libs/experimental/langchain_experimental/cpal/constants.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/cpal/constants.py",
"repo_id": "langchain",
"token_count": 82
} | 418 |
// 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/pkg/util/metricsinfo/topology.go/0 | {
"file_path": "milvus/pkg/util/metricsinfo/topology.go",
"repo_id": "milvus",
"token_count": 1487
} | 1,944 |
---
hide_table_of_contents: true
sidebar_position: 0
---
# Custom retrievers
To create your own retriever, you need to extend the [`BaseRetriever` class](https://api.js.langchain.com/classes/langchain_core_retrievers.BaseRetriever.html)
and implement a `_getRelevantDocuments` method that takes a `string` as its first... | langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/custom.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/custom.mdx",
"repo_id": "langchainjs",
"token_count": 692
} | 732 |
import pRetry from "p-retry";
import PQueueMod from "p-queue";
const STATUS_NO_RETRY = [
400, // Bad Request
401, // Unauthorized
402, // Payment Required
403, // Forbidden
404, // Not Found
405, // Method Not Allowed
406, // Not Acceptable
407, // Proxy Authentication Required
408, // Request Timeou... | langchainjs/langchain-core/src/utils/async_caller.ts/0 | {
"file_path": "langchainjs/langchain-core/src/utils/async_caller.ts",
"repo_id": "langchainjs",
"token_count": 1915
} | 863 |
from typing import Any, Callable, Iterator, List, Optional, Tuple
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
def default_joiner(docs: List[Tuple[str, Any]]) -> str:
"""Default joiner for content columns."""
return "\n".join([doc[1] for doc ... | langchain/libs/community/langchain_community/document_loaders/rocksetdb.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/rocksetdb.py",
"repo_id": "langchain",
"token_count": 2062
} | 243 |
# flake8: noqa
PREFIX = """Respond to the human as helpfully and accurately as possible. You have access to the following tools:"""
FORMAT_INSTRUCTIONS = """Use a json blob to specify a tool by providing an action key (tool name) and an action_input key (tool input).
Valid "action" values: "Final Answer" or {tool_name... | langchain/libs/langchain/langchain/agents/structured_chat/prompt.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/structured_chat/prompt.py",
"repo_id": "langchain",
"token_count": 301
} | 454 |
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
PromptTemplate,
SystemMessagePromptTemplate,
} from "@langchain/core/prompts";
export const run = async () => {
// A `PromptTemplate` consists of a template string and a list of input variables.
const template = "What is a good name for a company tha... | langchainjs/examples/src/prompts/prompts.ts/0 | {
"file_path": "langchainjs/examples/src/prompts/prompts.ts",
"repo_id": "langchainjs",
"token_count": 754
} | 817 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,389 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_repaint": ["RePaintPipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_repaint import RePaintPipeline
else:
import sys
sys.modules[__name__] = _LazyModule(
... | diffusers/src/diffusers/pipelines/deprecated/repaint/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/repaint/__init__.py",
"repo_id": "diffusers",
"token_count": 183
} | 222 |
import argparse
import itertools
import math
import os
import random
from pathlib import Path
import intel_extension_for_pytorch as ipex
import numpy as np
import PIL
import torch
import torch.nn.functional as F
import torch.utils.checkpoint
from accelerate import Accelerator
from accelerate.logging import get_logger
... | diffusers/examples/research_projects/intel_opts/textual_inversion/textual_inversion_bf16.py/0 | {
"file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion/textual_inversion_bf16.py",
"repo_id": "diffusers",
"token_count": 10688
} | 218 |
from langchain_community.vectorstores.sklearn import (
BaseSerializer,
BsonSerializer,
JsonSerializer,
ParquetSerializer,
SKLearnVectorStore,
SKLearnVectorStoreException,
)
__all__ = [
"BaseSerializer",
"JsonSerializer",
"BsonSerializer",
"ParquetSerializer",
"SKLearnVectorS... | langchain/libs/langchain/langchain/vectorstores/sklearn.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/sklearn.py",
"repo_id": "langchain",
"token_count": 139
} | 575 |
# coding=utf-8
# Copyright 2022 The HuggingFace Team and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | transformers/src/transformers/models/decision_transformer/configuration_decision_transformer.py/0 | {
"file_path": "transformers/src/transformers/models/decision_transformer/configuration_decision_transformer.py",
"repo_id": "transformers",
"token_count": 2795
} | 628 |
from typing import Any, Mapping, Optional
from llama_index.readers.airbyte_cdk.base import AirbyteCDKReader, RecordHandler
class AirbyteShopifyReader(AirbyteCDKReader):
"""AirbyteShopifyReader reader.
Retrieve documents from Shopify
Args:
config: The config object for the shopify source.
""... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/llama_index/readers/airbyte_shopify/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/llama_index/readers/airbyte_shopify/base.py",
"repo_id": "llama_index",
"token_count": 281
} | 1,454 |
[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 = ["ChromaAutoretrievalPack"]
contains_example = false
import_path = "llama_index.packs.chrom... | llama_index/llama-index-packs/llama-index-packs-chroma-autoretrieval/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-chroma-autoretrieval/pyproject.toml",
"repo_id": "llama_index",
"token_count": 712
} | 1,662 |
export function sum(nums: number[]): number {
return nums.reduce((a, b) => a + b, 0);
}
| chat-ui/src/lib/utils/sum.ts/0 | {
"file_path": "chat-ui/src/lib/utils/sum.ts",
"repo_id": "chat-ui",
"token_count": 35
} | 104 |
# Copyright 2020 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | datasets/src/datasets/download/download_manager.py/0 | {
"file_path": "datasets/src/datasets/download/download_manager.py",
"repo_id": "datasets",
"token_count": 9779
} | 128 |
from .base import CallbackManager
from .llama_debug import LlamaDebugHandler
from .schema import CBEvent, CBEventType, EventPayload
from .token_counting import TokenCountingHandler
from .utils import trace_method
__all__ = [
"CallbackManager",
"CBEvent",
"CBEventType",
"EventPayload",
"LlamaDebugHa... | llama_index/llama-index-core/llama_index/core/callbacks/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/callbacks/__init__.py",
"repo_id": "llama_index",
"token_count": 129
} | 1,247 |
# coding=utf-8
# Copyright 2023 The Intel AIA Team Authors, and 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/lice... | transformers/src/transformers/models/tvp/modeling_tvp.py/0 | {
"file_path": "transformers/src/transformers/models/tvp/modeling_tvp.py",
"repo_id": "transformers",
"token_count": 16441
} | 678 |
"""Util that calls DuckDuckGo Search.
No setup required. Free.
https://pypi.org/project/duckduckgo-search/
"""
from typing import Dict, List, Optional
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
class DuckDuckGoSearchAPIWrapper(BaseModel):
"""Wrapper for DuckDuckGo Search API.
F... | langchain/libs/community/langchain_community/utilities/duckduckgo_search.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/duckduckgo_search.py",
"repo_id": "langchain",
"token_count": 2067
} | 326 |
use crate::models::with_tracing::{linear_no_bias, Linear};
/// Mixtral Model
/// https://github.com/huggingface/transformers/blob/main/src/transformers/models/mixtral/modeling_mixtral.py
/// https://mistral.ai/news/mixtral-of-experts/
use candle::{DType, Device, Module, Result, Tensor, D};
use candle_nn::{Activation, V... | candle/candle-transformers/src/models/mixtral.rs/0 | {
"file_path": "candle/candle-transformers/src/models/mixtral.rs",
"repo_id": "candle",
"token_count": 9339
} | 66 |
<!--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/ko/tasks/zero_shot_object_detection.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/zero_shot_object_detection.md",
"repo_id": "transformers",
"token_count": 7704
} | 564 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/vision_text_dual_encoder/test_modeling_vision_text_dual_encoder.py/0 | {
"file_path": "transformers/tests/models/vision_text_dual_encoder/test_modeling_vision_text_dual_encoder.py",
"repo_id": "transformers",
"token_count": 9347
} | 777 |
""" Activation Factory
Hacked together by / Copyright 2020 Ross Wightman
"""
from typing import Union, Callable, Type
from .activations import *
from .activations_jit import *
from .activations_me import *
from .config import is_exportable, is_scriptable, is_no_jit
# PyTorch has an optimized, native 'silu' (aka 'swis... | pytorch-image-models/timm/layers/create_act.py/0 | {
"file_path": "pytorch-image-models/timm/layers/create_act.py",
"repo_id": "pytorch-image-models",
"token_count": 2445
} | 391 |
from typing import Any
from llama_index.core.callbacks.base_handler import BaseCallbackHandler
from honeyhive.utils.llamaindex_tracer import HoneyHiveLlamaIndexTracer
def honeyhive_callback_handler(**kwargs: Any) -> BaseCallbackHandler:
return HoneyHiveLlamaIndexTracer(**kwargs)
| llama_index/llama-index-integrations/callbacks/llama-index-callbacks-honeyhive/llama_index/callbacks/honeyhive/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-honeyhive/llama_index/callbacks/honeyhive/base.py",
"repo_id": "llama_index",
"token_count": 93
} | 1,183 |
"""Test OpenAI API wrapper."""
from pathlib import Path
from typing import Generator
import pytest
from langchain_core.callbacks import CallbackManager
from langchain_core.outputs import LLMResult
from langchain_community.chat_models.openai import ChatOpenAI
from langchain_community.llms.loading import load_llm
from ... | langchain/libs/community/tests/integration_tests/llms/test_openai.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_openai.py",
"repo_id": "langchain",
"token_count": 3123
} | 360 |
<!--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/ko/task_summary.md/0 | {
"file_path": "transformers/docs/source/ko/task_summary.md",
"repo_id": "transformers",
"token_count": 15727
} | 531 |
"""Implement a GPT-3 driven browser.
Heavily influenced from https://github.com/nat/natbot
"""
| langchain/libs/langchain/langchain/chains/natbot/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/natbot/__init__.py",
"repo_id": "langchain",
"token_count": 31
} | 470 |
python_sources()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/llama_index/embeddings/voyageai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/llama_index/embeddings/voyageai/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,288 |
# Beautiful Soup Website Loader
This loader is a web scraper that fetches the text from websites using the `Beautiful Soup` (aka `bs4`) Python package. Furthermore, the flexibility of Beautiful Soup allows for custom templates that enable the loader to extract the desired text from specific website designs, such as Su... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/beautiful_soup_web/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/beautiful_soup_web/README.md",
"repo_id": "llama_index",
"token_count": 1073
} | 1,394 |
# Interesting Environments to try
Here we provide a list of interesting environments you can try to train your agents on:
## MineRL
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit12/minerl.jpg" alt="MineRL"/>
MineRL is a Python library that provides a Gym int... | deep-rl-class/units/en/unitbonus3/envs-to-try.mdx/0 | {
"file_path": "deep-rl-class/units/en/unitbonus3/envs-to-try.mdx",
"repo_id": "deep-rl-class",
"token_count": 851
} | 165 |
from langchain_community.utilities.vertexai import (
create_retry_decorator,
get_client_info,
init_vertexai,
raise_vertex_import_error,
)
__all__ = [
"create_retry_decorator",
"raise_vertex_import_error",
"init_vertexai",
"get_client_info",
]
| langchain/libs/langchain/langchain/utilities/vertexai.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/vertexai.py",
"repo_id": "langchain",
"token_count": 122
} | 599 |
package grpccoordinator
import (
"context"
"github.com/chroma/chroma-coordinator/internal/common"
"github.com/chroma/chroma-coordinator/internal/model"
"github.com/chroma/chroma-coordinator/internal/proto/coordinatorpb"
"github.com/chroma/chroma-coordinator/internal/types"
"github.com/pingcap/log"
"go.uber.org... | chroma/go/coordinator/internal/grpccoordinator/collection_service.go/0 | {
"file_path": "chroma/go/coordinator/internal/grpccoordinator/collection_service.go",
"repo_id": "chroma",
"token_count": 2491
} | 46 |
import pytest
import random
from base.client_base import TestcaseBase
from utils.util_log import test_log as log
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
prefix = "alias"
exp_name = "name"
exp_schema = "schema"
default_schema = cf.g... | milvus/tests/python_client/testcases/test_alias.py/0 | {
"file_path": "milvus/tests/python_client/testcases/test_alias.py",
"repo_id": "milvus",
"token_count": 14676
} | 2,043 |
<!--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/run_scripts.md/0 | {
"file_path": "transformers/docs/source/es/run_scripts.md",
"repo_id": "transformers",
"token_count": 6952
} | 483 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 50278,
"logprob": null,
"text": "<|prompter|>"
},
{
"id": 1276,
"logprob": -8.0234375,
"text": "What"
},
{
... | text-generation-inference/integration-tests/models/__snapshots__/test_neox_sharded/test_neox.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_neox_sharded/test_neox.json",
"repo_id": "text-generation-inference",
"token_count": 1966
} | 410 |
package proxy
import (
"context"
"github.com/cockroachdb/errors"
"github.com/milvus-io/milvus/pkg/mq/msgstream"
)
type mockMsgStream struct {
msgstream.MsgStream
asProducer func([]string)
setRepack func(repackFunc msgstream.RepackFunc)
close func()
enableProduce func(bool)
}
func (m *mockMsg... | milvus/internal/proxy/mock_msgstream_test.go/0 | {
"file_path": "milvus/internal/proxy/mock_msgstream_test.go",
"repo_id": "milvus",
"token_count": 604
} | 1,882 |
# openai
# your api key from https://platform.openai.com/account/api-keys
OPENAI_API_KEY=your_openai_api_key_here
# searchapi
# your api key from https://www.searchapi.io/
SEARCHAPI_API_KEY=your_searchapi_api_key_here
# astra db
ASTRA_DB_API_ENDPOINT=https://your_astra_db_id-your_region.apps.astra.datastax.com
ASTR... | langchain/libs/community/tests/integration_tests/.env.example/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/.env.example",
"repo_id": "langchain",
"token_count": 645
} | 340 |
# 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/deprecated/score_sde_ve/pipeline_score_sde_ve.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py",
"repo_id": "diffusers",
"token_count": 1759
} | 253 |
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
export interface OptionalImportMap {}
export interface SecretMap {
ALIBABA_API_KEY?: string;
AWS_ACCESS_KEY_ID?: string;
AWS_SECRETE_ACCESS_KEY?: string;
AWS_SECRET_ACCESS_KEY?: string;
AWS_SESSION_TOKEN?: string;
AZURE_AISEARCH_E... | langchainjs/libs/langchain-community/src/load/import_type.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/load/import_type.ts",
"repo_id": "langchainjs",
"token_count": 826
} | 1,030 |
// 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/syncmgr/taskv2_test.go/0 | {
"file_path": "milvus/internal/datanode/syncmgr/taskv2_test.go",
"repo_id": "milvus",
"token_count": 4447
} | 1,927 |
<jupyter_start><jupyter_code>!pip install -q datasets diffusers transformers accelerate torchmetrics[image]<jupyter_output><empty_output><jupyter_text>Evaluating Diffusion ModelsEvaluation of generative models like [Stable Diffusion](https://huggingface.co/docs/diffusers/stable_diffusion) is subjective in nature. But a... | notebooks/diffusers/evaluation.ipynb/0 | {
"file_path": "notebooks/diffusers/evaluation.ipynb",
"repo_id": "notebooks",
"token_count": 7554
} | 296 |
# coding=utf-8
# Copyright 2023 MURGe-Lab and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | transformers/src/transformers/models/tvlt/configuration_tvlt.py/0 | {
"file_path": "transformers/src/transformers/models/tvlt/configuration_tvlt.py",
"repo_id": "transformers",
"token_count": 3434
} | 677 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-string-iterable/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-string-iterable/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,448 |
import { z } from "zod";
import {
CallbackManager,
CallbackManagerForToolRun,
Callbacks,
parseCallbackConfigArg,
} from "./callbacks/manager.js";
import {
BaseLangChain,
type BaseLangChainParams,
} from "./language_models/base.js";
import type { RunnableConfig } from "./runnables/config.js";
import type { R... | langchainjs/langchain-core/src/tools.ts/0 | {
"file_path": "langchainjs/langchain-core/src/tools.ts",
"repo_id": "langchainjs",
"token_count": 3112
} | 860 |
import random
import time
from utils.utils import gen_collection_name
from utils.util_log import test_log as logger
import pytest
from base.testbase import TestBase
from pymilvus import (
FieldSchema, CollectionSchema, DataType,
Collection
)
@pytest.mark.L0
class TestRestfulSdkCompatibility(TestBase):
@p... | milvus/tests/restful_client/testcases/test_restful_sdk_mix_use_scenario.py/0 | {
"file_path": "milvus/tests/restful_client/testcases/test_restful_sdk_mix_use_scenario.py",
"repo_id": "milvus",
"token_count": 6505
} | 2,010 |
# The intuition behind PPO [[the-intuition-behind-ppo]]
The idea with Proximal Policy Optimization (PPO) is that we want to improve the training stability of the policy by limiting the change you make to the policy at each training epoch: **we want to avoid having too large of a policy update.**
For two reasons:
- W... | deep-rl-class/units/en/unit8/intuition-behind-ppo.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit8/intuition-behind-ppo.mdx",
"repo_id": "deep-rl-class",
"token_count": 426
} | 175 |
package indexparamcheck
import (
"github.com/cockroachdb/errors"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
)
type baseChecker struct{}
func (c baseChecker) CheckTrain(params map[string]string) error {
if !CheckIntByRange(params, DIM, DefaultMinDim, DefaultMaxDim) {
return errOutOfRange(DIM, Defaul... | milvus/pkg/util/indexparamcheck/base_checker.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/base_checker.go",
"repo_id": "milvus",
"token_count": 272
} | 1,903 |
import os
from typing import Any, Awaitable, Callable, List, Optional, Sequence
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
MessageRole,
)
def ... | llama_index/llama-index-legacy/llama_index/legacy/llms/generic_utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/generic_utils.py",
"repo_id": "llama_index",
"token_count": 4012
} | 1,733 |
import sys
from typing import Any, Dict, Generator, Optional
from unittest.mock import MagicMock
import pytest
from llama_index.legacy.core.llms.types import ChatMessage
try:
import ibm_watson_machine_learning
except ImportError:
ibm_watson_machine_learning = None
from llama_index.legacy.llms.watsonx import ... | llama_index/llama-index-legacy/tests/llms/test_watsonx.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/llms/test_watsonx.py",
"repo_id": "llama_index",
"token_count": 1151
} | 1,671 |
#!/bin/bash
# build package
PACKAGE_NAME_OVERRIDE=gpt_index python setup.py sdist bdist_wheel
# publish gpt_index package
twine upload dist/*
# NOTE: use this to test
# twine upload -r testpypi dist/*
# cleanup
rm -rf build dist *.egg-info/
| llama_index/llama-index-legacy/scripts/publish_gpt_index_package.sh/0 | {
"file_path": "llama_index/llama-index-legacy/scripts/publish_gpt_index_package.sh",
"repo_id": "llama_index",
"token_count": 88
} | 1,613 |
"""Timescale Vector Auto-retrieval Pack."""
from datetime import timedelta
from typing import Any, Dict, List, Optional
from llama_index.core.indices.vector_store import VectorStoreIndex
from llama_index.core.indices.vector_store.retrievers import (
VectorIndexAutoRetriever,
)
from llama_index.core.llama_pack.ba... | llama_index/llama-index-packs/llama-index-packs-timescale-vector-autoretrieval/llama_index/packs/timescale_vector_autoretrieval/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-timescale-vector-autoretrieval/llama_index/packs/timescale_vector_autoretrieval/base.py",
"repo_id": "llama_index",
"token_count": 1066
} | 1,691 |
"""**Vector store** stores embedded data and performs vector search.
One of the most common ways to store and search over unstructured data is to
embed it and store the resulting embedding vectors, and then query the store
and retrieve the data that are 'most similar' to the embedded query.
**Class hierarchy:**
.. c... | langchain/libs/community/langchain_community/vectorstores/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/__init__.py",
"repo_id": "langchain",
"token_count": 6352
} | 333 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/run_scripts.md/0 | {
"file_path": "transformers/docs/source/en/run_scripts.md",
"repo_id": "transformers",
"token_count": 5851
} | 501 |
use super::llama2_c::{Cache, Config};
use crate::quantized_nn::{linear_no_bias as linear, Embedding, Linear, RmsNorm};
pub use crate::quantized_var_builder::VarBuilder;
use candle::{DType, IndexOp, Module, Result, Tensor, D};
fn silu(xs: &Tensor) -> Result<Tensor> {
xs / (xs.neg()?.exp()? + 1.0)?
}
struct CausalS... | candle/candle-transformers/src/models/quantized_llama2_c.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_llama2_c.rs",
"repo_id": "candle",
"token_count": 4287
} | 80 |
# coding=utf-8
# Copyright 2022 SwitchTransformers Authors and HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | transformers/src/transformers/models/switch_transformers/modeling_switch_transformers.py/0 | {
"file_path": "transformers/src/transformers/models/switch_transformers/modeling_switch_transformers.py",
"repo_id": "transformers",
"token_count": 37581
} | 661 |
# 8. IndexCoord Design
update: 7.31.2021, by [Cai.Zhang](https://github.com/xiaocai2333)
## 8.0 Component Description
IndexCoord is a component responsible for scheduling index construction tasks and maintaining index status. IndexCoord accepts requests from rootCoord to build indexes, delete indexes, and query inde... | milvus/docs/design_docs/20210731-index_design.md/0 | {
"file_path": "milvus/docs/design_docs/20210731-index_design.md",
"repo_id": "milvus",
"token_count": 2811
} | 1,851 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/tools/llama-index-tools-database/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-database/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,565 |
# LlamaIndex Vector_Stores Integration: Chatgpt Plugin
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chatgpt-plugin/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chatgpt-plugin/README.md",
"repo_id": "llama_index",
"token_count": 15
} | 1,650 |
# coding=utf-8
# Copyright 2020 The Allen Institute for AI team 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... | transformers/src/transformers/models/longformer/modeling_tf_longformer.py/0 | {
"file_path": "transformers/src/transformers/models/longformer/modeling_tf_longformer.py",
"repo_id": "transformers",
"token_count": 55431
} | 625 |
use candle::{Result, Tensor};
use candle_nn::{layer_norm, LayerNorm, Linear, Module, VarBuilder};
#[derive(Debug)]
struct Attention {
q_proj: Linear,
k_proj: Linear,
v_proj: Linear,
out_proj: Linear,
num_heads: usize,
}
impl Attention {
fn new(
embedding_dim: usize,
num_heads: ... | candle/candle-transformers/src/models/segment_anything/transformer.rs/0 | {
"file_path": "candle/candle-transformers/src/models/segment_anything/transformer.rs",
"repo_id": "candle",
"token_count": 3597
} | 82 |
import os
from typing import Iterator, List
import pytest
from . import is_libcublas_available
@pytest.fixture(scope="module", autouse=True)
def check_spacy_model() -> Iterator[None]:
import spacy
if not spacy.util.is_package("en_core_web_lg"):
pytest.skip(reason="Spacy model 'en_core_web_lg' not i... | langchain/libs/experimental/tests/unit_tests/test_reversible_data_anonymizer.py/0 | {
"file_path": "langchain/libs/experimental/tests/unit_tests/test_reversible_data_anonymizer.py",
"repo_id": "langchain",
"token_count": 3203
} | 430 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-salesforce/llama_index/tools/salesforce/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-salesforce/llama_index/tools/salesforce/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,500 |
/* eslint-disable no-process-env */
import { test, expect } from "@jest/globals";
import { MongoClient } from "mongodb";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { AzureCosmosDBVectorStore } from "../azure_cosmosdb.js";
const DATABASE_NAME = "... | langchainjs/libs/langchain-community/src/vectorstores/tests/azure_cosmosdb.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/azure_cosmosdb.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1880
} | 995 |
import type { KVNamespace } from "@cloudflare/workers-types";
import { OpenAI } from "@langchain/openai";
import { CloudflareKVCache } from "@langchain/cloudflare";
export interface Env {
KV_NAMESPACE: KVNamespace;
OPENAI_API_KEY: string;
}
export default {
async fetch(_request: Request, env: Env) {
try {
... | langchainjs/examples/src/cache/cloudflare_kv.ts/0 | {
"file_path": "langchainjs/examples/src/cache/cloudflare_kv.ts",
"repo_id": "langchainjs",
"token_count": 342
} | 760 |
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf | langchainjs/.editorconfig/0 | {
"file_path": "langchainjs/.editorconfig",
"repo_id": "langchainjs",
"token_count": 39
} | 717 |
<jupyter_start><jupyter_text>PlayWright BrowserThis toolkit is used to interact with the browser. While other tools (like the `Requests` tools) are fine for static sites, `PlayWright Browser` toolkits let your agent navigate the web and interact with dynamically rendered sites. Some tools bundled within the `PlayWright... | langchain/docs/docs/integrations/toolkits/playwright.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/playwright.ipynb",
"repo_id": "langchain",
"token_count": 1465
} | 179 |
from typing import Any, Callable, List
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import Extra
from langchain_community.llms.self_hosted import SelfHostedPipeline
def _embed_documents(pipeline: Any, *args: Any, **kwargs: Any) -> List[List[float]]:
"""Inference function to s... | langchain/libs/community/langchain_community/embeddings/self_hosted.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/self_hosted.py",
"repo_id": "langchain",
"token_count": 1578
} | 259 |
from langchain_community.document_loaders.geodataframe import GeoDataFrameLoader
__all__ = ["GeoDataFrameLoader"]
| langchain/libs/langchain/langchain/document_loaders/geodataframe.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/geodataframe.py",
"repo_id": "langchain",
"token_count": 34
} | 481 |
import inspect
import torch
from abc import ABC, abstractmethod
from typing import List, Tuple, Optional, TypeVar, Type
from transformers import PreTrainedTokenizerBase, PretrainedConfig
from text_generation_server.models.types import Batch, Generation
from text_generation_server.utils.speculate import get_speculate
... | text-generation-inference/server/text_generation_server/models/model.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/model.py",
"repo_id": "text-generation-inference",
"token_count": 1674
} | 447 |
"""ReAct agent.
Simple wrapper around AgentRunner + ReActAgentWorker.
For the legacy implementation see:
```python
from llama_index.core.agent.legacy.react.base import ReActAgent
```
"""
from typing import (
Any,
List,
Optional,
Sequence,
Type,
)
from llama_index.core.agent.react.formatter impor... | llama_index/llama-index-core/llama_index/core/agent/react/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/agent/react/base.py",
"repo_id": "llama_index",
"token_count": 1795
} | 1,110 |
# Copyright 2020 The HuggingFace Datasets Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | datasets/src/datasets/metric.py/0 | {
"file_path": "datasets/src/datasets/metric.py",
"repo_id": "datasets",
"token_count": 11907
} | 133 |
#!/usr/bin/env python
"""Example LangChain server that shows how to customize streaming for an agent.
Example uses a RunnableLambda that:
1) Uses the agent's astream events method to create a custom streaming API endpoint.
2) Instantiates an agent with custom tools (based on the user request).
In this example, we ke... | langserve/examples/agent_custom_streaming/server.py/0 | {
"file_path": "langserve/examples/agent_custom_streaming/server.py",
"repo_id": "langserve",
"token_count": 3291
} | 1,038 |
package indexparamcheck
import (
"fmt"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/common"
)
type binaryVectorBaseChecker struct {
baseChecker
}
func (c binaryVectorBaseChecker) staticCheck(params map[string]string) error {
if !CheckStrByValues(params, Metric, BinIDM... | milvus/pkg/util/indexparamcheck/binary_vector_base_checker.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/binary_vector_base_checker.go",
"repo_id": "milvus",
"token_count": 391
} | 1,936 |
"""IndexStructType class."""
from enum import Enum
class IndexStructType(str, Enum):
"""Index struct type. Identifier for a "type" of index.
Attributes:
TREE ("tree"): Tree index. See :ref:`Ref-Indices-Tree` for tree indices.
LIST ("list"): Summary index. See :ref:`Ref-Indices-List` for summ... | llama_index/llama-index-core/llama_index/core/data_structs/struct_type.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/data_structs/struct_type.py",
"repo_id": "llama_index",
"token_count": 1938
} | 1,142 |
from typing import Any, Optional
from llama_index.legacy.storage.index_store.keyval_index_store import KVIndexStore
from llama_index.legacy.storage.kvstore.redis_kvstore import RedisKVStore
class RedisIndexStore(KVIndexStore):
"""Redis Index store.
Args:
redis_kvstore (RedisKVStore): Redis key-value... | llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/redis_index_store.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/redis_index_store.py",
"repo_id": "llama_index",
"token_count": 606
} | 1,776 |
<jupyter_start><jupyter_text>Chain of Table NotebookIn this notebook we highlight our implementation of the ["Chain of Table" paper by Wang et al.](https://arxiv.org/pdf/2401.04398v1.pdf).Chain-of-Table proposes the following: given a user query over tabular data, plan out a sequence of tabular operations over the tabl... | llama_index/llama-index-packs/llama-index-packs-tables/examples/chain_of_table.ipynb/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-tables/examples/chain_of_table.ipynb",
"repo_id": "llama_index",
"token_count": 2136
} | 1,611 |
// 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_utils.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_utils.cpp",
"repo_id": "milvus",
"token_count": 3527
} | 1,770 |
python_sources()
| llama_index/llama-index-core/llama_index/core/base/embeddings/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/base/embeddings/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,111 |
def FileTransfer (sourceFiles, remoteDirectory, remoteIP, protocol = "ftp", makeEmptyDirs = true) {
if (protocol == "ftp") {
ftpPublisher masterNodeName: '', paramPublish: [parameterName: ''], alwaysPublishFromMaster: false, continueOnError: false, failOnError: true, publishers: [
[configName: "... | milvus/tests/benchmark/ci/function/file_transfer.groovy/0 | {
"file_path": "milvus/tests/benchmark/ci/function/file_transfer.groovy",
"repo_id": "milvus",
"token_count": 279
} | 2,131 |
<jupyter_start><jupyter_text>Defining a Custom Query EngineYou can (and should) define your custom query engines in order to plug into your downstream LlamaIndex workflows, whether you're building RAG, agents, or other applications.We provide a `CustomQueryEngine` that makes it easy to define your own queries. SetupWe... | llama_index/docs/examples/query_engine/custom_query_engine.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/custom_query_engine.ipynb",
"repo_id": "llama_index",
"token_count": 1444
} | 1,208 |
<jupyter_start><jupyter_text>GitBook>[GitBook](https://docs.gitbook.com/) is a modern documentation platform where teams can document everything from products to internal knowledge bases and APIs.This notebook shows how to pull page data from any `GitBook`.<jupyter_code>from langchain_community.document_loaders import ... | langchain/docs/docs/integrations/document_loaders/gitbook.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/gitbook.ipynb",
"repo_id": "langchain",
"token_count": 310
} | 111 |
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import PromptTemplate
from langchain_core.runnables import RunnableParallel
import langchain_community.utilities.opaqueprompts as op
from langchain_community.llms import OpenAI
from langchain_community.llms.opaqueprompts import Opaqu... | langchain/libs/community/tests/integration_tests/llms/test_opaqueprompts.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_opaqueprompts.py",
"repo_id": "langchain",
"token_count": 1110
} | 358 |
from langchain_community.llms.databricks import (
Databricks,
)
__all__ = [
"Databricks",
]
| langchain/libs/langchain/langchain/llms/databricks.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/databricks.py",
"repo_id": "langchain",
"token_count": 43
} | 519 |
import logging
from typing import Any, List, Optional
import gradientai
from llama_index.core.base.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
Embedding,
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr
logger = logging.getLogger(__name__)
# For bge models that Gra... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-gradient/llama_index/embeddings/gradient/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-gradient/llama_index/embeddings/gradient/base.py",
"repo_id": "llama_index",
"token_count": 2027
} | 1,231 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/bark/test_modeling_bark.py/0 | {
"file_path": "transformers/tests/models/bark/test_modeling_bark.py",
"repo_id": "transformers",
"token_count": 23249
} | 798 |
-----BEGIN CERTIFICATE REQUEST-----
MIIC7jCCAdYCAQAwSTELMAkGA1UEBhMCQ04xEjAQBgNVBAoMCXJvbmV0aGluZzES
MBAGA1UECwwJcm9uZXRoaW5nMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwQ/qyS53J8XdpM26LcFGdtTMzjfzPoNtw
nSdfqrMi2iMZeMwDPRkHoeHE9lyHYPssDbFuLNJPLibcBCfd5SeELLlyG3GDP+W0
inUs3kE0voXbH4LmSOCKLnzw... | milvus/configs/cert/client.csr/0 | {
"file_path": "milvus/configs/cert/client.csr",
"repo_id": "milvus",
"token_count": 779
} | 1,715 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.