text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 ...
pytorch-image-models/timm/utils/metrics.py/0
{ "file_path": "pytorch-image-models/timm/utils/metrics.py", "repo_id": "pytorch-image-models", "token_count": 374 }
365
import { loadEvaluator } from "langchain/evaluation"; const customCriterion = { simplicity: "Is the language straightforward and unpretentious?", clarity: "Are the sentences clear and easy to understand?", precision: "Is the writing precise, with no unnecessary words or details?", truthfulness: "Does the writi...
langchainjs/examples/src/guides/evaluation/comparision_evaluator/pairwise_string_custom_criteria.ts/0
{ "file_path": "langchainjs/examples/src/guides/evaluation/comparision_evaluator/pairwise_string_custom_criteria.ts", "repo_id": "langchainjs", "token_count": 441 }
777
import importlib import os import fsspec import pytest from fsspec import register_implementation from fsspec.registry import _registry as _fsspec_registry from datasets.filesystems import COMPRESSION_FILESYSTEMS, extract_path_from_uri, is_remote_filesystem from .utils import require_lz4, require_zstandard def tes...
datasets/tests/test_filesystem.py/0
{ "file_path": "datasets/tests/test_filesystem.py", "repo_id": "datasets", "token_count": 1297 }
156
init_str = """from llama_index.{TYPE}.{NAME}.base import <FILL> __all__ = ["<FILL>"] """ init_with_prefix_str = """from llama_index.{PREFIX}.{TYPE}.{NAME}.base import <FILL> __all__ = ["<FILL>"] """
llama_index/llama-index-core/llama_index/core/command_line/new_package/templates/init.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/command_line/new_package/templates/init.py", "repo_id": "llama_index", "token_count": 86 }
1,166
from unittest.mock import MagicMock, Mock import pytest from langchain_community.graphs import OntotextGraphDBGraph from langchain.chains import LLMChain, OntotextGraphDBQAChain """ cd libs/langchain/tests/integration_tests/chains/docker-compose-ontotext-graphdb ./start.sh """ @pytest.mark.requires("langchain_open...
langchain/libs/langchain/tests/integration_tests/chains/test_ontotext_graphdb_qa.py/0
{ "file_path": "langchain/libs/langchain/tests/integration_tests/chains/test_ontotext_graphdb_qa.py", "repo_id": "langchain", "token_count": 6091 }
581
"""Schema for Blobs and Blob Loaders. The goal is to facilitate decoupling of content loading from content parsing code. In addition, content loading code should provide a lazy loading interface by default. """ from __future__ import annotations import contextlib import mimetypes from abc import ABC, abstractmethod ...
langchain/libs/community/langchain_community/document_loaders/blob_loaders/schema.py/0
{ "file_path": "langchain/libs/community/langchain_community/document_loaders/blob_loaders/schema.py", "repo_id": "langchain", "token_count": 2724 }
246
poetry_requirements( name="poetry", module_mapping={"weaviate-client": ["weaviate"]} )
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/BUILD", "repo_id": "llama_index", "token_count": 40 }
1,499
import DocCardList from "@theme/DocCardList"; # Agent Simulations Agent simulations involve taking multiple agents and having them interact with each other. They tend to use a simulation environment with an LLM as their "core" and helper classes to prompt them to ingest certain inputs such as prebuilt "observations"...
langchainjs/docs/core_docs/docs/use_cases/agent_simulations/index.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/use_cases/agent_simulations/index.mdx", "repo_id": "langchainjs", "token_count": 143 }
766
import argparse import torch from safetensors.torch import save_file def convert_motion_module(original_state_dict): converted_state_dict = {} for k, v in original_state_dict.items(): if "pos_encoder" in k: continue else: converted_state_dict[ k.replac...
diffusers/scripts/convert_animatediff_motion_lora_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_animatediff_motion_lora_to_diffusers.py", "repo_id": "diffusers", "token_count": 642 }
202
python_sources()
llama_index/llama-index-integrations/readers/llama-index-readers-steamship/llama_index/readers/steamship/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-steamship/llama_index/readers/steamship/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,423
import { AzureBlobStorageContainerLoader } from "langchain/document_loaders/web/azure_blob_storage_container"; const loader = new AzureBlobStorageContainerLoader({ azureConfig: { connectionString: "", container: "container_name", }, unstructuredConfig: { apiUrl: "http://localhost:8000/general/v0/gene...
langchainjs/examples/src/document_loaders/azure_blob_storage_container.ts/0
{ "file_path": "langchainjs/examples/src/document_loaders/azure_blob_storage_container.ts", "repo_id": "langchainjs", "token_count": 142 }
826
"""Test Upstash Redis cache functionality.""" import uuid import pytest from langchain_core.outputs import Generation, LLMResult import langchain from langchain.cache import UpstashRedisCache from tests.unit_tests.llms.fake_chat_model import FakeChatModel from tests.unit_tests.llms.fake_llm import FakeLLM URL = "<UP...
langchain/libs/langchain/tests/integration_tests/cache/test_upstash_redis_cache.py/0
{ "file_path": "langchain/libs/langchain/tests/integration_tests/cache/test_upstash_redis_cache.py", "repo_id": "langchain", "token_count": 1169 }
583
# Few Shot Prompt Templates Few shot prompting is a prompting technique which provides the Large Language Model (LLM) with a list of examples, and then asks the LLM to generate some text following the lead of the examples provided. An example of this is the following: Say you want your LLM to respond in a specific f...
langchainjs/docs/core_docs/docs/modules/model_io/prompts/few_shot.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/model_io/prompts/few_shot.mdx", "repo_id": "langchainjs", "token_count": 2648 }
765
<!--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/model_doc/jukebox.md/0
{ "file_path": "transformers/docs/source/en/model_doc/jukebox.md", "repo_id": "transformers", "token_count": 1219 }
456
from langchain_community.utilities.searx_search import ( SearxResults, SearxSearchWrapper, ) __all__ = ["SearxResults", "SearxSearchWrapper"]
langchain/libs/langchain/langchain/utilities/searx_search.py/0
{ "file_path": "langchain/libs/langchain/langchain/utilities/searx_search.py", "repo_id": "langchain", "token_count": 57 }
607
from langchain_community.chat_message_histories.sql import ( BaseMessageConverter, DefaultMessageConverter, SQLChatMessageHistory, ) __all__ = [ "BaseMessageConverter", "DefaultMessageConverter", "SQLChatMessageHistory", ]
langchain/libs/langchain/langchain/memory/chat_message_histories/sql.py/0
{ "file_path": "langchain/libs/langchain/langchain/memory/chat_message_histories/sql.py", "repo_id": "langchain", "token_count": 89 }
547
{ "name": "langchainjs", "version": "0.0.4", "private": true, "engines": { "node": ">=18" }, "workspaces": [ "langchain", "langchain-core", "libs/*", "examples", "docs/*" ], "repository": { "type": "git", "url": "https://github.com/langchain-ai/langchainjs.git" }, "pa...
langchainjs/package.json/0
{ "file_path": "langchainjs/package.json", "repo_id": "langchainjs", "token_count": 1143 }
988
#define MAX_THREADS_PER_BLOCK 1024 #define OPTIMAL_THREADS_PER_BLOCK 256 #define WARP_SIZE 32 #define MAX_NUM_BLOCK_X 2147483647 #define MAX_NUM_BLOCK_Y 65535 #define MAX_NUM_BLOCK_Z 65535 #define MAX_SHARED_MEM_PER_BLOCK 48000 #define FULL_MASK 0xffffffff
transformers/src/transformers/kernels/yoso/common_cuda.h/0
{ "file_path": "transformers/src/transformers/kernels/yoso/common_cuda.h", "repo_id": "transformers", "token_count": 110 }
627
<jupyter_start><jupyter_text>Elasticsearch>[Elasticsearch](https://www.elastic.co/elasticsearch/) is a distributed, RESTful search and analytics engine, capable of performing both vector and lexical search. It is built on top of the Apache Lucene library.This notebook shows how to use chat message history functionality...
langchain/docs/docs/integrations/memory/elasticsearch_chat_message_history.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/memory/elasticsearch_chat_message_history.ipynb", "repo_id": "langchain", "token_count": 852 }
125
<jupyter_start><jupyter_text>LiteLLM LiteLLM supports 100+ LLM APIs (Anthropic, Replicate, Huggingface, TogetherAI, Cohere, etc.). [Complete List](https://docs.litellm.ai/docs/providers) Call `complete` with a prompt If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_cod...
llama_index/docs/examples/llm/litellm.ipynb/0
{ "file_path": "llama_index/docs/examples/llm/litellm.ipynb", "repo_id": "llama_index", "token_count": 1478 }
1,088
# Encode Inputs <tokenizerslangcontent> <python> These types represent all the different kinds of input that a [`~tokenizers.Tokenizer`] accepts when using [`~tokenizers.Tokenizer.encode_batch`]. ## TextEncodeInput[[[[tokenizers.TextEncodeInput]]]] <code>tokenizers.TextEncodeInput</code> Represents a textual input ...
tokenizers/docs/source-doc-builder/api/encode-inputs.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/api/encode-inputs.mdx", "repo_id": "tokenizers", "token_count": 716 }
466
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/examples/t2i_adapter/test_t2i_adapter.py/0
{ "file_path": "diffusers/examples/t2i_adapter/test_t2i_adapter.py", "repo_id": "diffusers", "token_count": 682 }
212
# coding=utf-8 # Copyright 2018 Salesforce 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 # # Unless required by a...
transformers/tests/models/ctrl/test_tokenization_ctrl.py/0
{ "file_path": "transformers/tests/models/ctrl/test_tokenization_ctrl.py", "repo_id": "transformers", "token_count": 1074 }
715
# Copyright 2021 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/tests/models/speech_to_text/test_processor_speech_to_text.py/0
{ "file_path": "transformers/tests/models/speech_to_text/test_processor_speech_to_text.py", "repo_id": "transformers", "token_count": 2448 }
813
/* eslint-disable import/first */ /* eslint-disable arrow-body-style */ /* eslint-disable import/no-duplicates */ import { ChatOpenAI } from "@langchain/openai"; const chat = new ChatOpenAI({ modelName: "gpt-3.5-turbo-1106", }); import { HumanMessage, AIMessage } from "@langchain/core/messages"; import { ChatPro...
langchainjs/examples/src/use_cases/chatbots/memory_management.ts/0
{ "file_path": "langchainjs/examples/src/use_cases/chatbots/memory_management.ts", "repo_id": "langchainjs", "token_count": 2276 }
866
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { formatDocumentsAsString } from "langchain/util/document"; import { PromptTemplate } from "@langchain/core/prompts"; import { RunnableSequence, RunnablePassthrough, } from "...
langchainjs/examples/src/guides/expression_language/cookbook_conversational_retrieval.ts/0
{ "file_path": "langchainjs/examples/src/guides/expression_language/cookbook_conversational_retrieval.ts", "repo_id": "langchainjs", "token_count": 877 }
804
// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks import ( context "context" commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" internalpb "github.com/milvus-io/milvus/internal/proto/internalpb" milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" mock "github.com/stret...
milvus/internal/mocks/mock_rootcoord.go/0
{ "file_path": "milvus/internal/mocks/mock_rootcoord.go", "repo_id": "milvus", "token_count": 41550 }
1,831
"""Test WatsonxLLM API wrapper.""" import os from langchain_ibm import WatsonxLLM os.environ.pop("WATSONX_APIKEY", None) os.environ.pop("WATSONX_PROJECT_ID", None) def test_initialize_watsonxllm_bad_path_without_url() -> None: try: WatsonxLLM( model_id="google/flan-ul2", ) excep...
langchain/libs/partners/ibm/tests/unit_tests/test_llms.py/0
{ "file_path": "langchain/libs/partners/ibm/tests/unit_tests/test_llms.py", "repo_id": "langchain", "token_count": 867 }
689
from llama_index.core.llms.base import BaseLLM from llama_index.llms.monsterapi import MonsterLLM def test_embedding_class(): names_of_base_classes = [b.__name__ for b in MonsterLLM.__mro__] assert BaseLLM.__name__ in names_of_base_classes
llama_index/llama-index-integrations/llms/llama-index-llms-monsterapi/tests/test_llms_monsterapi.py/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-monsterapi/tests/test_llms_monsterapi.py", "repo_id": "llama_index", "token_count": 93 }
1,268
import math import numpy as np import torch import torch.nn as nn from torch.cuda.amp import custom_bwd, custom_fwd try: import triton import triton.language as tl from . import custom_autotune # code based https://github.com/fpgaminer/GPTQ-triton @custom_autotune.autotune( configs=[ ...
text-generation-inference/server/text_generation_server/utils/gptq/quant_linear.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/gptq/quant_linear.py", "repo_id": "text-generation-inference", "token_count": 7007 }
407
// 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_simd.cpp/0
{ "file_path": "milvus/internal/core/unittest/test_simd.cpp", "repo_id": "milvus", "token_count": 23551 }
1,769
import argparse from transformers import CLIPImageProcessor, CLIPVisionModelWithProjection from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--dump_path", default=None, type=str, required=True, help="Path to...
diffusers/scripts/convert_unclip_txt2img_to_image_variation.py/0
{ "file_path": "diffusers/scripts/convert_unclip_txt2img_to_image_variation.py", "repo_id": "diffusers", "token_count": 554 }
228
"""Simple node parser.""" from typing import Any, Callable, List, Optional, Sequence from llama_index.legacy.bridge.pydantic import Field from llama_index.legacy.callbacks.base import CallbackManager from llama_index.legacy.node_parser.interface import NodeParser from llama_index.legacy.node_parser.node_utils import ...
llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/sentence_window.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/sentence_window.py", "repo_id": "llama_index", "token_count": 2182 }
1,585
"""Init file."""
llama_index/llama-index-core/tests/mock_utils/__init__.py/0
{ "file_path": "llama_index/llama-index-core/tests/mock_utils/__init__.py", "repo_id": "llama_index", "token_count": 6 }
1,319
<jupyter_start><jupyter_code>import openai openai.api_key = "sk-key" from llama_index.agent import OpenAIAgent # Import and initialize our tool spec from llama_index.tools.code_interpreter.base import CodeInterpreterToolSpec code_spec = CodeInterpreterToolSpec() tools = code_spec.to_tool_list() # Create the Agent wi...
llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/examples/code_interpreter.ipynb/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/examples/code_interpreter.ipynb", "repo_id": "llama_index", "token_count": 715 }
1,562
<!--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...
accelerate/docs/source/concept_guides/gradient_synchronization.md/0
{ "file_path": "accelerate/docs/source/concept_guides/gradient_synchronization.md", "repo_id": "accelerate", "token_count": 2385 }
3
import json import logging from typing import Any, Dict, Iterator, List, Mapping, Optional import requests from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.outputs import GenerationChunk from langchain_core.pydantic_v1 import root_val...
langchain/libs/community/langchain_community/llms/pai_eas_endpoint.py/0
{ "file_path": "langchain/libs/community/langchain_community/llms/pai_eas_endpoint.py", "repo_id": "langchain", "token_count": 3846 }
271
from langchain_community.document_loaders.diffbot import DiffbotLoader __all__ = ["DiffbotLoader"]
langchain/libs/langchain/langchain/document_loaders/diffbot.py/0
{ "file_path": "langchain/libs/langchain/langchain/document_loaders/diffbot.py", "repo_id": "langchain", "token_count": 29 }
482
"""Agent that interacts with OpenAPI APIs via a hierarchical planning approach.""" import json import re from functools import partial from typing import Any, Callable, Dict, List, Optional, cast import yaml from langchain_core.callbacks import BaseCallbackManager from langchain_core.language_models import BaseLanguag...
langchain/libs/community/langchain_community/agent_toolkits/openapi/planner.py/0
{ "file_path": "langchain/libs/community/langchain_community/agent_toolkits/openapi/planner.py", "repo_id": "langchain", "token_count": 5336 }
212
import { AzureOpenAI } from "@langchain/azure-openai"; export const run = async () => { const model = new AzureOpenAI({ modelName: "gpt-4", temperature: 0.7, maxTokens: 1000, maxRetries: 5, }); const res = await model.invoke( "Question: What would be a good company name for a company that mak...
langchainjs/examples/src/llms/azure_openai.ts/0
{ "file_path": "langchainjs/examples/src/llms/azure_openai.ts", "repo_id": "langchainjs", "token_count": 132 }
856
# Bilibili Transcript Loader This loader utilizes the `bilibili_api` to fetch the text transcript from Bilibili, one of the most beloved long-form video sites in China. With this BilibiliTranscriptReader, users can easily obtain the transcript of their desired video content on the platform. ## Usage To use this loa...
llama_index/llama-index-integrations/readers/llama-index-readers-bilibili/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-bilibili/README.md", "repo_id": "llama_index", "token_count": 318 }
1,342
from pathlib import Path import pytest from langchain_community.document_loaders import HuggingFaceDatasetLoader HUGGING_FACE_EXAMPLE_DATASET = str( Path(__file__).parent / "sample_documents" / "sample_hugging_face_dataset.py" ) @pytest.mark.requires("datasets") @pytest.fixture def test_load_string() -> None: ...
langchain/libs/community/tests/unit_tests/document_loaders/test_hugging_face.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_hugging_face.py", "repo_id": "langchain", "token_count": 1088 }
410
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 3032 }
584
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/rootcoord/scheduler.go/0
{ "file_path": "milvus/internal/rootcoord/scheduler.go", "repo_id": "milvus", "token_count": 1487 }
1,865
# 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/encodec/test_modeling_encodec.py/0
{ "file_path": "transformers/tests/models/encodec/test_modeling_encodec.py", "repo_id": "transformers", "token_count": 11774 }
721
#include <metal_stdlib> # using namespace metal; METAL_FUNC uint get_strided_index( uint idx, constant size_t &num_dims, constant size_t *dims, constant size_t *strides ) { uint strided_i = 0; for (uint d = 0; d < num_dims; d++) { uint dim_idx = num_dims - 1 - d; strided_i += (i...
candle/candle-metal-kernels/src/ternary.metal/0
{ "file_path": "candle/candle-metal-kernels/src/ternary.metal", "repo_id": "candle", "token_count": 2209 }
59
# Stable Diffusion XL text-to-image fine-tuning The `train_text_to_image_sdxl.py` script shows how to fine-tune Stable Diffusion XL (SDXL) on your own dataset. 🚨 This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. It...
diffusers/examples/text_to_image/README_sdxl.md/0
{ "file_path": "diffusers/examples/text_to_image/README_sdxl.md", "repo_id": "diffusers", "token_count": 4086 }
221
from langchain.chains.graph_qa.cypher_utils import CypherQueryCorrector, Schema from langchain_community.chat_models import ChatOpenAI from langchain_community.graphs import Neo4jGraph from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate from langchain_core.pyd...
langchain/templates/neo4j-cypher/neo4j_cypher/chain.py/0
{ "file_path": "langchain/templates/neo4j-cypher/neo4j_cypher/chain.py", "repo_id": "langchain", "token_count": 889 }
696
--- sidebar_position: 1 --- # Streaming Some Chat models provide a streaming response. This means that instead of waiting for the entire response to be returned, you can start processing it as soon as it's available. This is useful if you want to display the response to the user as it's being generated, or if you wan...
langchainjs/docs/core_docs/docs/modules/model_io/chat/streaming.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/model_io/chat/streaming.mdx", "repo_id": "langchainjs", "token_count": 552 }
737
[package] name = "text-generation-benchmark" description = "Text Generation Benchmarking tool" version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true [lib] path = "src/lib.rs" [[bin]] name = "text-generation-benchmark" path = "src/main.rs" [dependencies] average = "0.14"...
text-generation-inference/benchmark/Cargo.toml/0
{ "file_path": "text-generation-inference/benchmark/Cargo.toml", "repo_id": "text-generation-inference", "token_count": 381 }
392
import { ChatWindow } from "@/components/ChatWindow"; export default function Home() { const InfoCard = ( <div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden"> <h1 className="text-3xl md:text-4xl mb-4"> ▲ Next.js + LangChain.js 🦜🔗 </h1> <ul> <li ...
langchain-nextjs-template/app/page.tsx/0
{ "file_path": "langchain-nextjs-template/app/page.tsx", "repo_id": "langchain-nextjs-template", "token_count": 1323 }
69
import type { YouWebSearch } from "../../types/WebSearch"; import { WebSearchProvider } from "../../types/WebSearch"; import { SERPAPI_KEY, SERPER_API_KEY, SERPSTACK_API_KEY, USE_LOCAL_WEBSEARCH, SEARXNG_QUERY_URL, YDC_API_KEY, } from "$env/static/private"; import { getJson } from "serpapi"; import type { GoogleP...
chat-ui/src/lib/server/websearch/searchWeb.ts/0
{ "file_path": "chat-ui/src/lib/server/websearch/searchWeb.ts", "repo_id": "chat-ui", "token_count": 1441 }
93
#!/usr/bin/env python # 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. ...
transformers/examples/legacy/run_swag.py/0
{ "file_path": "transformers/examples/legacy/run_swag.py", "repo_id": "transformers", "token_count": 12598 }
542
"""Tests for the various PDF parsers.""" from pathlib import Path from typing import Iterator import pytest from langchain_community.document_loaders.base import BaseBlobParser from langchain_community.document_loaders.blob_loaders import Blob from langchain_community.document_loaders.parsers.pdf import ( PDFMine...
langchain/libs/community/tests/unit_tests/document_loaders/parsers/test_pdf_parsers.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/document_loaders/parsers/test_pdf_parsers.py", "repo_id": "langchain", "token_count": 1151 }
404
"""HTML node parser.""" from typing import TYPE_CHECKING, Any, List, Optional, Sequence from llama_index.legacy.bridge.pydantic import Field from llama_index.legacy.callbacks.base import CallbackManager from llama_index.legacy.node_parser.interface import NodeParser from llama_index.legacy.node_parser.node_utils impo...
llama_index/llama-index-legacy/llama_index/legacy/node_parser/file/html.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/node_parser/file/html.py", "repo_id": "llama_index", "token_count": 1952 }
1,620
def test_power_bi_can_be_imported() -> None: """Test that powerbi tools can be imported. The goal of this test is to verify that langchain users will not get import errors when loading powerbi related code if they don't have optional dependencies installed. """ from langchain_community.tools.po...
langchain/libs/community/tests/unit_tests/tools/powerbi/test_powerbi.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/tools/powerbi/test_powerbi.py", "repo_id": "langchain", "token_count": 163 }
414
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors, The Hugging Face 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/license...
transformers/tests/models/layoutlm/test_modeling_layoutlm.py/0
{ "file_path": "transformers/tests/models/layoutlm/test_modeling_layoutlm.py", "repo_id": "transformers", "token_count": 8034 }
718
from typing import Any, Dict import yaml def set_log_file_path( log_config_path: str, new_filename: str = "chroma.log" ) -> Dict[str, Any]: """This works with the standard log_config.yml file. It will not work with custom log configs that may use different handlers""" with open(f"{log_config_path}", ...
chroma/chromadb/cli/utils.py/0
{ "file_path": "chroma/chromadb/cli/utils.py", "repo_id": "chroma", "token_count": 212 }
15
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 24.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 248 204" style="enable-background:new 0 0 248 20...
auto-evaluator/nextjs/public/twitter-black.svg/0
{ "file_path": "auto-evaluator/nextjs/public/twitter-black.svg", "repo_id": "auto-evaluator", "token_count": 621 }
2
# Copyright 2021 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/pipelines/audio_classification.py/0
{ "file_path": "transformers/src/transformers/pipelines/audio_classification.py", "repo_id": "transformers", "token_count": 3711 }
681
import ReactDOM from "react-dom/client"; import { v4 as uuidv4 } from "uuid"; import App from "./App.tsx"; import "./index.css"; if (document.cookie.indexOf("user_id") === -1) { document.cookie = `opengpts_user_id=${uuidv4()}`; } ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
opengpts/frontend/src/main.tsx/0
{ "file_path": "opengpts/frontend/src/main.tsx", "repo_id": "opengpts", "token_count": 118 }
2,142
# Copyright 2021 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/onnx/config.py/0
{ "file_path": "transformers/src/transformers/onnx/config.py", "repo_id": "transformers", "token_count": 13946 }
775
<jupyter_start><jupyter_text>CLIP Guided Stable Diffusion using [d🧨ffusers](https://github.com/huggingface/diffusers) This notebook shows how to do CLIP guidance with Stable diffusion using diffusers libray. This allows you to use newly released [CLIP models by LAION AI.](https://huggingface.co/laion).This notebook is...
notebooks/diffusers/CLIP_Guided_Stable_diffusion_with_diffusers.ipynb/0
{ "file_path": "notebooks/diffusers/CLIP_Guided_Stable_diffusion_with_diffusers.ipynb", "repo_id": "notebooks", "token_count": 9092 }
295
{ "imports": { "langchain/": "npm:/langchain/", "@langchain/community/": "npm:/@langchain/community/", "@langchain/openai": "npm:@langchain/openai", "@langchain/core/": "npm:/@langchain/core/", "dotenv/": "npm:/dotenv/", "cheerio": "npm:/cheerio", "@langchain/pinecone": "npm:@langchain/pin...
langchainjs/deno.json/0
{ "file_path": "langchainjs/deno.json", "repo_id": "langchainjs", "token_count": 316 }
714
# Vectara Self Query Retriever This example shows how to use a self query retriever with a [Vectara](https://vectara.com/) vector store. If you haven't already set up Vectara, please [follow the instructions here](/docs/integrations/vectorstores/vectara.mdx). ## Usage import IntegrationInstallTooltip from "@mdx_com...
langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/vectara-self-query.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/vectara-self-query.mdx", "repo_id": "langchainjs", "token_count": 447 }
789
# `tokenizers-win32-arm64-msvc` This is the **aarch64-pc-windows-msvc** binary for `tokenizers`
tokenizers/bindings/node/npm/win32-arm64-msvc/README.md/0
{ "file_path": "tokenizers/bindings/node/npm/win32-arm64-msvc/README.md", "repo_id": "tokenizers", "token_count": 38 }
409
from llama_index.core.llms.base import BaseLLM from llama_index.llms.litellm import LiteLLM def test_embedding_class(): names_of_base_classes = [b.__name__ for b in LiteLLM.__mro__] assert BaseLLM.__name__ in names_of_base_classes
llama_index/llama-index-integrations/llms/llama-index-llms-litellm/tests/test_llms_litellm.py/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-litellm/tests/test_llms_litellm.py", "repo_id": "llama_index", "token_count": 94 }
1,229
import glob import os from typing import Dict, List, Union import safetensors.torch import torch from huggingface_hub import snapshot_download from huggingface_hub.utils import validate_hf_hub_args from diffusers import DiffusionPipeline, __version__ from diffusers.schedulers.scheduling_utils import SCHEDULER_CONFIG_...
diffusers/examples/community/checkpoint_merger.py/0
{ "file_path": "diffusers/examples/community/checkpoint_merger.py", "repo_id": "diffusers", "token_count": 6070 }
197
# Select by length This example selector selects which examples to use based on length. This is useful when you are worried about constructing a prompt that will go over the length of the context window. For longer inputs, it will select fewer examples to include, while for shorter inputs it will select more. import ...
langchainjs/docs/core_docs/docs/modules/model_io/prompts/example_selector_types/length_based.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/model_io/prompts/example_selector_types/length_based.mdx", "repo_id": "langchainjs", "token_count": 117 }
795
module.exports = { extends: [ "airbnb-base", "eslint:recommended", "prettier", "plugin:@typescript-eslint/recommended", ], parserOptions: { ecmaVersion: 12, parser: "@typescript-eslint/parser", project: "./tsconfig.json", sourceType: "module", }, plugins: ["@typescript-eslint",...
langchainjs/libs/langchain-anthropic/.eslintrc.cjs/0
{ "file_path": "langchainjs/libs/langchain-anthropic/.eslintrc.cjs", "repo_id": "langchainjs", "token_count": 931 }
1,040
#!/usr/bin/env bash # Licensed to the LF AI & Data foundation under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you...
milvus/scripts/collect_arrow_dep.sh/0
{ "file_path": "milvus/scripts/collect_arrow_dep.sh", "repo_id": "milvus", "token_count": 1197 }
1,857
import argparse import huggingface_hub import k_diffusion as K import torch from diffusers import UNet2DConditionModel UPSCALER_REPO = "pcuenq/k-upscaler" def resnet_to_diffusers_checkpoint(resnet, checkpoint, *, diffusers_resnet_prefix, resnet_prefix): rv = { # norm1 f"{diffusers_resnet_prefi...
diffusers/scripts/convert_k_upscaler_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_k_upscaler_to_diffusers.py", "repo_id": "diffusers", "token_count": 5645 }
218
import { ConversationChain } from "langchain/chains"; import { ChatOpenAI } from "@langchain/openai"; import { ChatPromptTemplate, MessagesPlaceholder, } from "@langchain/core/prompts"; import { BufferMemory } from "langchain/memory"; const chat = new ChatOpenAI({ temperature: 0 }); const chatPrompt = ChatPromptT...
langchainjs/examples/src/chat/memory.ts/0
{ "file_path": "langchainjs/examples/src/chat/memory.ts", "repo_id": "langchainjs", "token_count": 265 }
825
import json import logging from time import time from typing import TYPE_CHECKING, Any, Dict, List, Optional from langchain_core.chat_history import BaseChatMessageHistory from langchain_core.messages import ( BaseMessage, message_to_dict, messages_from_dict, ) if TYPE_CHECKING: from elasticsearch imp...
langchain/libs/community/langchain_community/chat_message_histories/elasticsearch.py/0
{ "file_path": "langchain/libs/community/langchain_community/chat_message_histories/elasticsearch.py", "repo_id": "langchain", "token_count": 3213 }
220
// 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_integer_overflow.cpp/0
{ "file_path": "milvus/internal/core/unittest/test_integer_overflow.cpp", "repo_id": "milvus", "token_count": 6908 }
1,677
import { ChatOpenAI } from "@langchain/openai"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { HttpResponseOutputParser } from "langchain/output_parsers"; const TEMPLATE = `You are a pirate named Patchy. All responses must be extremely verbose and in pirate dialect. {input}`; const prompt = C...
langchainjs/examples/src/guides/deployment/error_handling.ts/0
{ "file_path": "langchainjs/examples/src/guides/deployment/error_handling.ts", "repo_id": "langchainjs", "token_count": 533 }
816
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/rootcoord/create_db_task_test.go/0
{ "file_path": "milvus/internal/rootcoord/create_db_task_test.go", "repo_id": "milvus", "token_count": 1398 }
1,782
package querycoord import ( "fmt" "github.com/cockroachdb/errors" "github.com/golang/protobuf/proto" "github.com/samber/lo" "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" "github.com/milvus-io/milvus/internal/kv" "github.com/milvus-io/milvus/internal/proto/querypb" ) var ErrInvalidKey = errors.New("i...
milvus/internal/metastore/kv/querycoord/kv_catalog.go/0
{ "file_path": "milvus/internal/metastore/kv/querycoord/kv_catalog.go", "repo_id": "milvus", "token_count": 2483 }
1,996
# coding=utf-8 # Copyright 2021 the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
transformers/tests/models/auto/test_processor_auto.py/0
{ "file_path": "transformers/tests/models/auto/test_processor_auto.py", "repo_id": "transformers", "token_count": 9296 }
745
try: import pydantic.v1 as pydantic from pydantic.v1 import ( BaseConfig, BaseModel, Field, PrivateAttr, StrictFloat, StrictInt, StrictStr, create_model, root_validator, validator, ) from pydantic.v1.error_wrappers import Va...
llama_index/llama-index-legacy/llama_index/legacy/bridge/pydantic.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/bridge/pydantic.py", "repo_id": "llama_index", "token_count": 527 }
1,691
# candle-flash-attn
candle/candle-flash-attn/README.md/0
{ "file_path": "candle/candle-flash-attn/README.md", "repo_id": "candle", "token_count": 8 }
48
from typing import Any, Dict, List, cast from hypothesis import given, settings, HealthCheck import pytest from chromadb.api import ServerAPI from chromadb.test.property import invariants from chromadb.api.types import ( Document, Embedding, Embeddings, GetResult, IDs, Metadata, Metadatas, ...
chroma/chromadb/test/property/test_filtering.py/0
{ "file_path": "chroma/chromadb/test/property/test_filtering.py", "repo_id": "chroma", "token_count": 5288 }
24
import pytest from langchain_core.agents import ( AgentActionMessageLog, AgentFinish, ) from langchain_core.exceptions import OutputParserException from langchain_core.messages import AIMessage, SystemMessage from langchain.agents.output_parsers.openai_functions import ( OpenAIFunctionsAgentOutputParser, )...
langchain/libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py/0
{ "file_path": "langchain/libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py", "repo_id": "langchain", "token_count": 1178 }
599
from enum import Enum from typing import List, Tuple, Union Offsets = Tuple[int, int] TextInputSequence = str """A :obj:`str` that represents an input sequence """ PreTokenizedInputSequence = Union[List[str], Tuple[str]] """A pre-tokenized input sequence. Can be one of: - A :obj:`List` of :obj:`str` - A :o...
tokenizers/bindings/python/py_src/tokenizers/__init__.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/__init__.py", "repo_id": "tokenizers", "token_count": 984 }
402
# rag-self-query This template performs RAG using the self-query retrieval technique. The main idea is to let an LLM convert unstructured queries into structured queries. See the [docs for more on how this works](https://python.langchain.com/docs/modules/data_connection/retrievers/self_query). ## Environment Setup I...
langchain/templates/rag-self-query/README.md/0
{ "file_path": "langchain/templates/rag-self-query/README.md", "repo_id": "langchain", "token_count": 899 }
745
<!--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/generation_strategies.md/0
{ "file_path": "transformers/docs/source/ja/generation_strategies.md", "repo_id": "transformers", "token_count": 8929 }
540
// 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/unittest/test_utils/c_api_test_utils.h/0
{ "file_path": "milvus/internal/core/unittest/test_utils/c_api_test_utils.h", "repo_id": "milvus", "token_count": 2531 }
1,760
# flake8: noqa import os import warnings from typing import Any, Dict, List, Optional, Union from langchain_core.callbacks import BaseCallbackHandler from langchain_core.agents import AgentAction, AgentFinish from langchain_core.outputs import LLMResult class DeepEvalCallbackHandler(BaseCallbackHandler): """Call...
langchain/libs/community/langchain_community/callbacks/confident_callback.py/0
{ "file_path": "langchain/libs/community/langchain_community/callbacks/confident_callback.py", "repo_id": "langchain", "token_count": 2914 }
229
<jupyter_start><jupyter_text>Baidu QianfanBaidu AI Cloud Qianfan Platform is a one-stop large model development and service operation platform for enterprise developers. Qianfan not only provides including the model of Wenxin Yiyan (ERNIE-Bot) and the third-party open-source models, but also provides various AI develop...
langchain/docs/docs/integrations/text_embedding/baidu_qianfan_endpoint.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/text_embedding/baidu_qianfan_endpoint.ipynb", "repo_id": "langchain", "token_count": 932 }
167
<jupyter_start><jupyter_text>PubMed>[PubMed®](https://pubmed.ncbi.nlm.nih.gov/) comprises more than 35 million citations for biomedical literature from `MEDLINE`, life science journals, and online books. Citations may include links to full text content from PubMed Central and publisher web sites.This notebook goes over...
langchain/docs/docs/integrations/tools/pubmed.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/tools/pubmed.ipynb", "repo_id": "langchain", "token_count": 156 }
177
.. _Ref-Indices-Table: Table Index =========== Building the Keyword Table Index .. automodule:: llama_index.core.indices.keyword_table :members: :inherited-members:
llama_index/docs/api_reference/indices/table.rst/0
{ "file_path": "llama_index/docs/api_reference/indices/table.rst", "repo_id": "llama_index", "token_count": 62 }
1,091
import pytest from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel, CheckTasks from utils.util_pymilvus import * from deploy.base import TestDeployBase from deploy import common as dc from deploy.common import gen_index_param, gen_search_param default_nb =...
milvus/tests/python_client/deploy/testcases/test_action_before_reinstall.py/0
{ "file_path": "milvus/tests/python_client/deploy/testcases/test_action_before_reinstall.py", "repo_id": "milvus", "token_count": 1636 }
1,977
import { Milvus } from "@langchain/community/vectorstores/milvus"; import { OpenAIEmbeddings } from "@langchain/openai"; export const run = async () => { const vectorStore = await Milvus.fromTexts( ["Hello world", "Bye bye", "hello nice world"], [{ id: 2 }, { id: 1 }, { id: 3 }], new OpenAIEmbeddings() ...
langchainjs/examples/src/indexes/vector_stores/milvus.ts/0
{ "file_path": "langchainjs/examples/src/indexes/vector_stores/milvus.ts", "repo_id": "langchainjs", "token_count": 148 }
876
const defaultTheme = require("tailwindcss/defaultTheme"); const colors = require("tailwindcss/colors"); import dotenv from "dotenv"; dotenv.config({ path: "./.env" }); /** @type {import('tailwindcss').Config} */ export default { darkMode: "class", content: ["./src/**/*.{html,js,svelte,ts}"], theme: { extend: { ...
chat-ui/tailwind.config.cjs/0
{ "file_path": "chat-ui/tailwind.config.cjs", "repo_id": "chat-ui", "token_count": 276 }
107
# Display Trace Links [![Open In GitHub](https://img.shields.io/badge/GitHub-View%20source-green.svg)](https://github.com/langchain-ai/langsmith-cookbook/tree/main/./tracing-examples/show-trace-url-streamlit/README.md) When developing, adding a trace link in your UI can help you save time debugging. In this walkthr...
langsmith-cookbook/tracing-examples/show-trace-url-streamlit/README.md/0
{ "file_path": "langsmith-cookbook/tracing-examples/show-trace-url-streamlit/README.md", "repo_id": "langsmith-cookbook", "token_count": 492 }
1,064
from typing import Any, Sequence, Union from langchain_core.load.serializable import Serializable from langchain_core.runnables import RunnableBinding, RunnableConfig, RunnableLambda from langchain_core.tools import BaseTool INVALID_TOOL_MSG_TEMPLATE = ( "{requested_tool_name} is not a valid tool, " "try one ...
langgraph/langgraph/prebuilt/tool_executor.py/0
{ "file_path": "langgraph/langgraph/prebuilt/tool_executor.py", "repo_id": "langgraph", "token_count": 1050 }
1,038
<!--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/ja/tasks/sequence_classification.md/0
{ "file_path": "transformers/docs/source/ja/tasks/sequence_classification.md", "repo_id": "transformers", "token_count": 10645 }
553
"""Steamship Utils.""" from __future__ import annotations import uuid from typing import TYPE_CHECKING if TYPE_CHECKING: from steamship import Block, Steamship def make_image_public(client: Steamship, block: Block) -> str: """Upload a block to a signed URL and return the public URL.""" try: from...
langchain/libs/community/langchain_community/tools/steamship_image_generation/utils.py/0
{ "file_path": "langchain/libs/community/langchain_community/tools/steamship_image_generation/utils.py", "repo_id": "langchain", "token_count": 647 }
317
use serde::Deserialize; #[derive(Deserialize)] pub(crate) struct GrpcSysDbConfig { pub(crate) host: String, pub(crate) port: u16, } #[derive(Deserialize)] pub(crate) enum SysDbConfig { Grpc(GrpcSysDbConfig), }
chroma/rust/worker/src/sysdb/config.rs/0
{ "file_path": "chroma/rust/worker/src/sysdb/config.rs", "repo_id": "chroma", "token_count": 100 }
62
# coding=utf-8 # Copyright 2021 Google AI, Google Brain and the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
transformers/src/transformers/models/fnet/tokenization_fnet_fast.py/0
{ "file_path": "transformers/src/transformers/models/fnet/tokenization_fnet_fast.py", "repo_id": "transformers", "token_count": 3566 }
635