text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
import { LlamaCppEmbeddings } from "@langchain/community/embeddings/llama_cpp";
const llamaPath = "/Replace/with/path/to/your/model/gguf-llama2-q4_0.bin";
const documents = ["Hello World!", "Bye Bye!"];
const embeddings = new LlamaCppEmbeddings({
modelPath: llamaPath,
});
const res = await embeddings.embedDocumen... | langchainjs/examples/src/embeddings/llama_cpp_docs.ts/0 | {
"file_path": "langchainjs/examples/src/embeddings/llama_cpp_docs.ts",
"repo_id": "langchainjs",
"token_count": 163
} | 789 |
from __future__ import annotations
import json
from pathlib import Path
from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Union
import yaml
from langchain_experimental.data_anonymizer.base import (
DEFAULT_DEANONYMIZER_MATCHING_STRATEGY,
AnonymizerBase,
ReversibleAnonymizerBase,
)
from la... | langchain/libs/experimental/langchain_experimental/data_anonymizer/presidio.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/data_anonymizer/presidio.py",
"repo_id": "langchain",
"token_count": 7331
} | 447 |
import { models } from "$lib/server/models";
export async function GET() {
const res = models.map((model) => ({
id: model.id,
name: model.name,
websiteUrl: model.websiteUrl,
modelUrl: model.modelUrl,
datasetName: model.datasetName,
datasetUrl: model.datasetUrl,
displayName: model.displayName,
descript... | chat-ui/src/routes/api/models/+server.ts/0 | {
"file_path": "chat-ui/src/routes/api/models/+server.ts",
"repo_id": "chat-ui",
"token_count": 193
} | 101 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | accelerate/tests/test_multigpu.py/0 | {
"file_path": "accelerate/tests/test_multigpu.py",
"repo_id": "accelerate",
"token_count": 2340
} | 19 |
<jupyter_start><jupyter_text>---sidebar_position: 3title: "RunnableBranch: Dynamically route logic based on input"keywords: [RunnableBranch, LCEL]--- Dynamically route logic based on inputThis notebook covers how to do routing in the LangChain Expression Language.Routing allows you to create non-deterministic chains w... | langchain/docs/docs/expression_language/how_to/routing.ipynb/0 | {
"file_path": "langchain/docs/docs/expression_language/how_to/routing.ipynb",
"repo_id": "langchain",
"token_count": 1237
} | 92 |
from langchain_community.document_loaders import __all__
EXPECTED_ALL = [
"AcreomLoader",
"AsyncHtmlLoader",
"AsyncChromiumLoader",
"AZLyricsLoader",
"AcreomLoader",
"AirbyteCDKLoader",
"AirbyteGongLoader",
"AirbyteJSONLoader",
"AirbyteHubspotLoader",
"AirbyteSalesforceLoader",
... | langchain/libs/community/tests/unit_tests/document_loaders/test_imports.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_imports.py",
"repo_id": "langchain",
"token_count": 1923
} | 402 |
# Migrating
## 🚨Breaking Changes for select chains (SQLDatabase) on 7/28/23
In an effort to make `langchain` leaner and safer, we are moving select chains to `langchain_experimental`.
This migration has already started, but we are remaining backwards compatible until 7/28.
On that date, we will remove functionality ... | langchain/MIGRATE.md/0 | {
"file_path": "langchain/MIGRATE.md",
"repo_id": "langchain",
"token_count": 525
} | 73 |
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.chroma import ChromaVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in ChromaVectorStore.__mro__]
assert BasePydanticVectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/tests/test_vector_stores_chroma.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/tests/test_vector_stores_chroma.py",
"repo_id": "llama_index",
"token_count": 100
} | 1,519 |
Knowledge Graph Retriever
==========================
.. automodule:: llama_index.core.indices.knowledge_graph.retrievers
:members:
:inherited-members:
.. :exclude-members: index_struct, query, set_llm_predictor, set_prompt_helper
| llama_index/docs/api_reference/query/retrievers/kg.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/retrievers/kg.rst",
"repo_id": "llama_index",
"token_count": 84
} | 1,061 |
"""Global eval handlers."""
from typing import Any
from llama_index.legacy.callbacks.argilla_callback import argilla_callback_handler
from llama_index.legacy.callbacks.arize_phoenix_callback import (
arize_phoenix_callback_handler,
)
from llama_index.legacy.callbacks.base_handler import BaseCallbackHandler
from l... | llama_index/llama-index-legacy/llama_index/legacy/callbacks/global_handlers.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/callbacks/global_handlers.py",
"repo_id": "llama_index",
"token_count": 763
} | 1,581 |
import { Bedrock } from "@langchain/community/llms/bedrock";
// Or, from web environments:
// import { Bedrock } from "@langchain/community/llms/bedrock/web";
// If no credentials are provided, the default credentials from
// @aws-sdk/credential-provider-node will be used.
const model = new Bedrock({
model: "ai21.j2... | langchainjs/examples/src/models/llm/bedrock.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/bedrock.ts",
"repo_id": "langchainjs",
"token_count": 277
} | 841 |
from typing import Dict, List
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools import BaseTool
from langchain_community.tools.clickup.prompt import (
CLICKUP_FOLDER_CREATE_PROMPT,
CLICKUP_GET_ALL_TEAMS_PROMPT,
CLICKUP_GET_FOLDERS_PROMPT,
CLICKUP_GET_LIST_PR... | langchain/libs/community/langchain_community/agent_toolkits/clickup/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/clickup/toolkit.py",
"repo_id": "langchain",
"token_count": 1901
} | 204 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/util/wrappers/qn_wrapper.go/0 | {
"file_path": "milvus/internal/util/wrappers/qn_wrapper.go",
"repo_id": "milvus",
"token_count": 2371
} | 1,908 |
"""List-based data structures."""
| llama_index/llama-index-core/tests/indices/list/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/tests/indices/list/__init__.py",
"repo_id": "llama_index",
"token_count": 9
} | 1,230 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/segcore/Utils.h/0 | {
"file_path": "milvus/internal/core/src/segcore/Utils.h",
"repo_id": "milvus",
"token_count": 2829
} | 1,937 |
#ifndef _util_h
#define _util_h
#define DBGS(__x) printf("%s\n", __x)
#define DBGI(__x) printf("%s: %i\n", #__x, __x)
#define DBGI2(__x, __y) printf("%s, %s: %i, %i\n", #__x, #__y, __x, __y)
#define DBGI3(__x, __y, __z) printf("%s, %s, %s: %i, %i, %i\n", #__x, #__y, #__z, __x, __y, __z)
#define DBGF(__x) printf("%s: %... | text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cpp/util.h/0 | {
"file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cpp/util.h",
"repo_id": "text-generation-inference",
"token_count": 296
} | 421 |
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
import { OpenAI } from "@langchain/openai";
import { Tool } from "@langchain/core/tools";
import { PromptTemplate } from "@langchain/core/prompts";
import { LLMChain } from "../chains/llm_chain.js";
import type { SqlDatabase } from ... | langchainjs/langchain/src/tools/sql.ts/0 | {
"file_path": "langchainjs/langchain/src/tools/sql.ts",
"repo_id": "langchainjs",
"token_count": 1907
} | 943 |
"""Test simple web reader."""
import string
from random import choice
import pytest
from llama_index.legacy.readers import SimpleWebPageReader
try:
import html2text
except ImportError:
html2text = None # type: ignore
@pytest.mark.skipif(html2text is None, reason="html2text not installed")
def test_error_4... | llama_index/llama-index-legacy/tests/readers/test_simplewebreader.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/readers/test_simplewebreader.py",
"repo_id": "llama_index",
"token_count": 519
} | 1,631 |
# 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/src/transformers/models/layoutxlm/tokenization_layoutxlm.py/0 | {
"file_path": "transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm.py",
"repo_id": "transformers",
"token_count": 26109
} | 635 |
from typing import Any, Iterator, Mapping, Optional, Sequence, Union
from langgraph.channels.base import BaseChannel
from langgraph.pregel.log import logger
def map_input(
input_channels: Union[str, Sequence[str]],
chunk: Optional[Union[dict[str, Any], Any]],
) -> Iterator[tuple[str, Any]]:
"""Map input ... | langgraph/langgraph/pregel/io.py/0 | {
"file_path": "langgraph/langgraph/pregel/io.py",
"repo_id": "langgraph",
"token_count": 577
} | 1,120 |
<!---
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 ... | transformers/examples/pytorch/summarization/README.md/0 | {
"file_path": "transformers/examples/pytorch/summarization/README.md",
"repo_id": "transformers",
"token_count": 2586
} | 553 |
from typing import List, Tuple
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad import format_to_openai_function_messages
from langchain.agents.output_parsers import OpenAIFunctionsAgentOutputParser
from langchain.utilities.tavily_search import TavilySearchAPIWrapper
from langchain_co... | langchain/templates/openai-functions-agent/openai_functions_agent/agent.py/0 | {
"file_path": "langchain/templates/openai-functions-agent/openai_functions_agent/agent.py",
"repo_id": "langchain",
"token_count": 865
} | 674 |
[
"unknown",
"n<1K",
"1K<n<10K",
"10K<n<100K",
"100K<n<1M",
"1M<n<10M",
"10M<n<100M",
"100M<n<1B",
"1B<n<10B",
"10B<n<100B",
"100B<n<1T",
"n>1T"
]
| datasets/src/datasets/utils/resources/size_categories.json/0 | {
"file_path": "datasets/src/datasets/utils/resources/size_categories.json",
"repo_id": "datasets",
"token_count": 124
} | 137 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | transformers/src/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py/0 | {
"file_path": "transformers/src/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py",
"repo_id": "transformers",
"token_count": 3122
} | 760 |
// 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/datacoord/meta_util.go/0 | {
"file_path": "milvus/internal/datacoord/meta_util.go",
"repo_id": "milvus",
"token_count": 878
} | 1,913 |
<!--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 applicable law or agreed... | diffusers/docs/source/ko/training/adapt_a_model.md/0 | {
"file_path": "diffusers/docs/source/ko/training/adapt_a_model.md",
"repo_id": "diffusers",
"token_count": 1826
} | 189 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-timescalevector/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-timescalevector/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,626 |
# 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 ... | datasets/metrics/coval/coval.py/0 | {
"file_path": "datasets/metrics/coval/coval.py",
"repo_id": "datasets",
"token_count": 5730
} | 124 |
import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
import { BaseMemory } from "@langchain/core/memory";
import { ChainValues } from "@langchain/core/utils/types";
abstract class BaseChain {
memory?: BaseMemory;
/**
* Run the core logic of this chain and return the output
*/
ab... | langchainjs/examples/src/chains/advanced_subclass.ts/0 | {
"file_path": "langchainjs/examples/src/chains/advanced_subclass.ts",
"repo_id": "langchainjs",
"token_count": 231
} | 844 |
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/query_engine/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/query_engine/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,229 |
<jupyter_start><jupyter_text>Nuclia>[Nuclia](https://nuclia.com) automatically indexes your unstructured data from any internal and external source, providing optimized search results and generative answers. It can handle video and audio transcription, image content extraction, and document parsing.>The `Nuclia Underst... | langchain/docs/docs/integrations/document_loaders/nuclia.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/nuclia.ipynb",
"repo_id": "langchain",
"token_count": 635
} | 107 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-opendal/llama_index/readers/opendal/s3/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-opendal/llama_index/readers/opendal/s3/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,498 |
"""Init file."""
from llama_index.readers.docstring_walker.base import DocstringWalker
__all__ = ["DocstringWalker"]
| llama_index/llama-index-integrations/readers/llama-index-readers-docstring-walker/llama_index/readers/docstring_walker/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-docstring-walker/llama_index/readers/docstring_walker/__init__.py",
"repo_id": "llama_index",
"token_count": 37
} | 1,353 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/patchtst/configuration_patchtst.py/0 | {
"file_path": "transformers/src/transformers/models/patchtst/configuration_patchtst.py",
"repo_id": "transformers",
"token_count": 4842
} | 725 |
{
"name": "example-browser",
"version": "1.0.1",
"description": "example app",
"keywords": [],
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"parcel": "^2.6.0",
"process": "^0.11.10"
},
"dependencies": {
"chromadb": "file:../.."
},
"scripts": {
"dev": "parcel ./index.... | chroma/clients/js/examples/browser/package.json/0 | {
"file_path": "chroma/clients/js/examples/browser/package.json",
"repo_id": "chroma",
"token_count": 184
} | 30 |
# coding=utf-8
# Copyright 2022 Meta Platforms authors and 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/LI... | transformers/src/transformers/models/flava/modeling_flava.py/0 | {
"file_path": "transformers/src/transformers/models/flava/modeling_flava.py",
"repo_id": "transformers",
"token_count": 41498
} | 619 |
---
sidebar_label: Anthropic
---
# ChatAnthropic
LangChain supports Anthropic's Claude family of chat models.
## Usage
import AnthropicLegacy from "@examples/models/chat/integration_anthropic_legacy.ts";
<CodeBlock language="typescript">{AnthropicLegacy}</CodeBlock>
## ChatAnthropicMessages
LangChain also offers... | langchainjs/docs/core_docs/docs/integrations/chat/anthropic.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/chat/anthropic.mdx",
"repo_id": "langchainjs",
"token_count": 347
} | 696 |
from llama_index.vector_stores.zep.base import ZepVectorStore
__all__ = ["ZepVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/llama_index/vector_stores/zep/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/llama_index/vector_stores/zep/__init__.py",
"repo_id": "llama_index",
"token_count": 32
} | 1,483 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "embeddings/llama_cpp",
});
export * from "@langchain/community/embeddings/llama_cpp";
| langchainjs/langchain/src/embeddings/llama_cpp.ts/0 | {
"file_path": "langchainjs/langchain/src/embeddings/llama_cpp.ts",
"repo_id": "langchainjs",
"token_count": 78
} | 875 |
"""Example implementation of a LangChain Agent."""
import logging
from datetime import datetime
from functools import partial
import streamlit as st
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad import format_to_openai_functions
from langchain.agents.output_parsers.openai_functions... | langsmith-cookbook/feedback-examples/streamlit-agent/main.py/0 | {
"file_path": "langsmith-cookbook/feedback-examples/streamlit-agent/main.py",
"repo_id": "langsmith-cookbook",
"token_count": 2594
} | 1,096 |
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { test } from "@jest/globals";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { LlamaCpp } from "../llama_cpp.js";
const llamaPath = getEnvironmentVariable("LLAMA_PATH")!;
test.skip("Test Llama_CPP", async () => {
const... | langchainjs/libs/langchain-community/src/llms/tests/llama_cpp.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/tests/llama_cpp.int.test.ts",
"repo_id": "langchainjs",
"token_count": 509
} | 994 |
use crate::quantized_nn::{layer_norm_no_bias, linear_no_bias, Embedding, Linear};
pub use crate::quantized_var_builder::VarBuilder;
/// MPT model used by replit-code-v1_5-3b
/// https://huggingface.co/replit/replit-code-v1_5-3b/blob/main/modeling_mpt.py
use candle::{IndexOp, Module, Result, Tensor, D};
use candle_nn::L... | candle/candle-transformers/src/models/quantized_mpt.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_mpt.rs",
"repo_id": "candle",
"token_count": 3728
} | 74 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2024 Harutatsu Akiyama 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.... | diffusers/examples/instruct_pix2pix/train_instruct_pix2pix_sdxl.py/0 | {
"file_path": "diffusers/examples/instruct_pix2pix/train_instruct_pix2pix_sdxl.py",
"repo_id": "diffusers",
"token_count": 23330
} | 208 |
version: '3.8'
services:
redis:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning
redis-vectorsearch:
image: redis/redis-stack-server:latest
restart: always
ports:
- '6378:6379'
command: redis-stack-server
... | langchainjs/test-int-deps-docker-compose.yml/0 | {
"file_path": "langchainjs/test-int-deps-docker-compose.yml",
"repo_id": "langchainjs",
"token_count": 425
} | 1,071 |
# order by contributions
reviewers:
- czs007
- DragonDriver
- xiaocai2333
- bigsheeper
- scsven
approvers:
- maintainers
| milvus/internal/indexnode/OWNERS/0 | {
"file_path": "milvus/internal/indexnode/OWNERS",
"repo_id": "milvus",
"token_count": 52
} | 1,792 |
import functools
import sys
from io import StringIO
from typing import Any, Dict, List, Optional, Tuple
from llama_index.core.agent import ReActAgent
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.llms.openai import OpenAI
from llama_index.tools.arxiv import ArxivToolSpec
from llama_index.... | llama_index/llama-index-packs/llama-index-packs-gradio-react-agent-chatbot/llama_index/packs/gradio_react_agent_chatbot/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-gradio-react-agent-chatbot/llama_index/packs/gradio_react_agent_chatbot/base.py",
"repo_id": "llama_index",
"token_count": 2305
} | 1,659 |
[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 = ["NomicEmbedding", "NomicHFEmbedding"]
contains_example = false
import_path = "llama_index.... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-nomic/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-nomic/pyproject.toml",
"repo_id": "llama_index",
"token_count": 695
} | 1,270 |
import pytest
@pytest.fixture(scope="module")
def flash_neox_sharded_handle(launcher):
with launcher("OpenAssistant/oasst-sft-1-pythia-12b", num_shard=2) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_neox_sharded(flash_neox_sharded_handle):
await flash_neox_sharded_handle.h... | text-generation-inference/integration-tests/models/test_flash_neox_sharded.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_neox_sharded.py",
"repo_id": "text-generation-inference",
"token_count": 491
} | 430 |
[
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 589,
"logprob": null,
"text": "def"
},
{
"id": 1459,
"logprob": -5.6289062,
"text": " prin... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_load.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_load.json",
"repo_id": "text-generation-inference",
"token_count": 5176
} | 386 |
<jupyter_start><jupyter_text>Zep Fast, Scalable Building Blocks for LLM AppsZep is an open source platform for productionizing LLM apps. Go from a prototypebuilt in LangChain or LlamaIndex, or a custom app, to production in minutes withoutrewriting code.Key Features:- **Fast!** Zep operates independently of the your ch... | langchain/docs/docs/integrations/memory/zep_memory.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/memory/zep_memory.ipynb",
"repo_id": "langchain",
"token_count": 3178
} | 126 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/whisper/tokenization_whisper.py/0 | {
"file_path": "transformers/src/transformers/models/whisper/tokenization_whisper.py",
"repo_id": "transformers",
"token_count": 25136
} | 692 |
from langchain_community.graphs.networkx_graph import (
KG_TRIPLE_DELIMITER,
KnowledgeTriple,
NetworkxEntityGraph,
get_entities,
parse_triples,
)
__all__ = [
"KG_TRIPLE_DELIMITER",
"KnowledgeTriple",
"parse_triples",
"get_entities",
"NetworkxEntityGraph",
]
| langchain/libs/langchain/langchain/graphs/networkx_graph.py/0 | {
"file_path": "langchain/libs/langchain/langchain/graphs/networkx_graph.py",
"repo_id": "langchain",
"token_count": 137
} | 555 |
<!--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/multilingual.md/0 | {
"file_path": "transformers/docs/source/es/multilingual.md",
"repo_id": "transformers",
"token_count": 3036
} | 505 |
from enum import Enum
from typing import Dict, Type
from llama_index.legacy.storage.docstore.mongo_docstore import MongoDocumentStore
from llama_index.legacy.storage.docstore.simple_docstore import SimpleDocumentStore
from llama_index.legacy.storage.docstore.types import BaseDocumentStore
class DocumentStoreType(str... | llama_index/llama-index-legacy/llama_index/legacy/storage/docstore/registry.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/storage/docstore/registry.py",
"repo_id": "llama_index",
"token_count": 257
} | 1,603 |
from langchain_community.document_loaders.wikipedia import WikipediaLoader
__all__ = ["WikipediaLoader"]
| langchain/libs/langchain/langchain/document_loaders/wikipedia.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/wikipedia.py",
"repo_id": "langchain",
"token_count": 26
} | 503 |
<jupyter_start><jupyter_text>ChatGPT Plugin>[OpenAI plugins](https://platform.openai.com/docs/plugins/introduction) connect ChatGPT to third-party applications. These plugins enable ChatGPT to interact with APIs defined by developers, enhancing ChatGPT's capabilities and allowing it to perform a wide range of actions.>... | langchain/docs/docs/integrations/retrievers/chatgpt-plugin.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/chatgpt-plugin.ipynb",
"repo_id": "langchain",
"token_count": 703
} | 154 |
# langchain-google-genai
This package contains the LangChain integrations for Gemini through their generative-ai SDK.
## Installation
```bash
pip install -U langchain-google-genai
```
### Image utilities
To use image utility methods, like loading images from GCS urls, install with extras group 'images':
```bash
pi... | langchain/libs/partners/google-genai/README.md/0 | {
"file_path": "langchain/libs/partners/google-genai/README.md",
"repo_id": "langchain",
"token_count": 627
} | 621 |
# Main classes
## DatasetInfo
[[autodoc]] datasets.DatasetInfo
## Dataset
The base class [`Dataset`] implements a Dataset backed by an Apache Arrow table.
[[autodoc]] datasets.Dataset
- add_column
- add_item
- from_file
- from_buffer
- from_pandas
- from_dict
- from_generator
- dat... | datasets/docs/source/package_reference/main_classes.mdx/0 | {
"file_path": "datasets/docs/source/package_reference/main_classes.mdx",
"repo_id": "datasets",
"token_count": 1908
} | 119 |
import { loadChain } from "langchain/chains/load";
export const run = async () => {
const chain = await loadChain("lc://chains/hello-world/chain.json");
const res = chain.call({ topic: "foo" });
console.log(res);
};
| langchainjs/examples/src/chains/load_from_hub.ts/0 | {
"file_path": "langchainjs/examples/src/chains/load_from_hub.ts",
"repo_id": "langchainjs",
"token_count": 71
} | 789 |
from langchain_core.pydantic_v1 import BaseModel
class AttributeInfo(BaseModel):
"""Information about a data source attribute."""
name: str
description: str
type: str
class Config:
"""Configuration for this pydantic object."""
arbitrary_types_allowed = True
frozen = True... | langchain/libs/langchain/langchain/chains/query_constructor/schema.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/query_constructor/schema.py",
"repo_id": "langchain",
"token_count": 111
} | 467 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
is_transformers_version,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_tr... | diffusers/src/diffusers/pipelines/musicldm/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/musicldm/__init__.py",
"repo_id": "diffusers",
"token_count": 559
} | 229 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.mongodb import SimpleMongoReader
def test_class():
names_of_base_classes = [b.__name__ for b in SimpleMongoReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/tests/test_readers_mongo.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mongodb/tests/test_readers_mongo.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,356 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/task/task.go/0 | {
"file_path": "milvus/internal/querycoordv2/task/task.go",
"repo_id": "milvus",
"token_count": 3493
} | 1,983 |
-----BEGIN CERTIFICATE REQUEST-----
MIIC7jCCAdYCAQAwSTELMAkGA1UEBhMCQ04xEjAQBgNVBAoMCXJvbmV0aGluZzES
MBAGA1UECwwJcm9uZXRoaW5nMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyI7d/ni5FxZxdMclJtjMIL2Kjx24XTHGc
cgSR7uyZg4AWY0OweuL/3jTlQ23Nylqcx9pJyTVx/84zmPMdkPIO8rdaxKjq4e3G
fDdPx/wXA2h6dFkY9Q/Hv61i... | milvus/configs/cert/server.csr/0 | {
"file_path": "milvus/configs/cert/server.csr",
"repo_id": "milvus",
"token_count": 810
} | 1,622 |
package dao
import (
"github.com/chroma/chroma-coordinator/internal/metastore/db/dbmodel"
"gorm.io/gorm"
)
type notificationDb struct {
db *gorm.DB
}
var _ dbmodel.INotificationDb = ¬ificationDb{}
func (s *notificationDb) DeleteAll() error {
return s.db.Where("1 = 1").Delete(&dbmodel.Notification{}).Error
}
... | chroma/go/coordinator/internal/metastore/db/dao/notification.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/db/dao/notification.go",
"repo_id": "chroma",
"token_count": 408
} | 45 |
from langchain import graphs
from tests.unit_tests import assert_all_importable
EXPECTED_ALL = [
"MemgraphGraph",
"NetworkxEntityGraph",
"Neo4jGraph",
"NebulaGraph",
"NeptuneGraph",
"KuzuGraph",
"HugeGraph",
"RdfGraph",
"ArangoGraph",
"FalkorDBGraph",
]
def test_all_imports() ... | langchain/libs/langchain/tests/unit_tests/graphs/test_imports.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/graphs/test_imports.py",
"repo_id": "langchain",
"token_count": 179
} | 606 |
"""Util that calls Golden."""
import json
from typing import Dict, Optional
import requests
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
GOLDEN_BASE_URL = "https://golden.com"
GOLDEN_TIMEOUT = 5000
class GoldenQueryAPIWrapper(BaseModel... | langchain/libs/community/langchain_community/utilities/golden_query.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/golden_query.py",
"repo_id": "langchain",
"token_count": 810
} | 318 |
# Milvus Code of Conduct
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, lev... | milvus/CODE_OF_CONDUCT.md/0 | {
"file_path": "milvus/CODE_OF_CONDUCT.md",
"repo_id": "milvus",
"token_count": 733
} | 1,689 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/distributed/querycoord/service.go/0 | {
"file_path": "milvus/internal/distributed/querycoord/service.go",
"repo_id": "milvus",
"token_count": 5574
} | 1,800 |
use core::slice;
use std::ffi::{c_char, c_void, CStr};
use crate::{
data_type::TantivyDataType,
index_writer::IndexWriterWrapper,
util::{create_binding, free_binding},
};
#[no_mangle]
pub extern "C" fn tantivy_create_index(
field_name: *const c_char,
data_type: TantivyDataType,
path: *const c_... | milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/index_writer_c.rs/0 | {
"file_path": "milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/index_writer_c.rs",
"repo_id": "milvus",
"token_count": 1622
} | 1,680 |
""" Dataset reader for webdataset
Hacked together by / Copyright 2022 Ross Wightman
"""
import io
import json
import logging
import math
import os
import random
import sys
from dataclasses import dataclass
from functools import partial
from itertools import islice
from typing import Any, Callable, Dict, List, Optional... | pytorch-image-models/timm/data/readers/reader_wds.py/0 | {
"file_path": "pytorch-image-models/timm/data/readers/reader_wds.py",
"repo_id": "pytorch-image-models",
"token_count": 7878
} | 360 |
python_sources()
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/postprocessor/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/postprocessor/BUILD",
"repo_id": "llama_index",
"token_count": 22
} | 1,227 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/videomae/test_modeling_videomae.py/0 | {
"file_path": "transformers/tests/models/videomae/test_modeling_videomae.py",
"repo_id": "transformers",
"token_count": 7450
} | 741 |
use anyhow::Result;
use candle::{DType, Device, IndexOp, Tensor, D};
fn to_vec3_round(t: Tensor, digits: i32) -> Result<Vec<Vec<Vec<f32>>>> {
let b = 10f32.powi(digits);
let t = t.to_vec3::<f32>()?;
let t = t
.iter()
.map(|t| {
t.iter()
.map(|t| t.iter().map(|t| ... | candle/candle-flash-attn/tests/flash_attn_tests.rs/0 | {
"file_path": "candle/candle-flash-attn/tests/flash_attn_tests.rs",
"repo_id": "candle",
"token_count": 2787
} | 50 |
from typing import Any, List
class MockEncoder:
def encode(self, to_encode: str) -> str:
return "[encoded]" + to_encode
class MockEncoderReturnsList:
def encode(self, to_encode: Any) -> List:
if isinstance(to_encode, str):
return [1.0, 2.0]
elif isinstance(to_encode, List... | langchain/libs/experimental/tests/unit_tests/rl_chain/test_utils.py/0 | {
"file_path": "langchain/libs/experimental/tests/unit_tests/rl_chain/test_utils.py",
"repo_id": "langchain",
"token_count": 194
} | 441 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "retrievers/databerry",
});
export * from "@langchain/community/retrievers/databerry";
| langchainjs/langchain/src/retrievers/databerry.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/databerry.ts",
"repo_id": "langchainjs",
"token_count": 76
} | 915 |
import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage } from "@langchain/core/messages";
const model = new ChatOpenAI({ temperature: 1 });
const controller = new AbortController();
// Call `controller.abort()` somewhere to cancel the request.
const res = await model.invoke(
[
new HumanMessage(
... | langchainjs/examples/src/models/chat/chat_cancellation.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/chat_cancellation.ts",
"repo_id": "langchainjs",
"token_count": 156
} | 862 |
"""Test loading functionality."""
import os
from contextlib import contextmanager
from pathlib import Path
from typing import Iterator
import pytest
from langchain_core.prompts.few_shot import FewShotPromptTemplate
from langchain_core.prompts.loading import load_prompt
from langchain_core.prompts.prompt import Prompt... | langchain/libs/core/tests/unit_tests/prompts/test_loading.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/prompts/test_loading.py",
"repo_id": "langchain",
"token_count": 2809
} | 429 |
# coding=utf-8
# Copyright 2022 Microsoft Research Asia 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/markuplm/modeling_markuplm.py/0 | {
"file_path": "transformers/src/transformers/models/markuplm/modeling_markuplm.py",
"repo_id": "transformers",
"token_count": 25061
} | 688 |
package proxy
import (
"github.com/cockroachdb/errors"
"github.com/milvus-io/milvus/internal/proto/planpb"
)
func ParseExprFromPlan(plan *planpb.PlanNode) (*planpb.Expr, error) {
node := plan.GetNode()
if node == nil {
return nil, errors.New("can't get expr from empty plan node")
}
var expr *planpb.Expr
s... | milvus/internal/proxy/expr_checker.go/0 | {
"file_path": "milvus/internal/proxy/expr_checker.go",
"repo_id": "milvus",
"token_count": 1196
} | 1,879 |
# Copyright 2021 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 ... | datasets/metrics/ter/ter.py/0 | {
"file_path": "datasets/metrics/ter/ter.py",
"repo_id": "datasets",
"token_count": 3966
} | 124 |
import {
Typesense,
TypesenseConfig,
} from "@langchain/community/vectorstores/typesense";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Client } from "typesense";
import { Document } from "@langchain/core/documents";
const vectorTypesenseClient = new Client({
nodes: [
{
// Ideally sho... | langchainjs/examples/src/indexes/vector_stores/typesense.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/typesense.ts",
"repo_id": "langchainjs",
"token_count": 1084
} | 790 |
# Datadog Logs
>[Datadog](https://www.datadoghq.com/) is a monitoring and analytics platform for cloud-scale applications.
## Installation and Setup
```bash
pip install datadog_api_client
```
We must initialize the loader with the Datadog API key and APP key, and we need to set up the query to extract the desired l... | langchain/docs/docs/integrations/providers/datadog_logs.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/datadog_logs.mdx",
"repo_id": "langchain",
"token_count": 152
} | 145 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | transformers/examples/flax/summarization/run_summarization_flax.py/0 | {
"file_path": "transformers/examples/flax/summarization/run_summarization_flax.py",
"repo_id": "transformers",
"token_count": 18177
} | 538 |
exclude = ["node_modules/**/*.toml"]
# https://taplo.tamasfe.dev/configuration/formatter-options.html
[formatting]
align_entries = true
indent_tables = true
reorder_keys = true
| tokenizers/bindings/node/.taplo.toml/0 | {
"file_path": "tokenizers/bindings/node/.taplo.toml",
"repo_id": "tokenizers",
"token_count": 66
} | 424 |
from langchain_community.tools.steamship_image_generation.tool import (
ModelName,
SteamshipImageGenerationTool,
)
__all__ = ["ModelName", "SteamshipImageGenerationTool"]
| langchain/libs/langchain/langchain/tools/steamship_image_generation/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/steamship_image_generation/tool.py",
"repo_id": "langchain",
"token_count": 60
} | 570 |
.PHONY: proto
proto_python:
@echo "Generating gRPC code for python..."
@python -m grpc_tools.protoc -I ./ --python_out=. --pyi_out=. --grpc_python_out=. ./chromadb/proto/*.proto
@mv chromadb/proto/*.py ../chromadb/proto/
@mv chromadb/proto/*.pyi ../chromadb/proto/
@echo "Done"
proto_go:
@echo "Generating gRPC c... | chroma/idl/makefile/0 | {
"file_path": "chroma/idl/makefile",
"repo_id": "chroma",
"token_count": 398
} | 55 |
"""Download loader from Llama Hub.
NOTE: using `download_loader` is now deprecated.
Please do `pip install llama-index-reader-<reader_name>` instead.
"""
import json
import os
from typing import Optional, Type
from deprecated import deprecated
from llama_index.core.download.integration import download_integration
... | llama_index/llama-index-core/llama_index/core/readers/download.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/readers/download.py",
"repo_id": "llama_index",
"token_count": 932
} | 1,214 |
import argparse
import logging
import math
import os
import random
from pathlib import Path
import jax
import jax.numpy as jnp
import numpy as np
import optax
import PIL
import torch
import torch.utils.checkpoint
import transformers
from flax import jax_utils
from flax.training import train_state
from flax.training.co... | diffusers/examples/textual_inversion/textual_inversion_flax.py/0 | {
"file_path": "diffusers/examples/textual_inversion/textual_inversion_flax.py",
"repo_id": "diffusers",
"token_count": 11076
} | 214 |
#!/usr/bin/env bash
python run_common_voice.py \
--model_name_or_path="facebook/wav2vec2-large-xlsr-53" \
--dataset_config_name="tr" \
--output_dir=./wav2vec2-large-xlsr-turkish-demo \
--overwrite_output_dir \
--num_train_epochs="5" \
--per_device_train_batch_size="16" \
--evaluation_strateg... | transformers/examples/research_projects/wav2vec2/finetune_wav2vec2_xlsr_turkish.sh/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/finetune_wav2vec2_xlsr_turkish.sh",
"repo_id": "transformers",
"token_count": 316
} | 559 |
import { BaseChatMessageHistory } from "@langchain/core/chat_history";
import {
BaseMemory,
InputValues,
OutputValues,
getInputValue,
getOutputValue,
} from "@langchain/core/memory";
import { ChatMessageHistory } from "../stores/message/in_memory.js";
/**
* Interface for the input parameters of the BaseChat... | langchainjs/libs/langchain-community/src/memory/chat_memory.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/memory/chat_memory.ts",
"repo_id": "langchainjs",
"token_count": 612
} | 996 |
# Q&A with RAG
## Overview
One of the most powerful applications enabled by LLMs is sophisticated question-answering (Q&A) chatbots.
These are applications that can answer questions about specific source information.
These applications use a technique known as Retrieval Augmented Generation, or RAG.
### What is RAG?... | langchainjs/docs/core_docs/docs/use_cases/question_answering/index.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/question_answering/index.mdx",
"repo_id": "langchainjs",
"token_count": 973
} | 743 |
[tool.poetry]
name = "pirate-speak"
version = "0.0.1"
description = "Get started with a simple template that speaks like a pirate"
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
openai = "<2"
langchain-community = "^0.0.7"
langchain-core = "^0.1.4"
[tool.poetry.group.dev.dependen... | langchain/templates/pirate-speak/pyproject.toml/0 | {
"file_path": "langchain/templates/pirate-speak/pyproject.toml",
"repo_id": "langchain",
"token_count": 289
} | 676 |
//! RepVGG inference implementation
//!
//! See "RepVGG: Making VGG-style ConvNets Great Again" Ding et al. 2021
//! https://arxiv.org/abs/2101.03697
use candle::{Result, Tensor, D};
use candle_nn::{
batch_norm, conv2d_no_bias, linear, BatchNorm, Conv2d, Conv2dConfig, Func, VarBuilder,
};
const CHANNELS_PER_STAGE... | candle/candle-transformers/src/models/repvgg.rs/0 | {
"file_path": "candle/candle-transformers/src/models/repvgg.rs",
"repo_id": "candle",
"token_count": 4371
} | 68 |
label: "Cookbook"
position: 5
| langchainjs/docs/core_docs/docs/expression_language/cookbook/_category_.yml/0 | {
"file_path": "langchainjs/docs/core_docs/docs/expression_language/cookbook/_category_.yml",
"repo_id": "langchainjs",
"token_count": 11
} | 746 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | transformers/examples/research_projects/performer/run_mlm_performer.py/0 | {
"file_path": "transformers/examples/research_projects/performer/run_mlm_performer.py",
"repo_id": "transformers",
"token_count": 11399
} | 550 |
import tempfile
import torch
from diffusers import PNDMScheduler
from .test_schedulers import SchedulerCommonTest
class PNDMSchedulerTest(SchedulerCommonTest):
scheduler_classes = (PNDMScheduler,)
forward_default_kwargs = (("num_inference_steps", 50),)
def get_scheduler_config(self, **kwargs):
... | diffusers/tests/schedulers/test_scheduler_pndm.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_pndm.py",
"repo_id": "diffusers",
"token_count": 4654
} | 290 |
package model
import (
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus/internal/proto/indexpb"
"github.com/milvus-io/milvus/pkg/common"
)
type SegmentIndex struct {
SegmentID int64
CollectionID int64
PartitionID int64
NumRows int64
IndexID int64
BuildID ... | milvus/internal/metastore/model/segment_index.go/0 | {
"file_path": "milvus/internal/metastore/model/segment_index.go",
"repo_id": "milvus",
"token_count": 1548
} | 1,863 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/clipseg/configuration_clipseg.py/0 | {
"file_path": "transformers/src/transformers/models/clipseg/configuration_clipseg.py",
"repo_id": "transformers",
"token_count": 8277
} | 592 |
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
<siteinfo>
<sitename>Text Wiki</sitename>
<dbname>test123... | langchain/libs/community/tests/unit_tests/document_loaders/sample_documents/mwtest_current_pages.xml/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/sample_documents/mwtest_current_pages.xml",
"repo_id": "langchain",
"token_count": 3490
} | 368 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.