text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# How Proxy Reduce the Multiple Search Results?
## Search Results 的组织形式
假设对于某个特定的 Search 请求,该 Search 请求 nq = 2,topk = 10,Proxy 收到来自 Query Nodes 的 4 份 Search Result。
每一份 Search Result 都是 nq \* topk 的二维结构,如下图所示,该结果表示用户输入了 nq 个向量,希望分别获取和这 nq 个向量最相似的 topk 个向量。

... | milvus/docs/developer_guides/proxy-reduce-cn.md/0 | {
"file_path": "milvus/docs/developer_guides/proxy-reduce-cn.md",
"repo_id": "milvus",
"token_count": 1471
} | 1,911 |
from abc import ABC, abstractmethod
from inspect import signature
from typing import List, Optional, Sequence, Union
from langchain_core.documents import BaseDocumentTransformer, Document
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.runnables.config import run_in_executor
from langchain.callba... | langchain/libs/langchain/langchain/retrievers/document_compressors/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/document_compressors/base.py",
"repo_id": "langchain",
"token_count": 1603
} | 538 |
from llama_index.vector_stores.awadb.base import AwaDBVectorStore
__all__ = ["AwaDBVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-awadb/llama_index/vector_stores/awadb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-awadb/llama_index/vector_stores/awadb/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,507 |
<!--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/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/{{cookiecutter.lowercase_modelname}}.md/0 | {
"file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/{{cookiecutter.lowercase_modelname}}.md",
"repo_id": "transformers",
"token_count": 2170
} | 700 |
# LlamaIndex Program Integration: Guidance
| llama_index/llama-index-integrations/program/llama-index-program-guidance/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/program/llama-index-program-guidance/README.md",
"repo_id": "llama_index",
"token_count": 10
} | 1,269 |
python_sources()
| llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/llama_index/llms/azure_openai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/llama_index/llms/azure_openai/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,344 |
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none">
<path
fill="#FFD21E"
d="M4 15.55C4 9.72 8.72 5 14.55 5h4.11a9.34 9.34 0 1 1 0 18.68H7.58l-2.89 2.8a.41.41 0 0 1-.69-.3V15.55Z"
/>
<path
fill="#32343D"
d="M19.63 12.48c.37.14.52.9.9.7.71-.38.98-1.27.6-1.98a1.46 1.46 0 0 0-1.98-.61 1.4... | chat-ui/static/huggingchat/logo.svg/0 | {
"file_path": "chat-ui/static/huggingchat/logo.svg",
"repo_id": "chat-ui",
"token_count": 523
} | 117 |
# 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/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 6600
} | 750 |
# coding=utf-8
# Copyright 2023 The Salesforce 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/instructblip/modeling_instructblip.py/0 | {
"file_path": "transformers/src/transformers/models/instructblip/modeling_instructblip.py",
"repo_id": "transformers",
"token_count": 29777
} | 700 |
from __future__ import annotations
import re
from enum import Enum
from typing import Any, Dict, List, Mapping, Optional, Union
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers import BaseOutputParser
from langchain_core.prompts import BasePromptTemplate
from langchain_c... | langchain/libs/langchain/langchain/evaluation/criteria/eval_chain.py/0 | {
"file_path": "langchain/libs/langchain/langchain/evaluation/criteria/eval_chain.py",
"repo_id": "langchain",
"token_count": 8849
} | 529 |
<jupyter_start><jupyter_text>Tair Vector Store In this notebook we are going to show a quick demo of using the TairVectorStore. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-vector-stores-tair
!pip install llama-index
import os
import sy... | llama_index/docs/examples/vector_stores/TairIndexDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/TairIndexDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1128
} | 1,138 |
import { it, expect } from "@jest/globals";
import { SearchResult, TextContentsOptions } from "exa-js";
import { _getMetadata } from "../retrievers.js";
it("should exclude the text field from metadata", () => {
const dummyResult: SearchResult<{ text: TextContentsOptions }> = {
title: "title",
url: "https://e... | langchainjs/libs/langchain-exa/src/tests/retrievers.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-exa/src/tests/retrievers.test.ts",
"repo_id": "langchainjs",
"token_count": 194
} | 1,032 |
# Minio Reader
## Install
`pip install llama-index-readers-minio`
## Import
`from llama_index.readers.minio import MinioReader, BotoMinioReader`
| llama_index/llama-index-integrations/readers/llama-index-readers-minio/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-minio/README.md",
"repo_id": "llama_index",
"token_count": 55
} | 1,410 |
#include "cuda_utils.cuh"
#include<stdint.h>
#define WHERE_OP(TYPENAME, ID_TYPENAME, FN_NAME) \
extern "C" __global__ void FN_NAME( \
const size_t numel, \
const size_t num_dims, \
const size_t *info, \
const ID_TYPENAME *ids, \
const TYPENAME *t, \
const TYPENAME *f, \
TYPENAME *out \
) ... | candle/candle-kernels/src/ternary.cu/0 | {
"file_path": "candle/candle-kernels/src/ternary.cu",
"repo_id": "candle",
"token_count": 1159
} | 53 |
from typing import TYPE_CHECKING
from ..utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_flax_available,
is_k_diffusion_available,
is_librosa_available,
is_note_seq_available,
is_onnx_available,
is_torch_available,
... | diffusers/src/diffusers/pipelines/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/__init__.py",
"repo_id": "diffusers",
"token_count": 9906
} | 229 |
from llama_index.packs.panel_chatbot.base import PanelChatPack
__all__ = ["PanelChatPack"]
| llama_index/llama-index-packs/llama-index-packs-panel-chatbot/llama_index/packs/panel_chatbot/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-panel-chatbot/llama_index/packs/panel_chatbot/__init__.py",
"repo_id": "llama_index",
"token_count": 30
} | 1,715 |
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
const text = `<!DOCTYPE html>
<html>
<head>
<title>🦜️🔗 LangChain</title>
<style>
body {
font-family: Arial, sans-serif;
}
h1 {
color: darkblue;
}
</style>
</head>
<body>
<div>
... | langchainjs/examples/src/indexes/html_text_splitter.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/html_text_splitter.ts",
"repo_id": "langchainjs",
"token_count": 929
} | 823 |
import argparse
import datetime
import functools
import json
import os
from typing import Literal, Optional, Union
import weaviate
from langchain import load as langchain_load
from langchain.chat_models import ChatAnthropic, ChatOpenAI
from langchain.embeddings import OpenAIEmbeddings
from langchain.output_parsers imp... | chat-langchain/_scripts/evaluate_chains_improved_chain.py/0 | {
"file_path": "chat-langchain/_scripts/evaluate_chains_improved_chain.py",
"repo_id": "chat-langchain",
"token_count": 3319
} | 6 |
# 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/mgp_str/configuration_mgp_str.py/0 | {
"file_path": "transformers/src/transformers/models/mgp_str/configuration_mgp_str.py",
"repo_id": "transformers",
"token_count": 2316
} | 657 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/pipelines/test_pipelines_zero_shot_audio_classification.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_zero_shot_audio_classification.py",
"repo_id": "transformers",
"token_count": 1482
} | 856 |
# Streamlit
> **[Streamlit](https://streamlit.io/) is a faster way to build and share data apps.**
> Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front‑end experience required.
> See more examples at [streamlit.io/generative-ai](https://streamlit.io/generative-ai).
[![Open i... | langchain/docs/docs/integrations/callbacks/streamlit.md/0 | {
"file_path": "langchain/docs/docs/integrations/callbacks/streamlit.md",
"repo_id": "langchain",
"token_count": 1002
} | 96 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/models/rag/test_retrieval_rag.py/0 | {
"file_path": "transformers/tests/models/rag/test_retrieval_rag.py",
"repo_id": "transformers",
"token_count": 6761
} | 764 |
from llama_index.embeddings.voyageai.base import VoyageEmbedding
__all__ = ["VoyageEmbedding"]
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/llama_index/embeddings/voyageai/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/llama_index/embeddings/voyageai/__init__.py",
"repo_id": "llama_index",
"token_count": 36
} | 1,276 |
[pytest]
addopts = --host localhost --html=/tmp/ci_logs/report.html --self-contained-html -v
# python3 -W ignore -m pytest
log_format = [%(asctime)s - %(levelname)s - %(name)s]: %(message)s (%(filename)s:%(lineno)s)
log_date_format = %Y-%m-%d %H:%M:%S
filterwarnings =
ignore::DeprecationWarning | milvus/tests/python_client/pytest.ini/0 | {
"file_path": "milvus/tests/python_client/pytest.ini",
"repo_id": "milvus",
"token_count": 132
} | 2,125 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py",
"repo_id": "diffusers",
"token_count": 2148
} | 248 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
clientv3 "go.etcd.io/etcd/client/v3"
mock "github.com/stretchr/testify/mock"
predicates "github.com/milvus-io/milvus/internal/kv/predicates"
)
// WatchKV is an autogenerated mock type for the WatchKV type
type WatchKV struct {
mock.Mock
... | milvus/internal/kv/mocks/watch_kv.go/0 | {
"file_path": "milvus/internal/kv/mocks/watch_kv.go",
"repo_id": "milvus",
"token_count": 10531
} | 1,796 |
[tool.poetry]
name = "self-query-qdrant"
version = "0.1.0"
description = "Self-querying retriever using Qdrant"
authors = ["Kacper Łukawski <lukawski.kacper@gmail.com>"]
license = "Apache 2.0"
readme = "README.md"
packages = [{include = "self_query_qdrant"}]
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
langchain ... | langchain/templates/self-query-qdrant/pyproject.toml/0 | {
"file_path": "langchain/templates/self-query-qdrant/pyproject.toml",
"repo_id": "langchain",
"token_count": 376
} | 676 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/utils/check_tf_ops.py/0 | {
"file_path": "transformers/utils/check_tf_ops.py",
"repo_id": "transformers",
"token_count": 1302
} | 811 |
import logging
import sys
from config.log_config import log_config
class TestLog:
def __init__(self, logger, log_debug, log_file, log_err, log_worker):
self.logger = logger
self.log_debug = log_debug
self.log_file = log_file
self.log_err = log_err
self.log_worker = log_wor... | milvus/tests/restful_client/utils/util_log.py/0 | {
"file_path": "milvus/tests/restful_client/utils/util_log.py",
"repo_id": "milvus",
"token_count": 930
} | 1,913 |
### Ingest code - you may need to run this the first time
import os
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_community.document_loaders import WebBaseLoader
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores import MomentoVectorInd... | langchain/templates/rag-momento-vector-index/rag_momento_vector_index/ingest.py/0 | {
"file_path": "langchain/templates/rag-momento-vector-index/rag_momento_vector_index/ingest.py",
"repo_id": "langchain",
"token_count": 501
} | 701 |
# 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/albert/modeling_flax_albert.py/0 | {
"file_path": "transformers/src/transformers/models/albert/modeling_flax_albert.py",
"repo_id": "transformers",
"token_count": 17754
} | 568 |
python_tests(
name="tests",
)
| llama_index/llama-index-finetuning/tests/openai/BUILD/0 | {
"file_path": "llama_index/llama-index-finetuning/tests/openai/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,239 |
# Shopify Tool
This tool acts as a custom app for Shopify stores, allowing the Agent to execute GraphQL queries to gather information or perform mutations against the Shopify store.
## Usage
This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tre... | llama_index/llama-index-integrations/tools/llama-index-tools-shopify/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-shopify/README.md",
"repo_id": "llama_index",
"token_count": 810
} | 1,527 |
{
"extends": "@tsconfig/recommended",
"compilerOptions": {
"outDir": "../dist",
"rootDir": "./src",
"target": "ES2021",
"lib": [
"ES2021",
"ES2022.Object",
"DOM"
],
"module": "ES2020",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"declaration": true,... | langchainjs/libs/langchain-anthropic/tsconfig.json/0 | {
"file_path": "langchainjs/libs/langchain-anthropic/tsconfig.json",
"repo_id": "langchainjs",
"token_count": 308
} | 1,041 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class AudioDiffusionPipeline(metaclass=DummyObject):
_backends = ["torch", "librosa"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torch", "librosa"])
... | diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py",
"repo_id": "diffusers",
"token_count": 397
} | 261 |
# Load
Your data can be stored in various places; they can be on your local machine's disk, in a Github repository, and in in-memory data structures like Python dictionaries and Pandas DataFrames. Wherever a dataset is stored, 🤗 Datasets can help you load it.
This guide will show you how to load a dataset from:
- T... | datasets/docs/source/loading.mdx/0 | {
"file_path": "datasets/docs/source/loading.mdx",
"repo_id": "datasets",
"token_count": 7158
} | 122 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/momento_vector_index",
});
export * from "@langchain/community/vectorstores/momento_vector_index";
| langchainjs/langchain/src/vectorstores/momento_vector_index.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/momento_vector_index.ts",
"repo_id": "langchainjs",
"token_count": 80
} | 1,004 |
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
| langchain-template-supabase/supabase/.env.example/0 | {
"file_path": "langchain-template-supabase/supabase/.env.example",
"repo_id": "langchain-template-supabase",
"token_count": 19
} | 70 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-retry-engine-weaviate/llama_index/packs/retry_engine_weaviate/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-retry-engine-weaviate/llama_index/packs/retry_engine_weaviate/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,815 |
# MixNet
**MixNet** is a type of convolutional neural network discovered via AutoML that utilises [MixConvs](https://paperswithcode.com/method/mixconv) instead of regular [depthwise convolutions](https://paperswithcode.com/method/depthwise-convolution).
## How do I use this model on an image?
To load a pretrained mod... | pytorch-image-models/docs/models/mixnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/mixnet.md",
"repo_id": "pytorch-image-models",
"token_count": 2681
} | 354 |
/// Inspired by https://github.com/orhun/rust-tui-template/blob/472aa515119d4c94903eac12d9784417281dc7f5/src/event.rs
use crossterm::event;
use std::time::{Duration, Instant};
use tokio::sync::{broadcast, mpsc};
/// Events
#[derive(Debug)]
pub(crate) enum Event {
/// Terminal tick.
Tick,
/// Key press.
... | text-generation-inference/benchmark/src/event.rs/0 | {
"file_path": "text-generation-inference/benchmark/src/event.rs",
"repo_id": "text-generation-inference",
"token_count": 922
} | 368 |
[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 = ["ObsidianReader"]
contains_example = false
import_path = "llama_index.readers.obsidian"
[... | llama_index/llama-index-integrations/readers/llama-index-readers-obsidian/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-obsidian/pyproject.toml",
"repo_id": "llama_index",
"token_count": 663
} | 1,495 |
# 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/focalnet/test_modeling_focalnet.py/0 | {
"file_path": "transformers/tests/models/focalnet/test_modeling_focalnet.py",
"repo_id": "transformers",
"token_count": 7564
} | 733 |
from __future__ import annotations
import asyncio
import concurrent.futures
from collections import defaultdict, deque
from functools import partial
from typing import (
Any,
AsyncIterator,
Awaitable,
Callable,
Iterator,
Mapping,
Optional,
Sequence,
Type,
Union,
cast,
ov... | langgraph/langgraph/pregel/__init__.py/0 | {
"file_path": "langgraph/langgraph/pregel/__init__.py",
"repo_id": "langgraph",
"token_count": 15481
} | 1,005 |
#!/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/start_cluster.sh/0 | {
"file_path": "milvus/scripts/start_cluster.sh",
"repo_id": "milvus",
"token_count": 686
} | 1,986 |
"""Helper functions for deprecating parts of the LangChain API.
This module was adapted from matplotlibs _api/deprecation.py module:
https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/_api/deprecation.py
.. warning::
This module is for internal use only. Do not use it in your own code.
We ma... | langchain/libs/core/langchain_core/_api/deprecation.py/0 | {
"file_path": "langchain/libs/core/langchain_core/_api/deprecation.py",
"repo_id": "langchain",
"token_count": 6342
} | 409 |
from langchain.chains.query_constructor.base import AttributeInfo
metadata_field_info=[
AttributeInfo(
name="id",
description="The ID of the episode",
type="string",
),
]
document_content_description = "Information about Lex Fridman podcast episodes" | auto-evaluator/streamlit/self_query_retriever_lex.py/0 | {
"file_path": "auto-evaluator/streamlit/self_query_retriever_lex.py",
"repo_id": "auto-evaluator",
"token_count": 104
} | 4 |
"""Test Bedrock chat model."""
from typing import Any
import pytest
from langchain_core.callbacks import CallbackManager
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
from langchain_core.outputs import ChatGeneration, LLMResult
from langchain_community.chat_models import BedrockChat
fro... | langchain/libs/community/tests/integration_tests/chat_models/test_bedrock.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/chat_models/test_bedrock.py",
"repo_id": "langchain",
"token_count": 1655
} | 318 |
from __future__ import annotations
import json
import logging
import time
from typing import List, Optional
import requests
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import validator
from langchain_community.tools.edenai.edenai_base_tool import EdenaiTool
logger ... | langchain/libs/community/langchain_community/tools/edenai/audio_speech_to_text.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/edenai/audio_speech_to_text.py",
"repo_id": "langchain",
"token_count": 1453
} | 284 |
# Code Interpreter Tool
This tool can be used to run python scripts and capture the results of stdout and stderr
WARNING: This tool provides the Agent access to the `subprocess.run` command.
Arbitrary code execution is possible on the machine running this tool.
This tool is not recommended to be used in a production ... | llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/README.md",
"repo_id": "llama_index",
"token_count": 328
} | 1,617 |
from copy import deepcopy
from unittest.case import TestCase
import pytest
from datasets.arrow_dataset import Dataset
from datasets.features import Audio, ClassLabel, Features, Image, Sequence, Value
from datasets.info import DatasetInfo
from datasets.tasks import (
AudioClassification,
AutomaticSpeechRecogni... | datasets/tests/test_tasks.py/0 | {
"file_path": "datasets/tests/test_tasks.py",
"repo_id": "datasets",
"token_count": 4249
} | 154 |
from enum import Enum
from typing import Any, Dict, List, Type
from langchain_core.exceptions import OutputParserException
from langchain_core.output_parsers import BaseOutputParser
from langchain_core.pydantic_v1 import root_validator
class EnumOutputParser(BaseOutputParser):
"""Parse an output that is one of a... | langchain/libs/langchain/langchain/output_parsers/enum.py/0 | {
"file_path": "langchain/libs/langchain/langchain/output_parsers/enum.py",
"repo_id": "langchain",
"token_count": 469
} | 551 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | transformers/tests/models/fsmt/test_tokenization_fsmt.py/0 | {
"file_path": "transformers/tests/models/fsmt/test_tokenization_fsmt.py",
"repo_id": "transformers",
"token_count": 2945
} | 816 |
python_sources()
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/llama_index/postprocessor/flag_embedding_reranker/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/llama_index/postprocessor/flag_embedding_reranker/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,315 |
# ResNeXt
A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) $C$,... | pytorch-image-models/docs/models/.templates/models/resnext.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/resnext.md",
"repo_id": "pytorch-image-models",
"token_count": 2238
} | 360 |
<jupyter_start><jupyter_text>Stable Diffusion Deep DiveStable Diffusion is a powerful text-to-image model. There are various websites and tools to make using it as easy as possible. It is also [integrated into the Huggingface diffusers library](https://huggingface.co/blog/stable_diffusion) where generating images can b... | diffusion-models-class/units/en/unit3/stable_diffusion_deep_dive.ipynb/0 | {
"file_path": "diffusion-models-class/units/en/unit3/stable_diffusion_deep_dive.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 14887
} | 279 |
package planparserv2
import (
"testing"
"github.com/milvus-io/milvus/internal/proto/planpb"
)
func Test_hasWildcards(t *testing.T) {
type args struct {
pattern string
}
tests := []struct {
name string
args args
want bool
}{
{
args: args{
pattern: "no-wildcards",
},
want: false,
},
{
... | milvus/internal/parser/planparserv2/pattern_match_test.go/0 | {
"file_path": "milvus/internal/parser/planparserv2/pattern_match_test.go",
"repo_id": "milvus",
"token_count": 1341
} | 1,954 |
from langchain_community.document_loaders.hn import HNLoader
__all__ = ["HNLoader"]
| langchain/libs/langchain/langchain/document_loaders/hn.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/hn.py",
"repo_id": "langchain",
"token_count": 28
} | 482 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.perplexity import Perplexity
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in Perplexity.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-perplexity/tests/test_llms_perplexity.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-perplexity/tests/test_llms_perplexity.py",
"repo_id": "llama_index",
"token_count": 94
} | 1,238 |
<jupyter_start><jupyter_text>Google PaLM Embeddings If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-google
!pip install llama-index
# imports
from llama_index.embeddings.google import GooglePaLMEmbedding
# get API key and create... | llama_index/docs/examples/embeddings/google_palm.ipynb/0 | {
"file_path": "llama_index/docs/examples/embeddings/google_palm.ipynb",
"repo_id": "llama_index",
"token_count": 230
} | 1,098 |
# order by contributions
reviewers:
- fishpenguin
- scsven
- bigsheeper
- DragonDriver
- godchen0212
approvers:
- maintainers
| milvus/pkg/util/OWNERS/0 | {
"file_path": "milvus/pkg/util/OWNERS",
"repo_id": "milvus",
"token_count": 50
} | 1,822 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_stochastic_karras_ve": ["KarrasVePipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_stochastic_karras_ve import KarrasVePipeline
else:
import sys
sys.modules[__na... | diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py",
"repo_id": "diffusers",
"token_count": 199
} | 224 |
"""Document summary index."""
from llama_index.core.indices.document_summary.base import (
DocumentSummaryIndex,
GPTDocumentSummaryIndex,
)
from llama_index.core.indices.document_summary.retrievers import (
DocumentSummaryIndexEmbeddingRetriever,
DocumentSummaryIndexLLMRetriever,
DocumentSummaryIn... | llama_index/llama-index-core/llama_index/core/indices/document_summary/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/indices/document_summary/__init__.py",
"repo_id": "llama_index",
"token_count": 184
} | 1,261 |
from google.generativeai.types.safety_types import ( # type: ignore
HarmBlockThreshold,
HarmCategory,
)
__all__ = ["HarmBlockThreshold", "HarmCategory"]
| langchain/libs/partners/google-genai/langchain_google_genai/_enums.py/0 | {
"file_path": "langchain/libs/partners/google-genai/langchain_google_genai/_enums.py",
"repo_id": "langchain",
"token_count": 56
} | 651 |
from elastic_query_generator.chain import chain
__all__ = [
"chain",
]
| langchain/templates/elastic-query-generator/elastic_query_generator/__init__.py/0 | {
"file_path": "langchain/templates/elastic-query-generator/elastic_query_generator/__init__.py",
"repo_id": "langchain",
"token_count": 28
} | 671 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/vision-encoder-decoder.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vision-encoder-decoder.md",
"repo_id": "transformers",
"token_count": 2525
} | 496 |
# Using LLMs
## Concept
Picking the proper Large Language Model (LLM) is one of the first steps you need to consider when building any LLM application over your data.
LLMs are a core component of LlamaIndex. They can be used as standalone modules or plugged into other core LlamaIndex modules (indices, retrievers, qu... | llama_index/docs/module_guides/models/llms.md/0 | {
"file_path": "llama_index/docs/module_guides/models/llms.md",
"repo_id": "llama_index",
"token_count": 4738
} | 1,228 |
<!--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/en/using-diffusers/other-modalities.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/other-modalities.md",
"repo_id": "diffusers",
"token_count": 333
} | 184 |
import { Client } from "@opensearch-project/opensearch";
import { OpenAIEmbeddings } from "@langchain/openai";
import { OpenSearchVectorStore } from "@langchain/community/vectorstores/opensearch";
import * as uuid from "uuid";
import { Document } from "@langchain/core/documents";
export async function run() {
const ... | langchainjs/examples/src/indexes/vector_stores/opensearch/opensearch.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/opensearch/opensearch.ts",
"repo_id": "langchainjs",
"token_count": 640
} | 788 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/roformer/modeling_tf_roformer.py/0 | {
"file_path": "transformers/src/transformers/models/roformer/modeling_tf_roformer.py",
"repo_id": "transformers",
"token_count": 28490
} | 663 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/roberta_prelayernorm/convert_roberta_prelayernorm_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/roberta_prelayernorm/convert_roberta_prelayernorm_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 1063
} | 736 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/llms/llama-index-llms-cohere/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-cohere/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,252 |
<!--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/using-diffusers/custom_pipeline_examples.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/custom_pipeline_examples.md",
"repo_id": "diffusers",
"token_count": 10864
} | 202 |
import unittest
from typing import Dict
from unittest.mock import MagicMock, patch
import pytest
import requests
from langchain_core.documents import Document
from langchain_community.document_loaders.confluence import (
ConfluenceLoader,
ContentFormat,
)
@pytest.fixture
def mock_confluence(): # type: igno... | langchain/libs/community/tests/unit_tests/document_loaders/test_confluence.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_confluence.py",
"repo_id": "langchain",
"token_count": 4668
} | 389 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/adaption_prompt/config.py/0 | {
"file_path": "peft/src/peft/tuners/adaption_prompt/config.py",
"repo_id": "peft",
"token_count": 869
} | 317 |
"""Graph stores."""
from llama_index.legacy.graph_stores.falkordb import FalkorDBGraphStore
from llama_index.legacy.graph_stores.kuzu import KuzuGraphStore
from llama_index.legacy.graph_stores.nebulagraph import NebulaGraphStore
from llama_index.legacy.graph_stores.neo4j import Neo4jGraphStore
from llama_index.legacy.... | llama_index/llama-index-legacy/llama_index/legacy/graph_stores/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/graph_stores/__init__.py",
"repo_id": "llama_index",
"token_count": 182
} | 1,656 |
nextjs/
assets/ | weblangchain/.dockerignore/0 | {
"file_path": "weblangchain/.dockerignore",
"repo_id": "weblangchain",
"token_count": 6
} | 2,147 |
"""GraphQL Tool."""
from typing import Optional
import requests
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class GraphQLToolSpec(BaseToolSpec):
"""Requests Tool."""
spec_functions = ["graphql_request"]
def __init__(self, url: str, headers: Optional[dict] = {}):
self.headers... | llama_index/llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py",
"repo_id": "llama_index",
"token_count": 539
} | 1,440 |
# CHANGELOG — llama-index-vector-stores-opensearch
## [0.1.2]
- Adds OpensearchVectorClient as top-level import
## [0.1.1]
- Fixes strict equality in dependency of llama-index-core
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-opensearch/CHANGELOG.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-opensearch/CHANGELOG.md",
"repo_id": "llama_index",
"token_count": 68
} | 1,612 |
use candle::{Module, Result, Tensor};
use candle_nn::{linear, Linear, VarBuilder};
// A simplified version of:
// https://github.com/huggingface/diffusers/blob/119ad2c3dc8a8fb8446a83f4bf6f20929487b47f/src/diffusers/models/attention_processor.py#L38
#[derive(Debug)]
pub struct Attention {
to_q: Linear,
to_k: Li... | candle/candle-transformers/src/models/wuerstchen/attention_processor.rs/0 | {
"file_path": "candle/candle-transformers/src/models/wuerstchen/attention_processor.rs",
"repo_id": "candle",
"token_count": 2076
} | 85 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.whatsapp import WhatsappChatLoader
def test_class():
names_of_base_classes = [b.__name__ for b in WhatsappChatLoader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-whatsapp/tests/test_readers_whatsapp.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-whatsapp/tests/test_readers_whatsapp.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,543 |
# A Guide to Building a Full-Stack LlamaIndex Web App with Delphic
This guide seeks to walk you through using LlamaIndex with a production-ready web app starter template
called [Delphic](https://github.com/JSv4/Delphic). All code examples here are available from
the [Delphic](https://github.com/JSv4/Delphic) repo
## ... | llama_index/docs/understanding/putting_it_all_together/apps/fullstack_with_delphic.md/0 | {
"file_path": "llama_index/docs/understanding/putting_it_all_together/apps/fullstack_with_delphic.md",
"repo_id": "llama_index",
"token_count": 9814
} | 1,151 |
"""O365 tools."""
from langchain_community.tools.office365.create_draft_message import (
O365CreateDraftMessage,
)
from langchain_community.tools.office365.events_search import O365SearchEvents
from langchain_community.tools.office365.messages_search import O365SearchEmails
from langchain_community.tools.office365... | langchain/libs/langchain/langchain/tools/office365/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/office365/__init__.py",
"repo_id": "langchain",
"token_count": 182
} | 594 |
## w/ and w/o gradient accumulation
python benchmark/benchmark.py \
--command "python examples/scripts/ppo.py --exp_name ppo_step_grad_accu --mini_batch_size 1 --gradient_accumulation_steps 128 --log_with wandb" \
--num-seeds 3 \
--start-seed 1 \
--workers 10 \
--slurm-nodes 1 \
--slurm-gpus-per... | trl/benchmark/benchmark_level3.sh/0 | {
"file_path": "trl/benchmark/benchmark_level3.sh",
"repo_id": "trl",
"token_count": 689
} | 776 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team and the librosa & torchaudio 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-... | transformers/src/transformers/audio_utils.py/0 | {
"file_path": "transformers/src/transformers/audio_utils.py",
"repo_id": "transformers",
"token_count": 12205
} | 615 |
<!--
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 agree... | transformers/docs/source/ja/model_sharing.md/0 | {
"file_path": "transformers/docs/source/ja/model_sharing.md",
"repo_id": "transformers",
"token_count": 5368
} | 519 |
---
hide_table_of_contents: true
---
# Unstructured
This example covers how to use [Unstructured](/docs/ecosystem/integrations/unstructured) to load files of many types. Unstructured currently supports loading of text files, powerpoints, html, pdfs, images, and more.
## Setup
You can run Unstructured locally in you... | langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/unstructured.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/unstructured.mdx",
"repo_id": "langchainjs",
"token_count": 357
} | 758 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/integrations/awq.py/0 | {
"file_path": "transformers/src/transformers/integrations/awq.py",
"repo_id": "transformers",
"token_count": 6781
} | 624 |
from importlib.util import find_spec
from typing import Generator, List
import pytest
try:
find_spec("pymilvus")
from milvus import default_server
milvus_libs = 1
except ImportError:
milvus_libs = None # type: ignore
from llama_index.legacy.schema import NodeRelationship, RelatedNodeInfo, TextNode
... | llama_index/llama-index-legacy/tests/vector_stores/test_milvus.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/vector_stores/test_milvus.py",
"repo_id": "llama_index",
"token_count": 2217
} | 1,570 |
# Models
With the `AutoModelForCausalLMWithValueHead` class TRL supports all decoder model architectures in transformers such as GPT-2, OPT, and GPT-Neo. In addition, with `AutoModelForSeq2SeqLMWithValueHead` you can use encoder-decoder architectures such as T5. TRL also requires reference models which are frozen copi... | trl/docs/source/models.mdx/0 | {
"file_path": "trl/docs/source/models.mdx",
"repo_id": "trl",
"token_count": 283
} | 784 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/util/paramtable/quota_param.go/0 | {
"file_path": "milvus/pkg/util/paramtable/quota_param.go",
"repo_id": "milvus",
"token_count": 15899
} | 1,913 |
<!---
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 ... | transformers/docs/source/en/installation.md/0 | {
"file_path": "transformers/docs/source/en/installation.md",
"repo_id": "transformers",
"token_count": 2896
} | 480 |
import os
import requests
import tempfile
import pytest
import huggingface_hub.constants
from huggingface_hub import hf_api
import text_generation_server.utils.hub
from text_generation_server.utils.hub import (
weight_hub_files,
download_weights,
weight_files,
EntryNotFoundError,
LocalEntryNotFou... | text-generation-inference/server/tests/utils/test_hub.py/0 | {
"file_path": "text-generation-inference/server/tests/utils/test_hub.py",
"repo_id": "text-generation-inference",
"token_count": 1264
} | 438 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-remote-depth/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-remote-depth/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,514 |
from datetime import datetime
from typing import Annotated
from fastapi import Cookie
from typing_extensions import TypedDict
class AssistantWithoutUserId(TypedDict):
"""Assistant model."""
assistant_id: str
"""The ID of the assistant."""
name: str
"""The name of the assistant."""
config: di... | opengpts/backend/app/schema.py/0 | {
"file_path": "opengpts/backend/app/schema.py",
"repo_id": "opengpts",
"token_count": 467
} | 2,137 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/mpnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mpnet.md",
"repo_id": "transformers",
"token_count": 1255
} | 466 |
"""Finetuning modules."""
from llama_index.finetuning.embeddings.adapter import (
EmbeddingAdapterFinetuneEngine,
)
from llama_index.finetuning.embeddings.common import (
EmbeddingQAFinetuneDataset,
generate_qa_embedding_pairs,
)
from llama_index.finetuning.embeddings.sentence_transformer import (
Sent... | llama_index/llama-index-finetuning/llama_index/finetuning/__init__.py/0 | {
"file_path": "llama_index/llama-index-finetuning/llama_index/finetuning/__init__.py",
"repo_id": "llama_index",
"token_count": 389
} | 1,281 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/pipelines.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/pipelines.md",
"repo_id": "transformers",
"token_count": 4568
} | 475 |
from langchain_community.agent_toolkits.openapi.spec import (
ReducedOpenAPISpec,
reduce_openapi_spec,
)
__all__ = ["ReducedOpenAPISpec", "reduce_openapi_spec"]
| langchain/libs/langchain/langchain/agents/agent_toolkits/openapi/spec.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/openapi/spec.py",
"repo_id": "langchain",
"token_count": 65
} | 462 |
package iterator
import (
"sync"
"go.uber.org/atomic"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/storage"
"github.com/milvus-io/milvus/pkg/common"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
type BinlogIterator struct {
disposed atomic.Bool
dispose... | milvus/internal/datanode/iterators/binlog_iterator.go/0 | {
"file_path": "milvus/internal/datanode/iterators/binlog_iterator.go",
"repo_id": "milvus",
"token_count": 1002
} | 1,974 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.