text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
"""Temporary high-level library of the Google GenerativeAI API.
The content of this file should eventually go into the Python package
google.generativeai.
"""
import datetime
import logging
import re
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, MutableSequence, Optional
import goog... | llama_index/llama-index-legacy/llama_index/legacy/vector_stores/google/generativeai/genai_extension.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/vector_stores/google/generativeai/genai_extension.py",
"repo_id": "llama_index",
"token_count": 7987
} | 1,785 |
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.fastembed import FastEmbedEmbedding
def test_class():
names_of_base_classes = [b.__name__ for b in FastEmbedEmbedding.__mro__]
assert BaseEmbedding.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/tests/test_embeddings_fastembed.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/tests/test_embeddings_fastembed.py",
"repo_id": "llama_index",
"token_count": 102
} | 1,257 |
Import:
- ./docs/models/*.md
Library:
Name: PyTorch Image Models
Headline: PyTorch image models, scripts, pretrained weights
Website: https://rwightman.github.io/pytorch-image-models/
Repository: https://github.com/rwightman/pytorch-image-models
Docs: https://rwightman.github.io/pytorch-image-models/
README... | pytorch-image-models/model-index.yml/0 | {
"file_path": "pytorch-image-models/model-index.yml",
"repo_id": "pytorch-image-models",
"token_count": 253
} | 357 |
from llama_index.embeddings.jinaai.base import JinaEmbedding
__all__ = ["JinaEmbedding"]
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/llama_index/embeddings/jinaai/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-jinaai/llama_index/embeddings/jinaai/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,315 |
# LlamaIndex Vector_Stores Integration: Redis
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,569 |
// 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/mq/msgstream/mqwrapper/pulsar/pulsar_client_test.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/pulsar/pulsar_client_test.go",
"repo_id": "milvus",
"token_count": 9090
} | 1,891 |
# OpenAI
Here's how you can initialize an `OpenAI` LLM instance:
import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";
<IntegrationInstallTooltip></IntegrationInstallTooltip>
```bash npm2yarn
npm install @langchain/openai
```
```typescript
import { OpenAI } from "@langchain/opena... | langchainjs/docs/core_docs/docs/integrations/llms/openai.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/llms/openai.mdx",
"repo_id": "langchainjs",
"token_count": 420
} | 784 |
package command
import (
"flag"
"github.com/milvus-io/milvus/cmd/tools/migration/console"
)
type commandParser struct {
configYaml string
}
func (c *commandParser) formatYaml(args []string, flags *flag.FlagSet) {
flags.StringVar(&c.configYaml, "config", "", "set config yaml")
}
func (c *commandParser) parse(ar... | milvus/cmd/tools/migration/command/config.go/0 | {
"file_path": "milvus/cmd/tools/migration/command/config.go",
"repo_id": "milvus",
"token_count": 199
} | 1,841 |
# serializer version: 1
# name: test_openai_functions_router
list([
dict({
'description': 'Sends the draft for revision.',
'name': 'revise',
'parameters': dict({
'properties': dict({
'notes': dict({
'description': "The editor's notes to guide the revision.",
... | langchain/libs/langchain/tests/unit_tests/runnables/__snapshots__/test_openai_functions.ambr/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/runnables/__snapshots__/test_openai_functions.ambr",
"repo_id": "langchain",
"token_count": 365
} | 669 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/core/src/exec/operator/Operator.h/0 | {
"file_path": "milvus/internal/core/src/exec/operator/Operator.h",
"repo_id": "milvus",
"token_count": 1921
} | 1,752 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and is... | diffusers/src/diffusers/pipelines/wuerstchen/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/wuerstchen/__init__.py",
"repo_id": "diffusers",
"token_count": 849
} | 255 |
import shutil
from typing import Optional, Type
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_core.tools import BaseTool
from langchain_community.tools.file_management.utils import (
INVALID_PATH_TEMPLATE,
BaseFileToolMixi... | langchain/libs/community/langchain_community/tools/file_management/copy.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/file_management/copy.py",
"repo_id": "langchain",
"token_count": 704
} | 306 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-assemblyai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-assemblyai/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,406 |
import { ChatCloudflareWorkersAI } from "@langchain/cloudflare";
const model = new ChatCloudflareWorkersAI({
model: "@cf/meta/llama-2-7b-chat-int8", // Default value
cloudflareAccountId: process.env.CLOUDFLARE_ACCOUNT_ID,
cloudflareApiToken: process.env.CLOUDFLARE_API_TOKEN,
// Pass a custom base URL to use Cl... | langchainjs/examples/src/models/chat/integration_cloudflare_workersai.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/integration_cloudflare_workersai.ts",
"repo_id": "langchainjs",
"token_count": 533
} | 822 |
# Apify
This page covers how to use [Apify](https://apify.com) within LangChain.
## Overview
Apify is a cloud platform for web scraping and data extraction,
which provides an [ecosystem](https://apify.com/store) of more than a thousand
ready-made apps called *Actors* for various scraping, crawling, and extraction us... | langchain/docs/docs/integrations/providers/apify.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/apify.mdx",
"repo_id": "langchain",
"token_count": 442
} | 139 |
[tool.poetry]
name = "openai-functions-tool-retrieval-agent"
version = "0.0.1"
description = "Use large numbers of tools with tool retrieval strategies"
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
openai = "<2"
tiktoken = "^0.5.1"
faiss-cpu = "^1.7.4"
[tool.... | langchain/templates/openai-functions-tool-retrieval-agent/pyproject.toml/0 | {
"file_path": "langchain/templates/openai-functions-tool-retrieval-agent/pyproject.toml",
"repo_id": "langchain",
"token_count": 314
} | 669 |
""" PyTorch FX Based Feature Extraction Helpers
Using https://pytorch.org/vision/stable/feature_extraction.html
"""
from typing import Callable, List, Dict, Union, Type
import torch
from torch import nn
from ._features import _get_feature_info, _get_return_layers
try:
from torchvision.models.feature_extraction i... | pytorch-image-models/timm/models/_features_fx.py/0 | {
"file_path": "pytorch-image-models/timm/models/_features_fx.py",
"repo_id": "pytorch-image-models",
"token_count": 1801
} | 394 |
"""Question answering with sources over documents."""
from __future__ import annotations
import inspect
import re
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Tuple
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
)
from ... | langchain/libs/langchain/langchain/chains/qa_with_sources/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/qa_with_sources/base.py",
"repo_id": "langchain",
"token_count": 3407
} | 509 |
export * from "./chat_models.js";
export * from "./llms.js";
export * from "./embeddings.js";
export * from "./vectorstores.js";
export * from "./caches.js";
export * from "./message_histories.js";
| langchainjs/libs/langchain-cloudflare/src/index.ts/0 | {
"file_path": "langchainjs/libs/langchain-cloudflare/src/index.ts",
"repo_id": "langchainjs",
"token_count": 70
} | 1,012 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/model_doc/convnextv2.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/convnextv2.md",
"repo_id": "transformers",
"token_count": 1916
} | 530 |
<jupyter_start><jupyter_text>Building a Metaphor Data AgentThis tutorial walks through using the LLM tools provided by the [Metaphor API](https://platform.metaphor.systems/) to allow LLMs to easily search and retrieve HTML content from the Internet.To get started, you will need an [OpenAI api key](https://platform.open... | llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/examples/metaphor.ipynb/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/examples/metaphor.ipynb",
"repo_id": "llama_index",
"token_count": 2221
} | 1,428 |
import { google } from "googleapis";
import { Tool } from "@langchain/core/tools";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { BaseLLM } from "@langchain/core/language_models/llms";
export interface GoogleCalendarAgentParams {
credentials?: {
clientEmail?: string;
privateKey?... | langchainjs/libs/langchain-community/src/tools/google_calendar/base.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/google_calendar/base.ts",
"repo_id": "langchainjs",
"token_count": 915
} | 1,074 |
use super::WordLevel;
use crate::utils::parallelism::*;
use crate::{AddedToken, Result, Trainer};
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::collections::HashMap;
#[non_exhaustive]
#[derive(Debug, Clone, Builder, Serialize, Deserialize)]
pub struct WordLevelTrainer {
/// The minimum freq... | tokenizers/tokenizers/src/models/wordlevel/trainer.rs/0 | {
"file_path": "tokenizers/tokenizers/src/models/wordlevel/trainer.rs",
"repo_id": "tokenizers",
"token_count": 2735
} | 481 |
variable "chroma_release" {
description = "The chroma release to deploy"
type = string
default = "0.4.12"
}
#TODO this should be updated to point to https://raw.githubusercontent.com/chroma-core/chroma/main/examples/deployments/common/startup.sh in the repo
data "http" "startup_script_remote" {
url ... | chroma/examples/deployments/aws-terraform/variables.tf/0 | {
"file_path": "chroma/examples/deployments/aws-terraform/variables.tf",
"repo_id": "chroma",
"token_count": 1371
} | 38 |
# coding=utf-8
# Copyright 2019-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 a... | transformers/tests/utils/test_generic.py/0 | {
"file_path": "transformers/tests/utils/test_generic.py",
"repo_id": "transformers",
"token_count": 3485
} | 773 |
# 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 required by appl... | trl/examples/scripts/dpo.py/0 | {
"file_path": "trl/examples/scripts/dpo.py",
"repo_id": "trl",
"token_count": 2622
} | 783 |
# Response Synthesizer
## Concept
A `Response Synthesizer` is what generates a response from an LLM, using a user query and a given set of text chunks. The output of a response synthesizer is a `Response` object.
The method for doing this can take many forms, from as simple as iterating over text chunks, to as compl... | llama_index/docs/module_guides/querying/response_synthesizers/root.md/0 | {
"file_path": "llama_index/docs/module_guides/querying/response_synthesizers/root.md",
"repo_id": "llama_index",
"token_count": 2735
} | 1,125 |
repos:
- repo: https://github.com/Narsil/pre-commit-rust
rev: 2eed6366172ef2a5186e8785ec0e67243d7d73d0
hooks:
- id: fmt
name: "Rust (fmt)"
- id: clippy
name: "Rust (clippy)"
args:
[
"--tests",
"--examples",
"--",
"-D... | candle/.pre-commit-config.yaml/0 | {
"file_path": "candle/.pre-commit-config.yaml",
"repo_id": "candle",
"token_count": 210
} | 28 |
# 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/examples/research_projects/controlnetxs/pipeline_controlnet_xs_sd_xl.py/0 | {
"file_path": "diffusers/examples/research_projects/controlnetxs/pipeline_controlnet_xs_sd_xl.py",
"repo_id": "diffusers",
"token_count": 24958
} | 211 |
<jupyter_start><jupyter_code>!pip install llama-index
!pip install llama-index-vector-stores-mongodb
!pip install llama-index-embeddings-openai
!pip install pymongo
!pip install datasets
!pip install pandas
%env OPENAI_API_KEY=OPENAI_API_KEY
from datasets import load_dataset
import pandas as pd
# https://huggingface.c... | llama_index/docs/examples/vector_stores/MongoDBAtlasVectorSearchRAGOpenAI.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/MongoDBAtlasVectorSearchRAGOpenAI.ipynb",
"repo_id": "llama_index",
"token_count": 2036
} | 1,167 |
<!--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/ja/model_doc/bigbird_pegasus.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bigbird_pegasus.md",
"repo_id": "transformers",
"token_count": 2264
} | 527 |
import { LanceDB } from "@langchain/community/vectorstores/lancedb";
import { OpenAIEmbeddings } from "@langchain/openai";
import { connect } from "vectordb";
import * as fs from "node:fs/promises";
import * as path from "node:path";
import os from "node:os";
//
// You can open a LanceDB dataset created elsewhere, su... | langchainjs/examples/src/indexes/vector_stores/lancedb/load.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/lancedb/load.ts",
"repo_id": "langchainjs",
"token_count": 379
} | 804 |
# Copyright 2024 Harutatsu Akiyama 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/LICENSE-2.0
#
# Unless... | diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py",
"repo_id": "diffusers",
"token_count": 24079
} | 251 |
#!/bin/bash
#SBATCH --job-name=idefics_zero3_finetuning_multinode # name
#SBATCH --nodes=2 # nodes
#SBATCH --ntasks-per-node=1 # crucial - only 1 task per dist per node!
#SBATCH --cpus-per-task=96 # number of cores per tasks
#SBATCH --gres=gpu:8 # number of gp... | notebooks/examples/idefics/idefics_zero3_finetuning/slurm_script_idefics_zero3_finetuning_multinode.slurm/0 | {
"file_path": "notebooks/examples/idefics/idefics_zero3_finetuning/slurm_script_idefics_zero3_finetuning_multinode.slurm",
"repo_id": "notebooks",
"token_count": 389
} | 280 |
"""Test chat model integration."""
from langchain_anthropic.chat_models import ChatAnthropicMessages
def test_initialization() -> None:
"""Test chat model initialization."""
ChatAnthropicMessages(model_name="claude-instant-1.2", anthropic_api_key="xyz")
ChatAnthropicMessages(model="claude-instant-1.2", ... | langchain/libs/partners/anthropic/tests/unit_tests/test_chat_models.py/0 | {
"file_path": "langchain/libs/partners/anthropic/tests/unit_tests/test_chat_models.py",
"repo_id": "langchain",
"token_count": 119
} | 618 |
"""Base implementation for tools or skills."""
from __future__ import annotations
import inspect
import warnings
from abc import abstractmethod
from inspect import signature
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union
from langchain_core.callbacks import (
AsyncCallbackMa... | langchain/libs/core/langchain_core/tools.py/0 | {
"file_path": "langchain/libs/core/langchain_core/tools.py",
"repo_id": "langchain",
"token_count": 14735
} | 408 |
<jupyter_start><jupyter_text>Query Engine with Pydantic OutputsEvery query engine has support for integrated structured responses using the following `response_mode`s in `RetrieverQueryEngine`:- `refine`- `compact`- `tree_summarize`- `accumulate` (beta, requires extra parsing to convert to objects)- `compact_accumulate... | llama_index/docs/examples/query_engine/pydantic_query_engine.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/pydantic_query_engine.ipynb",
"repo_id": "llama_index",
"token_count": 1548
} | 1,125 |
//!
//! This module defines helpers to allow optional Rayon usage.
//!
use rayon::iter::IterBridge;
use rayon::prelude::*;
use rayon_cond::CondIterator;
// Re-export rayon current_num_threads
pub use rayon::current_num_threads;
pub const ENV_VARIABLE: &str = "TOKENIZERS_PARALLELISM";
// Reading/Writing this variabl... | tokenizers/tokenizers/src/utils/parallelism.rs/0 | {
"file_path": "tokenizers/tokenizers/src/utils/parallelism.rs",
"repo_id": "tokenizers",
"token_count": 3431
} | 464 |
[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 = ["Konko"]
contains_example = false
import_path = "llama_index.llms.konko"
[tool.mypy]
disa... | llama_index/llama-index-integrations/llms/llama-index-llms-konko/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-konko/pyproject.toml",
"repo_id": "llama_index",
"token_count": 649
} | 1,355 |
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, Generator, Tuple
import numpy as np
import pytest
from langchain_core.pydantic_v1 import Field
if TYPE_CHECKING:
from docarray.index import (
ElasticDocIndex,
HnswDocumentIndex,
InMemo... | langchain/libs/community/tests/integration_tests/retrievers/docarray/fixtures.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/retrievers/docarray/fixtures.py",
"repo_id": "langchain",
"token_count": 3063
} | 376 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/convbert/test_modeling_convbert.py/0 | {
"file_path": "transformers/tests/models/convbert/test_modeling_convbert.py",
"repo_id": "transformers",
"token_count": 9532
} | 725 |
import argparse
import math
import os
import torch
from neural_compressor.utils.pytorch import load
from PIL import Image
from transformers import CLIPTextModel, CLIPTokenizer
from diffusers import AutoencoderKL, StableDiffusionPipeline, UNet2DConditionModel
def parse_args():
parser = argparse.ArgumentParser()
... | diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/text2images.py/0 | {
"file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/text2images.py",
"repo_id": "diffusers",
"token_count": 1518
} | 209 |
"""Test embedding model integration."""
from langchain_together.embeddings import TogetherEmbeddings
def test_initialization() -> None:
"""Test embedding model initialization."""
TogetherEmbeddings(model="togethercomputer/m2-bert-80M-8k-retrieval")
| langchain/libs/partners/together/tests/unit_tests/test_embeddings.py/0 | {
"file_path": "langchain/libs/partners/together/tests/unit_tests/test_embeddings.py",
"repo_id": "langchain",
"token_count": 77
} | 644 |
{
"git": {
"deploymentEnabled": {
"main": false
}
}
}
| weblangchain/vercel.json/0 | {
"file_path": "weblangchain/vercel.json",
"repo_id": "weblangchain",
"token_count": 39
} | 1,998 |
[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 = ["AsyncWebPageReader", "BeautifulSoupWebReader", "KnowledgeBaseWebReader", "MainContentExtr... | llama_index/llama-index-integrations/readers/llama-index-readers-web/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/pyproject.toml",
"repo_id": "llama_index",
"token_count": 991
} | 1,472 |
package balance
import (
"math/rand"
"testing"
"time"
"github.com/samber/lo"
"github.com/stretchr/testify/suite"
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/internal/querycoordv2/meta"
"github.com/milvus-io/milvus/pkg/util/paramtable"
"github.com/milvus-io/milvus/pkg/uti... | milvus/internal/querycoordv2/balance/multi_target_balancer_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/balance/multi_target_balancer_test.go",
"repo_id": "milvus",
"token_count": 4261
} | 1,857 |
from llama_index.tools.arxiv.base import ArxivToolSpec
__all__ = ["ArxivToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/__init__.py",
"repo_id": "llama_index",
"token_count": 33
} | 1,413 |
import pytest
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.google import (
GeminiEmbedding,
GooglePaLMEmbedding,
GoogleUnivSentEncoderEmbedding,
)
try:
import tensorflow_hub
except ImportError:
tensorflow_hub = None # type: ignore
@pytest.mark.skipi... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-google/tests/test_embeddings_google.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-google/tests/test_embeddings_google.py",
"repo_id": "llama_index",
"token_count": 247
} | 1,241 |
"""Evaluators for parsing strings."""
import json
from operator import eq
from typing import Any, Callable, Optional, Union, cast
from langchain.evaluation.schema import StringEvaluator
from langchain.output_parsers.json import parse_json_markdown
class JsonValidityEvaluator(StringEvaluator):
"""Evaluates whethe... | langchain/libs/langchain/langchain/evaluation/parsing/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/evaluation/parsing/base.py",
"repo_id": "langchain",
"token_count": 2115
} | 530 |
<jupyter_start><jupyter_text>Implémentation à partir de 0Il est parfois utile de considérer la version la plus simple possible d'une chose pour mieux en comprendre le fonctionnement. C'est ce que nous allons essayer de faire dans ce *notebook*, en commençant par un modèle de diffusion "jouet" pour voir comment les diff... | diffusion-models-class/units/fr/unit1/diffusion_models_from_scratch.ipynb/0 | {
"file_path": "diffusion-models-class/units/fr/unit1/diffusion_models_from_scratch.ipynb",
"repo_id": "diffusion-models-class",
"token_count": 10500
} | 303 |
# LlamaIndex Embeddings Integration: Anyscale
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-anyscale/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-anyscale/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,232 |
from neo4j_advanced_rag.chain import chain
__all__ = ["chain"]
| langchain/templates/neo4j-advanced-rag/neo4j_advanced_rag/__init__.py/0 | {
"file_path": "langchain/templates/neo4j-advanced-rag/neo4j_advanced_rag/__init__.py",
"repo_id": "langchain",
"token_count": 23
} | 660 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2024 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/LI... | diffusers/examples/controlnet/train_controlnet_flax.py/0 | {
"file_path": "diffusers/examples/controlnet/train_controlnet_flax.py",
"repo_id": "diffusers",
"token_count": 20100
} | 211 |
---
sidebar_position: 1
---
# Streaming
Some LLMs provide a streaming response. This means that instead of waiting for the entire response to be returned, you can start processing it as soon as it's available. This is useful if you want to display the response to the user as it's being generated, or if you want to pr... | langchainjs/docs/core_docs/docs/modules/model_io/llms/streaming_llm.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/model_io/llms/streaming_llm.mdx",
"repo_id": "langchainjs",
"token_count": 400
} | 749 |
insert_flush_performance:
collections:
-
server:
db_config.primary_path: /test/milvus/db_data_080/sift_2m_128_128_l2_flush
cache_config.cpu_cache_capacity: 8
cache_config.insert_buffer_size: 2
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold:... | milvus/tests/benchmark/milvus_benchmark/suites/add_flush_performance.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/add_flush_performance.yaml",
"repo_id": "milvus",
"token_count": 336
} | 1,941 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-rayyan/llama_index/readers/rayyan/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-rayyan/llama_index/readers/rayyan/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,409 |
#!/usr/bin/env python
# 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/L... | transformers/src/transformers/tools/evaluate_agent.py/0 | {
"file_path": "transformers/src/transformers/tools/evaluate_agent.py",
"repo_id": "transformers",
"token_count": 10880
} | 686 |
import { Neo4jGraph } from "./neo4j_graph.js";
interface MemgraphGraphConfig {
url: string;
username: string;
password: string;
database?: string;
}
const rawSchemaQuery = `
CALL llm_util.schema("raw")
YIELD *
RETURN *
`;
/**
* @security *Security note*: Make sure that the database connection uses credentia... | langchainjs/libs/langchain-community/src/graphs/memgraph_graph.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/graphs/memgraph_graph.ts",
"repo_id": "langchainjs",
"token_count": 1242
} | 983 |
#
# Copyright (c) 2017-2021 NVIDIA CORPORATION. All rights reserved.
# This file coems from the WebDataset library.
# See the LICENSE file for licensing terms (BSD-style).
#
"""
Binary tensor encodings for PyTorch and NumPy.
This defines efficient binary encodings for tensors. The format is 8 byte
aligned and can be ... | datasets/src/datasets/packaged_modules/webdataset/_tenbin.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/webdataset/_tenbin.py",
"repo_id": "datasets",
"token_count": 3409
} | 138 |
import datetime
import glob
import logging
import os
import shutil
from pathlib import Path
from typing import TYPE_CHECKING, List, Union
if TYPE_CHECKING:
import vowpal_wabbit_next as vw
logger = logging.getLogger(__name__)
class ModelRepository:
def __init__(
self,
folder: Union[str, os.Pa... | langchain/libs/experimental/langchain_experimental/rl_chain/model_repository.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/rl_chain/model_repository.py",
"repo_id": "langchain",
"token_count": 963
} | 467 |
# Guru Loader
This loader loads documents from [Guru](https://www.getguru.com/). The user specifies a username and api key to initialize the GuruReader.
Note this is not your password. You need to create a new api key in the admin tab of the portal.
## Usage
Here's an example usage of the GuruReader.
```python
fro... | llama_index/llama-index-integrations/readers/llama-index-readers-guru/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-guru/README.md",
"repo_id": "llama_index",
"token_count": 343
} | 1,453 |
#!/usr/bin/env python
# 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-... | transformers/examples/tensorflow/question-answering/run_qa.py/0 | {
"file_path": "transformers/examples/tensorflow/question-answering/run_qa.py",
"repo_id": "transformers",
"token_count": 15954
} | 562 |
import asyncio
from enum import Enum
from typing import Dict, List, Optional, Tuple, cast
from llama_index.core.async_utils import run_async_tasks
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.constants import DEFAULT_SIMILARITY_TOP_K
from llama_index.core.llms.utils import LLMType,... | llama_index/llama-index-core/llama_index/core/retrievers/fusion_retriever.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/retrievers/fusion_retriever.py",
"repo_id": "llama_index",
"token_count": 3557
} | 1,148 |
// 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/mq/msgstream/mqwrapper/rmq/rmq_client_test.go/0 | {
"file_path": "milvus/internal/mq/msgstream/mqwrapper/rmq/rmq_client_test.go",
"repo_id": "milvus",
"token_count": 2788
} | 1,728 |
# candle-segment-anything: Segment-Anything Model
This example is based on Meta AI [Segment-Anything
Model](https://github.com/facebookresearch/segment-anything). This model
provides a robust and fast image segmentation pipeline that can be tweaked via
some prompting (requesting some points to be in the target mask, r... | candle/candle-examples/examples/segment-anything/README.md/0 | {
"file_path": "candle/candle-examples/examples/segment-anything/README.md",
"repo_id": "candle",
"token_count": 573
} | 47 |
# 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/chrf/chrf.py/0 | {
"file_path": "datasets/metrics/chrf/chrf.py",
"repo_id": "datasets",
"token_count": 3169
} | 128 |
<jupyter_start><jupyter_text>Vespa>[Vespa](https://vespa.ai/) is a fully featured search engine and vector database. It supports vector search (ANN), lexical search, and search in structured data, all in the same query.This notebook shows how to use `Vespa.ai` as a LangChain retriever.In order to create a retriever, we... | langchain/docs/docs/integrations/retrievers/vespa.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/vespa.ipynb",
"repo_id": "langchain",
"token_count": 642
} | 165 |
<!---
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/docs/source/zh/contributing.md/0 | {
"file_path": "transformers/docs/source/zh/contributing.md",
"repo_id": "transformers",
"token_count": 10637
} | 504 |
<!---
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/docs/source/en/pr_checks.md/0 | {
"file_path": "transformers/docs/source/en/pr_checks.md",
"repo_id": "transformers",
"token_count": 3180
} | 527 |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
MessageRole,
)
from llama_i... | llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/llama_index/llms/anthropic/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/llama_index/llms/anthropic/base.py",
"repo_id": "llama_index",
"token_count": 3855
} | 1,342 |
# coding=utf-8
# Copyright 2022 SenseTime and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | transformers/src/transformers/models/deta/modeling_deta.py/0 | {
"file_path": "transformers/src/transformers/models/deta/modeling_deta.py",
"repo_id": "transformers",
"token_count": 60042
} | 661 |
"""
Adapted from https://github.com/venuv/langchain_yt_tools
CustomYTSearchTool searches YouTube videos related to a person
and returns a specified number of video URLs.
Input to this tool should be a comma separated list,
- the first part contains a person name
- and the second(optional) a number that is the
ma... | langchain/libs/community/langchain_community/tools/youtube/search.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/youtube/search.py",
"repo_id": "langchain",
"token_count": 625
} | 297 |
# Diffusion pour l'audio
<CourseFloatingBanner unit={4}
classNames="absolute z-10 right-0 top-0"
notebooks={[
{label: "Diffusion pour l'audio", value: "https://colab.research.google.com/github/huggingface/diffusion-models-class/blob/main/units/fr/unit4/diffusion_for_audio.ipynb"},
{label: "Diffusion pour l'au... | diffusion-models-class/units/fr/unit4/3.mdx/0 | {
"file_path": "diffusion-models-class/units/fr/unit4/3.mdx",
"repo_id": "diffusion-models-class",
"token_count": 7898
} | 266 |
use std::ffi::c_void;
use std::ops::Bound;
use tantivy::{directory::MmapDirectory, Index};
pub fn index_exist(path: &str) -> bool {
let dir = MmapDirectory::open(path).unwrap();
Index::exists(&dir).unwrap()
}
pub fn make_bounds<T>(bound: T, inclusive: bool) -> Bound<T> {
if inclusive {
Bound::Inc... | milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/util.rs/0 | {
"file_path": "milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/util.rs",
"repo_id": "milvus",
"token_count": 297
} | 1,900 |
<jupyter_start><jupyter_text>Org-mode>A [Org Mode document](https://en.wikipedia.org/wiki/Org-mode) is a document editing, formatting, and organizing mode, designed for notes, planning, and authoring within the free software text editor Emacs. `UnstructuredOrgModeLoader`You can load data from Org-mode files with `Unst... | langchain/docs/docs/integrations/document_loaders/org_mode.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/org_mode.ipynb",
"repo_id": "langchain",
"token_count": 239
} | 112 |
from llama_index.storage.kvstore.firestore.base import FirestoreKVStore
__all__ = ["FirestoreKVStore"]
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/llama_index/storage/kvstore/firestore/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/llama_index/storage/kvstore/firestore/__init__.py",
"repo_id": "llama_index",
"token_count": 36
} | 1,605 |
#!/usr/bin/env python
# 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... | transformers/examples/legacy/seq2seq/finetune_trainer.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/finetune_trainer.py",
"repo_id": "transformers",
"token_count": 5726
} | 543 |
<!---
Copyright 2021 The Google Flax Team Authors and 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 r... | transformers/examples/flax/question-answering/README.md/0 | {
"file_path": "transformers/examples/flax/question-answering/README.md",
"repo_id": "transformers",
"token_count": 1047
} | 552 |
from langchain_community.agent_toolkits.nla.tool import NLATool
__all__ = ["NLATool"]
| langchain/libs/langchain/langchain/agents/agent_toolkits/nla/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/nla/tool.py",
"repo_id": "langchain",
"token_count": 32
} | 466 |
python_tests()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-voyageai/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,200 |
<jupyter_start><jupyter_text>SurrealDB>[SurrealDB](https://surrealdb.com/) is an end-to-end cloud-native database designed for modern applications, including web, mobile, serverless, Jamstack, backend, and traditional applications. With SurrealDB, you can simplify your database and API infrastructure, reduce developmen... | langchain/docs/docs/integrations/document_loaders/surrealdb.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/surrealdb.ipynb",
"repo_id": "langchain",
"token_count": 839
} | 119 |
# Pod Failure Testcases All-in-one
# pod kill
# standalone
# todo
# cluster-1-node
# 11 pods(proxy, rootcoord, querynode, querycoord, datanode, datacoord,
# indexnode, indexcoord, pulsar, etcd, minio)
# cluster-n-nodes
# todo
Collections:
-
testcase:
name: test... | milvus/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml",
"repo_id": "milvus",
"token_count": 2271
} | 1,966 |
// 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/datacoord/client/client.go/0 | {
"file_path": "milvus/internal/distributed/datacoord/client/client.go",
"repo_id": "milvus",
"token_count": 9643
} | 1,849 |
# OpenAI Image Generation Tool
This tool allows Agents to generate images using OpenAI's DALL-E model. To see more and get started, visit https://openai.com/blog/dall-e/
## Usage
This tool has a more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/lla... | llama_index/llama-index-integrations/tools/llama-index-tools-openai/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-openai/README.md",
"repo_id": "llama_index",
"token_count": 508
} | 1,575 |
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.mongodb import MongoDBAtlasVectorSearch
def test_class():
names_of_base_classes = [b.__name__ for b in MongoDBAtlasVectorSearch.__mro__]
assert BasePydanticVectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/test_vector_stores_mongodb.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/test_vector_stores_mongodb.py",
"repo_id": "llama_index",
"token_count": 105
} | 1,490 |
import { OpenAI } from "@langchain/openai";
import { PromptTemplate } from "@langchain/core/prompts";
import { CommaSeparatedListOutputParser } from "@langchain/core/output_parsers";
import { RunnableSequence } from "@langchain/core/runnables";
export const run = async () => {
// With a `CommaSeparatedListOutputPars... | langchainjs/examples/src/prompts/comma_list_parser_sequence.ts/0 | {
"file_path": "langchainjs/examples/src/prompts/comma_list_parser_sequence.ts",
"repo_id": "langchainjs",
"token_count": 337
} | 834 |
# coding=utf-8
# Copyright 2023 Meta AI and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | transformers/src/transformers/models/dinov2/modeling_dinov2.py/0 | {
"file_path": "transformers/src/transformers/models/dinov2/modeling_dinov2.py",
"repo_id": "transformers",
"token_count": 15219
} | 662 |
# __app_name__
## Installation
Install the LangChain CLI if you haven't yet
```bash
pip install -U langchain-cli
```
## Adding packages
```bash
# adding packages from
# https://github.com/langchain-ai/langchain/tree/master/templates
langchain app add $PROJECT_NAME
# adding custom GitHub repo packages
langchain a... | langchain/libs/cli/langchain_cli/project_template/README.md/0 | {
"file_path": "langchain/libs/cli/langchain_cli/project_template/README.md",
"repo_id": "langchain",
"token_count": 611
} | 223 |
<jupyter_start><jupyter_text>OctoAI>[OctoML](https://docs.octoai.cloud/docs) is a service with efficient compute. It enables users to integrate their choice of AI models into applications. The `OctoAI` compute service helps you run, tune, and scale AI applications.This example goes over how to use LangChain to interact... | langchain/docs/docs/integrations/llms/octoai.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/octoai.ipynb",
"repo_id": "langchain",
"token_count": 863
} | 121 |
#include <iostream>
#include "dynamic_bitset_ext.hpp"
namespace {
struct PtrWrapper {
explicit PtrWrapper(char*& ptr) : ptr_(ptr) {}
char*& ptr_;
};
struct ConstPtrWrapper {
explicit ConstPtrWrapper(const char*& ptr) : ptr_(ptr) {}
const char*& ptr_;
};
using Block = unsigned long;
using Allocator = ... | milvus/internal/core/thirdparty/boost_ext/dynamic_bitset_ext.cpp/0 | {
"file_path": "milvus/internal/core/thirdparty/boost_ext/dynamic_bitset_ext.cpp",
"repo_id": "milvus",
"token_count": 676
} | 1,749 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/persimmon.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/persimmon.md",
"repo_id": "transformers",
"token_count": 1564
} | 491 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-spotify/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-spotify/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,380 |
import { parse, format } from "node:path";
import { readdir, readFile, writeFile } from "node:fs/promises";
export async function moveAndRename({
source,
dest,
abs,
}: {
source: string;
dest: string;
abs: (p: string) => string;
}) {
try {
for (const file of await readdir(abs(source), { withFileTypes:... | langchainjs/libs/langchain-scripts/src/move-cjs-to-dist.ts/0 | {
"file_path": "langchainjs/libs/langchain-scripts/src/move-cjs-to-dist.ts",
"repo_id": "langchainjs",
"token_count": 550
} | 999 |
"""Default prompt selectors."""
from llama_index.legacy.prompts import SelectorPromptTemplate
from llama_index.legacy.prompts.chat_prompts import (
CHAT_REFINE_PROMPT,
CHAT_REFINE_TABLE_CONTEXT_PROMPT,
CHAT_TEXT_QA_PROMPT,
CHAT_TREE_SUMMARIZE_PROMPT,
)
from llama_index.legacy.prompts.default_prompts im... | llama_index/llama-index-legacy/llama_index/legacy/prompts/default_prompt_selectors.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/prompts/default_prompt_selectors.py",
"repo_id": "llama_index",
"token_count": 531
} | 1,511 |
# 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/pipelines/text_to_audio.py/0 | {
"file_path": "transformers/src/transformers/pipelines/text_to_audio.py",
"repo_id": "transformers",
"token_count": 3322
} | 701 |
# 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/examples/legacy/benchmarking/plot_csv_file.py/0 | {
"file_path": "transformers/examples/legacy/benchmarking/plot_csv_file.py",
"repo_id": "transformers",
"token_count": 2905
} | 577 |
"""Init composability."""
from llama_index.core.composability.base import ComposableGraph
from llama_index.core.composability.joint_qa_summary import (
QASummaryQueryEngineBuilder,
)
__all__ = ["ComposableGraph", "QASummaryQueryEngineBuilder"]
| llama_index/llama-index-core/llama_index/core/composability/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/composability/__init__.py",
"repo_id": "llama_index",
"token_count": 82
} | 1,168 |
import asyncio
import os
import time
import urllib.request
import uuid
from enum import Enum
from typing import Any
from urllib.error import HTTPError
import pytest
from langchain_community.agent_toolkits.ainetwork.toolkit import AINetworkToolkit
from langchain_community.chat_models import ChatOpenAI
from langchain_co... | langchain/libs/langchain/tests/integration_tests/agent/test_ainetwork_agent.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/agent/test_ainetwork_agent.py",
"repo_id": "langchain",
"token_count": 2639
} | 578 |
from langchain_community.document_loaders.word_document import (
Docx2txtLoader,
UnstructuredWordDocumentLoader,
)
__all__ = ["Docx2txtLoader", "UnstructuredWordDocumentLoader"]
| langchain/libs/langchain/langchain/document_loaders/word_document.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/word_document.py",
"repo_id": "langchain",
"token_count": 61
} | 493 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.airbyte_stripe import AirbyteStripeReader
def test_class():
names_of_base_classes = [b.__name__ for b in AirbyteStripeReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-stripe/tests/test_readers_airbyte_stripe.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-stripe/tests/test_readers_airbyte_stripe.py",
"repo_id": "llama_index",
"token_count": 97
} | 1,314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.