text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
"""Base embeddings file."""
import asyncio
from abc import abstractmethod
from enum import Enum
from typing import Any, Callable, Coroutine, List, Optional, Tuple
import numpy as np
from llama_index.core.bridge.pydantic import Field, validator
from llama_index.core.callbacks.base import CallbackManager
from llama_ind... | llama_index/llama-index-core/llama_index/core/base/embeddings/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/base/embeddings/base.py",
"repo_id": "llama_index",
"token_count": 5687
} | 1,199 |
"""You Retriever."""
import logging
import os
from typing import List, Optional
import requests
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.core.base_retriever import BaseRetriever
from llama_index.legacy.indices.query.schema import QueryBundle
from llama_index.legacy.schema... | llama_index/llama-index-legacy/llama_index/legacy/retrievers/you_retriever.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/retrievers/you_retriever.py",
"repo_id": "llama_index",
"token_count": 490
} | 1,615 |
import pytest
from text_generation import Client, AsyncClient
from text_generation.errors import NotFoundError, ValidationError
from text_generation.types import FinishReason, InputToken
def test_generate(flan_t5_xxl_url, hf_headers):
client = Client(flan_t5_xxl_url, hf_headers)
response = client.generate("t... | text-generation-inference/clients/python/tests/test_client.py/0 | {
"file_path": "text-generation-inference/clients/python/tests/test_client.py",
"repo_id": "text-generation-inference",
"token_count": 2116
} | 387 |
from llama_index.tools.tavily_research.base import TavilyToolSpec
__all__ = ["TavilyToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/__init__.py",
"repo_id": "llama_index",
"token_count": 34
} | 1,583 |
// 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/proxy/task_alias.go/0 | {
"file_path": "milvus/internal/proxy/task_alias.go",
"repo_id": "milvus",
"token_count": 3215
} | 1,852 |
from typing import Any, Dict, List, Optional
from langchain_community.graphs.graph_store import GraphStore
class TigerGraph(GraphStore):
"""TigerGraph wrapper for graph operations.
*Security note*: Make sure that the database connection uses credentials
that are narrowly-scoped to only include neces... | langchain/libs/community/langchain_community/graphs/tigergraph_graph.py/0 | {
"file_path": "langchain/libs/community/langchain_community/graphs/tigergraph_graph.py",
"repo_id": "langchain",
"token_count": 1282
} | 276 |
import { z } from "zod";
import { ChatOpenAI } from "@langchain/openai";
import {
AgentExecutor,
StructuredChatOutputParserWithRetries,
} from "langchain/agents";
import { Calculator } from "langchain/tools/calculator";
import { renderTextDescriptionAndArgs } from "langchain/tools/render";
import { formatLogToStrin... | langchainjs/examples/src/agents/structured_chat_runnable.ts/0 | {
"file_path": "langchainjs/examples/src/agents/structured_chat_runnable.ts",
"repo_id": "langchainjs",
"token_count": 1987
} | 786 |
# Metric Card for SuperGLUE
## Metric description
This metric is used to compute the SuperGLUE evaluation metric associated to each of the subsets of the [SuperGLUE dataset](https://huggingface.co/datasets/super_glue).
SuperGLUE is a new benchmark styled after GLUE with a new set of more difficult language understan... | datasets/metrics/super_glue/README.md/0 | {
"file_path": "datasets/metrics/super_glue/README.md",
"repo_id": "datasets",
"token_count": 1767
} | 131 |
# Hive Loader
The Hive Loader returns a set of texts corresponding to documents from Hive based on the customized query.
The user initializes the loader with Hive connection args and then using query to fetch data from Hive.
## Usage
Here's an example usage of the hiveReader to load 100 documents.
```python
from ll... | llama_index/llama-index-integrations/readers/llama-index-readers-hive/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hive/README.md",
"repo_id": "llama_index",
"token_count": 297
} | 1,364 |
{
"fp16": {
"enabled": "auto",
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"bf16": {
"enabled": "auto"
},
"optimizer": {
"type": "AdamW",
"params": {
... | transformers/tests/deepspeed/ds_config_zero2.json/0 | {
"file_path": "transformers/tests/deepspeed/ds_config_zero2.json",
"repo_id": "transformers",
"token_count": 678
} | 792 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,375 |
// 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/querynodev2/segments/statistics.go/0 | {
"file_path": "milvus/internal/querynodev2/segments/statistics.go",
"repo_id": "milvus",
"token_count": 873
} | 1,772 |
# 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/pipelines/test_pipelines_common.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_common.py",
"repo_id": "transformers",
"token_count": 14399
} | 748 |
import { ChromaClient } from '../../src/ChromaClient';
// import env.ts
window.onload = async () => {
const chroma = new ChromaClient({ path: "http://localhost:8000" });
await chroma.reset();
const collection = await chroma.createCollection({ name: "test-from-js" });
console.log("collection", collection);
... | chroma/clients/js/examples/browser/app.ts/0 | {
"file_path": "chroma/clients/js/examples/browser/app.ts",
"repo_id": "chroma",
"token_count": 597
} | 26 |
// If you want to import the browser version, use the following line instead:
// import { CloseVectorWeb } from "@langchain/community/vectorstores/closevector/web";
import { CloseVectorNode } from "@langchain/community/vectorstores/closevector/node";
import { OpenAIEmbeddings } from "@langchain/openai";
import { TextLo... | langchainjs/examples/src/indexes/vector_stores/closevector_fromdocs.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/closevector_fromdocs.ts",
"repo_id": "langchainjs",
"token_count": 245
} | 826 |
"""Helper functions for managing the LangChain API.
This module is only relevant for LangChain developers, not for users.
.. warning::
This module and its submodules are for internal use only. Do not use them
in your own code. We may change the API at any time with no warning.
"""
from .beta_decorator imp... | langchain/libs/core/langchain_core/_api/__init__.py/0 | {
"file_path": "langchain/libs/core/langchain_core/_api/__init__.py",
"repo_id": "langchain",
"token_count": 359
} | 419 |
<!--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/prophetnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/prophetnet.md",
"repo_id": "transformers",
"token_count": 1170
} | 484 |
""" Depthwise Separable Conv Modules
Basic DWS convs. Other variations of DWS exist with batch norm or activations between the
DW and PW convs such as the Depthwise modules in MobileNetV2 / EfficientNet and Xception.
Hacked together by / Copyright 2020 Ross Wightman
"""
from torch import nn as nn
from .create_conv2d... | pytorch-image-models/timm/layers/separable_conv.py/0 | {
"file_path": "pytorch-image-models/timm/layers/separable_conv.py",
"repo_id": "pytorch-image-models",
"token_count": 1138
} | 370 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/datanode/flow_graph_node.go/0 | {
"file_path": "milvus/internal/datanode/flow_graph_node.go",
"repo_id": "milvus",
"token_count": 457
} | 1,784 |
"""Node postprocessor."""
import logging
from typing import Dict, List, Optional, cast
from llama_index.legacy.bridge.pydantic import Field, validator
from llama_index.legacy.postprocessor.types import BaseNodePostprocessor
from llama_index.legacy.prompts.base import PromptTemplate
from llama_index.legacy.response_sy... | llama_index/llama-index-legacy/llama_index/legacy/postprocessor/node.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/postprocessor/node.py",
"repo_id": "llama_index",
"token_count": 5939
} | 1,598 |
# Fusion Retriever Packs
## Hybrid Fusion Pack
This LlamaPack provides an example of our hybrid fusion retriever method.
This specific template fuses results from our vector retriever and bm25 retriever; of course, you can provide any template you want.
Check out the [notebook here](https://github.com/run-llama/lla... | llama_index/llama-index-packs/llama-index-packs-fusion-retriever/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-fusion-retriever/README.md",
"repo_id": "llama_index",
"token_count": 1236
} | 1,582 |
/* eslint-disable */
/**
* Generated utilities for implementing server-side Convex query and mutation functions.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@1.3.1.
* To regenerate, run `npx convex dev`.
* @module
*/
import {
actionGeneric,
httpActionGeneric,
queryGeneric,
mutation... | langchainjs/examples/src/embeddings/convex/_generated/server.js/0 | {
"file_path": "langchainjs/examples/src/embeddings/convex/_generated/server.js",
"repo_id": "langchainjs",
"token_count": 922
} | 859 |
import { test, expect } from "@jest/globals";
import { WikipediaQueryRun } from "../wikipedia_query_run.js";
test.skip("WikipediaQueryRunTool returns a string for valid query", async () => {
const tool = new WikipediaQueryRun();
const result = await tool.call("Langchain");
expect(typeof result).toBe("string");
}... | langchainjs/libs/langchain-community/src/tools/tests/wikipedia.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/tests/wikipedia.int.test.ts",
"repo_id": "langchainjs",
"token_count": 257
} | 1,009 |
#! /bin/bash
make verifiers
| milvus/githooks/pre-push/verifiers/0 | {
"file_path": "milvus/githooks/pre-push/verifiers",
"repo_id": "milvus",
"token_count": 12
} | 1,912 |
from typing import Any, Dict, List, Optional
import httpx
from llama_index.core.base.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr
from llama_index.core.callbacks import CallbackManager
from llama_index.embeddings.anyscale.ut... | llama_index/llama-index-integrations/embeddings/llama-index-embeddings-anyscale/llama_index/embeddings/anyscale/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-anyscale/llama_index/embeddings/anyscale/base.py",
"repo_id": "llama_index",
"token_count": 4086
} | 1,351 |
"""Test chat model integration."""
import json
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
from unittest.mock import MagicMock, Mock, patch
import pytest
from google.cloud.aiplatform_v1beta1.types import (
Content,
FunctionCall,
Part,
)
from google.cloud.aiplatfor... | langchain/libs/partners/google-vertexai/tests/unit_tests/test_chat_models.py/0 | {
"file_path": "langchain/libs/partners/google-vertexai/tests/unit_tests/test_chat_models.py",
"repo_id": "langchain",
"token_count": 5188
} | 630 |
---
sidebar_position: 0
---
# Document loaders
:::info
Head to [Integrations](/docs/integrations/document_loaders/) for documentation on built-in document loader integrations with 3rd-party tools.
:::
Use document loaders to load data from a source as `Document`'s. A `Document` is a piece of text
and associated metad... | langchain/docs/docs/modules/data_connection/document_loaders/index.mdx/0 | {
"file_path": "langchain/docs/docs/modules/data_connection/document_loaders/index.mdx",
"repo_id": "langchain",
"token_count": 475
} | 188 |
import pytest
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain.agents.mrkl.output_parser import (
MISSING_ACTION_AFTER_THOUGHT_ERROR_MESSAGE,
MISSING_ACTION_INPUT_AFTER_ACTION_ERROR_MESSAGE,
MRKLOutputParser,
)
mrkl_outpu... | langchain/libs/langchain/tests/unit_tests/agents/test_mrkl_output_parser.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/agents/test_mrkl_output_parser.py",
"repo_id": "langchain",
"token_count": 1001
} | 631 |
# 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/marian/test_modeling_tf_marian.py/0 | {
"file_path": "transformers/tests/models/marian/test_modeling_tf_marian.py",
"repo_id": "transformers",
"token_count": 5072
} | 770 |
<jupyter_start><jupyter_text>Cogniswitch LlamaPack**Use CogniSwitch to build production ready applications that can consume, organize and retrieve knowledge flawlessly. Using the framework of your choice, in this case LlamaIndex, CogniSwitch helps alleviate the stress of decision making when it comes to, choosing the r... | llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/examples/cogniswitch_agent_example.ipynb/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/examples/cogniswitch_agent_example.ipynb",
"repo_id": "llama_index",
"token_count": 1046
} | 1,578 |
<jupyter_start><jupyter_text>Stable Diffusion on Amazon SageMakerWelcome to this Amazon SageMaker guide on how to use the [Stable Diffusion](https://huggingface.co/blog/stable_diffusion) to generate image for a given input prompt. We will deploy [CompVis/stable-diffusion-v1-4](https://huggingface.co/CompVis/stable-diff... | notebooks/sagemaker/23_stable_diffusion_inference/sagemaker-notebook.ipynb/0 | {
"file_path": "notebooks/sagemaker/23_stable_diffusion_inference/sagemaker-notebook.ipynb",
"repo_id": "notebooks",
"token_count": 4469
} | 330 |
<jupyter_start><jupyter_text>mhtmlMHTML is a is used both for emails but also for archived webpages. MHTML, sometimes referred as MHT, stands for MIME HTML is a single file in which entire webpage is archived. When one saves a webpage as MHTML format, this file extension will contain HTML code, images, audio files, fla... | langchain/docs/docs/integrations/document_loaders/mhtml.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/mhtml.ipynb",
"repo_id": "langchain",
"token_count": 495
} | 110 |
use candle::{DType, Device, Result, Tensor, D};
use candle_nn::{embedding, Embedding, LayerNorm, Linear, Module, VarBuilder};
const MAX_SEQ_LEN: usize = 5000;
fn linear(size1: usize, size2: usize, bias: bool, vb: VarBuilder) -> Result<Linear> {
let weight = vb.get((size2, size1), "weight")?;
let bias = if bia... | candle/candle-transformers/src/models/falcon.rs/0 | {
"file_path": "candle/candle-transformers/src/models/falcon.rs",
"repo_id": "candle",
"token_count": 8568
} | 65 |
"""Simple Reader that reads abstract of primary citation for a given PDB id."""
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
from llama_index.readers.pdb.utils import get_pdb_abstract
class PdbAbstractReader(BaseReader):
"""Protein Data... | llama_index/llama-index-integrations/readers/llama-index-readers-pdb/llama_index/readers/pdb/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pdb/llama_index/readers/pdb/base.py",
"repo_id": "llama_index",
"token_count": 578
} | 1,445 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/flava/image_processing_flava.py/0 | {
"file_path": "transformers/src/transformers/models/flava/image_processing_flava.py",
"repo_id": "transformers",
"token_count": 16167
} | 634 |
# order by contributions
reviewers:
- DragonDriver
- czs007
- FluorineDog
- godchen0212
- xiaocai2333
approvers:
- maintainers
| milvus/internal/proxy/OWNERS/0 | {
"file_path": "milvus/internal/proxy/OWNERS",
"repo_id": "milvus",
"token_count": 54
} | 1,810 |
# Clarifai
>[Clarifai](https://clarifai.com) is one of first deep learning platforms having been founded in 2013. Clarifai provides an AI platform with the full AI lifecycle for data exploration, data labeling, model training, evaluation and inference around images, video, text and audio data. In the LangChain ecosyst... | langchain/docs/docs/integrations/providers/clarifai.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/clarifai.mdx",
"repo_id": "langchain",
"token_count": 1294
} | 142 |
from langchain.schema import __all__
EXPECTED_ALL = [
"BaseCache",
"BaseMemory",
"BaseStore",
"AgentFinish",
"AgentAction",
"Document",
"BaseChatMessageHistory",
"BaseDocumentTransformer",
"BaseMessage",
"ChatMessage",
"FunctionMessage",
"HumanMessage",
"AIMessage",
... | langchain/libs/langchain/tests/unit_tests/schema/test_imports.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/schema/test_imports.py",
"repo_id": "langchain",
"token_count": 384
} | 611 |
# coding=utf-8
# Copyright Studio Ousia 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
#
# Unless required b... | transformers/src/transformers/models/luke/modeling_luke.py/0 | {
"file_path": "transformers/src/transformers/models/luke/modeling_luke.py",
"repo_id": "transformers",
"token_count": 43009
} | 693 |
from __future__ import annotations
import logging
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.vectorstores import VectorStore
if TYPE_CHECKING:
from transwarp_hippo_... | langchain/libs/community/langchain_community/vectorstores/hippo.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/hippo.py",
"repo_id": "langchain",
"token_count": 13268
} | 315 |
"""Integration test for NASA API Wrapper."""
from langchain_community.utilities.nasa import NasaAPIWrapper
def test_media_search() -> None:
"""Test for NASA Image and Video Library media search"""
nasa = NasaAPIWrapper()
query = '{"q": "saturn", + "year_start": "2002", "year_end": "2010", "page": 2}'
... | langchain/libs/community/tests/integration_tests/utilities/test_nasa.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_nasa.py",
"repo_id": "langchain",
"token_count": 399
} | 345 |
[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 = ["MongoIndexStore"]
contains_example = false
import_path = "llama_index.storage.index_store... | llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/pyproject.toml",
"repo_id": "llama_index",
"token_count": 669
} | 1,463 |
# coding=utf-8
# 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 requir... | transformers/tests/models/roberta_prelayernorm/test_modeling_roberta_prelayernorm.py/0 | {
"file_path": "transformers/tests/models/roberta_prelayernorm/test_modeling_roberta_prelayernorm.py",
"repo_id": "transformers",
"token_count": 10713
} | 837 |
"""Test ElasticSearch functionality."""
import logging
import os
import uuid
from typing import Generator, List, Union
import pytest
from langchain_core.documents import Document
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores.elastic_vector_search import ElasticVecto... | langchain/libs/community/tests/integration_tests/vectorstores/test_elastic_vector_search.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_elastic_vector_search.py",
"repo_id": "langchain",
"token_count": 2384
} | 377 |
<jupyter_start><jupyter_text>Notion ReaderDemonstrates our Notion data connector<jupyter_code>%pip install llama-index-readers-notion
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))<jupyter_output><empty_outpu... | llama_index/docs/examples/data_connectors/NotionDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/NotionDemo.ipynb",
"repo_id": "llama_index",
"token_count": 550
} | 1,048 |
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { BedrockEmbeddings } from "@langchain/community/embeddings/bedrock";
const embeddings = new BedrockEmbeddings({
region: process.env.BEDROCK_AWS_REGION!,
credentials: {
accessKeyId: process.env.BEDROCK_AWS_ACCESS_KEY_ID!,
secretAccessKey:... | langchainjs/examples/src/embeddings/bedrock.ts/0 | {
"file_path": "langchainjs/examples/src/embeddings/bedrock.ts",
"repo_id": "langchainjs",
"token_count": 205
} | 858 |
<!---
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/fr/installation.md/0 | {
"file_path": "transformers/docs/source/fr/installation.md",
"repo_id": "transformers",
"token_count": 3844
} | 508 |
#my-component-root *,
#headlessui-portal-root * {
z-index: 1000000000000;
font-size: 100%;
}
textarea {
border: 0;
padding: 0;
}
article p {
margin-bottom: 10px !important;
}
| llama_index/docs/_static/css/custom.css/0 | {
"file_path": "llama_index/docs/_static/css/custom.css",
"repo_id": "llama_index",
"token_count": 78
} | 1,055 |
import asyncio
from typing import (
TYPE_CHECKING,
Any,
AsyncIterator,
Awaitable,
Dict,
Iterator,
List,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)
from langchain_core.load.dump import dumpd
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.run... | langchain/libs/core/langchain_core/runnables/fallbacks.py/0 | {
"file_path": "langchain/libs/core/langchain_core/runnables/fallbacks.py",
"repo_id": "langchain",
"token_count": 9631
} | 422 |
# Query Engines + Pydantic Outputs
Using `index.as_query_engine()` and it's underlying `RetrieverQueryEngine`, we can support structured pydantic outputs without an additional LLM calls (in contrast to a typical output parser.)
Every query engine has support for integrated structured responses using the following `re... | llama_index/docs/module_guides/querying/structured_outputs/query_engine.md/0 | {
"file_path": "llama_index/docs/module_guides/querying/structured_outputs/query_engine.md",
"repo_id": "llama_index",
"token_count": 585
} | 1,149 |
from llama_index.readers.couchdb.base import SimpleCouchDBReader
__all__ = ["SimpleCouchDBReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-couchdb/llama_index/readers/couchdb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-couchdb/llama_index/readers/couchdb/__init__.py",
"repo_id": "llama_index",
"token_count": 34
} | 1,304 |
from enum import Enum
from typing import Dict, Type
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 Neo4jGra... | llama_index/llama-index-legacy/llama_index/legacy/graph_stores/registry.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/graph_stores/registry.py",
"repo_id": "llama_index",
"token_count": 424
} | 1,514 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.cohere import Cohere
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in Cohere.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-cohere/tests/test_llms_cohere.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-cohere/tests/test_llms_cohere.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,219 |
<jupyter_start><jupyter_text>Before we can browse the rest of the notebook, we need to install the dependencies: this example uses `datasets` and `transformers`. To use TPUs on colab, we need to install `torch_xla` and the last line install `accelerate` from source since we the features we are using are very recent and... | notebooks/examples/accelerate_examples/simple_nlp_example.ipynb/0 | {
"file_path": "notebooks/examples/accelerate_examples/simple_nlp_example.ipynb",
"repo_id": "notebooks",
"token_count": 6454
} | 302 |
import { base } from "$app/paths";
import { redirect } from "@sveltejs/kit";
export async function load({ parent, params }) {
const data = await parent();
const model = data.models.find(({ id }) => id === params.model);
if (!model || model.unlisted) {
throw redirect(302, `${base}/settings`);
}
return data;
}... | chat-ui/src/routes/settings/[...model]/+page.ts/0 | {
"file_path": "chat-ui/src/routes/settings/[...model]/+page.ts",
"repo_id": "chat-ui",
"token_count": 105
} | 105 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | transformers/tests/tools/test_image_segmentation.py/0 | {
"file_path": "transformers/tests/tools/test_image_segmentation.py",
"repo_id": "transformers",
"token_count": 742
} | 838 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hatena-blog/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,382 |
"""Test AzureML chat endpoint."""
import os
import pytest
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture, FixtureRequest
from langchain_community.chat_models.azureml_endpoint import AzureMLChatOnlineEndpoint
@pytest.fixture(scope="class")
def api_passed_via_environment_fixture()... | langchain/libs/community/tests/unit_tests/chat_models/test_azureml_endpoint.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/chat_models/test_azureml_endpoint.py",
"repo_id": "langchain",
"token_count": 970
} | 362 |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_NUM_OUTPUTS, DEFAULT_TEMPERATURE
from llama_index.legacy.core.llms.types import ChatMessage, LLMMetadata
from llama_index.legacy.llms.anyscale_utils impor... | llama_index/llama-index-legacy/llama_index/legacy/llms/anyscale.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llms/anyscale.py",
"repo_id": "llama_index",
"token_count": 1220
} | 1,731 |
[
{
"suite_params": [
{
"suite": "shards_ann_debug.yaml",
"image_type": "cpu"
}
]
}
]
| milvus/tests/benchmark/milvus_benchmark/scheduler/shards_ann.json/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/scheduler/shards_ann.json",
"repo_id": "milvus",
"token_count": 119
} | 1,870 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/mbox/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/mbox/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,350 |
<jupyter_start><jupyter_text>Joint Tabular/Semantic QA over Tesla 10KIn this example, we show how to ask questions over 10K with understanding of both the unstructured text as well as embedded tables.We use Unstructured to parse out the tables, and use LlamaIndex recursive retrieval to index/retrieve tables if necessar... | llama_index/docs/examples/query_engine/sec_tables/tesla_10q_table.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/sec_tables/tesla_10q_table.ipynb",
"repo_id": "llama_index",
"token_count": 4314
} | 1,077 |
import { parseOfficeAsync } from "officeparser";
import { Document } from "@langchain/core/documents";
import { BufferLoader } from "./buffer.js";
/**
* A class that extends the `BufferLoader` class. It represents a document
* loader that loads documents from PDF files.
*/
export class PPTXLoader extends BufferLoad... | langchainjs/langchain/src/document_loaders/fs/pptx.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/fs/pptx.ts",
"repo_id": "langchainjs",
"token_count": 420
} | 875 |
import os
from typing import Optional
import fsspec
from llama_index.legacy.storage.index_store.keyval_index_store import KVIndexStore
from llama_index.legacy.storage.index_store.types import (
DEFAULT_PERSIST_DIR,
DEFAULT_PERSIST_FNAME,
DEFAULT_PERSIST_PATH,
)
from llama_index.legacy.storage.kvstore.simp... | llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/simple_index_store.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/storage/index_store/simple_index_store.py",
"repo_id": "llama_index",
"token_count": 1020
} | 1,717 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/flava.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/flava.md",
"repo_id": "transformers",
"token_count": 916
} | 443 |
# Fine-Tuning week of XLSR-Wav2Vec2 on 60 languages 🌍
Welcome to the fine-tuning week! The goal of this week is to have state-of-the-art automatic speech recognition (ASR) models in as many languages as possible. The fine-tuning week ends on Friday, the 26th March at midnight PST time.
Participants are encouraged to... | transformers/examples/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md",
"repo_id": "transformers",
"token_count": 9587
} | 578 |
<!--Copyright 2022 The HuggingFace Team and The OpenBMB 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 app... | transformers/docs/source/en/model_doc/cpmant.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/cpmant.md",
"repo_id": "transformers",
"token_count": 534
} | 480 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-azure-speech/llama_index/tools/azure_speech/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-azure-speech/llama_index/tools/azure_speech/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,471 |
""" Norm Layer Factory
Create norm modules by string (to mirror create_act and creat_norm-act fns)
Copyright 2022 Ross Wightman
"""
import functools
import types
from typing import Type
import torch.nn as nn
from .norm import GroupNorm, GroupNorm1, LayerNorm, LayerNorm2d, RmsNorm
from torchvision.ops.misc import Fr... | pytorch-image-models/timm/layers/create_norm.py/0 | {
"file_path": "pytorch-image-models/timm/layers/create_norm.py",
"repo_id": "pytorch-image-models",
"token_count": 630
} | 363 |
from types import ModuleType, SimpleNamespace
from typing import TYPE_CHECKING, Any, Callable, Dict
from langchain_core.tracers import BaseTracer
if TYPE_CHECKING:
from uuid import UUID
from comet_llm import Span
from comet_llm.chains.chain import Chain
from langchain_community.callbacks.tracers.sch... | langchain/libs/community/langchain_community/callbacks/tracers/comet.py/0 | {
"file_path": "langchain/libs/community/langchain_community/callbacks/tracers/comet.py",
"repo_id": "langchain",
"token_count": 2190
} | 231 |
from abc import abstractmethod
from typing import (
Any,
Sequence,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
from llama_... | llama_index/llama-index-core/llama_index/core/llms/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llms/base.py",
"repo_id": "llama_index",
"token_count": 948
} | 1,275 |
# Chaindesk
>[Chaindesk](https://chaindesk.ai) is an [open-source](https://github.com/gmpetrov/databerry) document retrieval platform that helps to connect your personal data with Large Language Models.
## Installation and Setup
We need to sign up for Chaindesk, create a datastore, add some data and get your datast... | langchain/docs/docs/integrations/providers/chaindesk.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/chaindesk.mdx",
"repo_id": "langchain",
"token_count": 171
} | 131 |
import d4rl # noqa
import gym
import tqdm
from diffusers.experimental import ValueGuidedRLPipeline
config = {
"n_samples": 64,
"horizon": 32,
"num_inference_steps": 20,
"n_guide_steps": 2, # can set to 0 for faster sampling, does not use value network
"scale_grad_by_std": True,
"scale": 0.1,... | diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py/0 | {
"file_path": "diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py",
"repo_id": "diffusers",
"token_count": 724
} | 209 |
segcore:
chunk_rows: 32768
small_index:
- metric_type: ["L2", "IP"]
index_type: "IVF"
build_params:
nlist: 100
search_params:
nprobe: 4
# binary is not ready yet
- metric_type: ["jaccard"]
index_type: "IVF"
build_params:
nlist: 100
search_param... | milvus/internal/core/unittest/test_utils/test_segcore.yaml/0 | {
"file_path": "milvus/internal/core/unittest/test_utils/test_segcore.yaml",
"repo_id": "milvus",
"token_count": 177
} | 1,958 |
"""Test EdenAi's text to speech Tool .
In order to run this test, you need to have an EdenAI api key.
You can get it by registering for free at https://app.edenai.run/user/register.
A test key can be found at https://app.edenai.run/admin/account/settings by
clicking on the 'sandbox' toggle.
(calls will be free, and wi... | langchain/libs/community/tests/integration_tests/tools/edenai/test_audio_text_to_speech.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/tools/edenai/test_audio_text_to_speech.py",
"repo_id": "langchain",
"token_count": 342
} | 372 |
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest/presets/default-esm",
testEnvironment: "./jest.env.cjs",
modulePathIgnorePatterns: ["dist/", "docs/"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transform: {
"^.+\\.tsx?$": ["@swc/jest"],
},
tran... | langchainjs/libs/create-langchain-integration/template/jest.config.cjs/0 | {
"file_path": "langchainjs/libs/create-langchain-integration/template/jest.config.cjs",
"repo_id": "langchainjs",
"token_count": 246
} | 1,038 |
from langchain_community.vectorstores.annoy import (
Annoy,
)
__all__ = ["Annoy"]
| langchain/libs/langchain/langchain/vectorstores/annoy.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/annoy.py",
"repo_id": "langchain",
"token_count": 33
} | 602 |
# 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/src/transformers/utils/hp_naming.py/0 | {
"file_path": "transformers/src/transformers/utils/hp_naming.py",
"repo_id": "transformers",
"token_count": 2393
} | 691 |
from typing import Any, Dict, List, Optional
import requests
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, SecretStr, root_validator
from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env
JINA_API_URL: str = "https://api.jina.ai/v1/embeddings"... | langchain/libs/community/langchain_community/embeddings/jina.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/jina.py",
"repo_id": "langchain",
"token_count": 1191
} | 258 |
#!/usr/bin/env python
# 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/LI... | transformers/examples/flax/text-classification/run_flax_glue.py/0 | {
"file_path": "transformers/examples/flax/text-classification/run_flax_glue.py",
"repo_id": "transformers",
"token_count": 11980
} | 514 |
import pytest
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
ChatMessage,
FunctionMessage,
HumanMessage,
HumanMessageChunk,
SystemMessage,
)
from langchain_core.pydantic_v1 import SecretStr
from langchain_community.chat_models.hunyuan import (
_convert_delta_to_message... | langchain/libs/community/tests/unit_tests/chat_models/test_hunyuan.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/chat_models/test_hunyuan.py",
"repo_id": "langchain",
"token_count": 1549
} | 362 |
<!--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/bros.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bros.md",
"repo_id": "transformers",
"token_count": 3458
} | 519 |
from pathlib import Path
import pytest
from langchain_community.document_loaders.readthedocs import ReadTheDocsLoader
PARENT_DIR = Path(__file__).parent / "test_docs" / "readthedocs"
@pytest.mark.requires("bs4")
def test_main_id_main_content() -> None:
loader = ReadTheDocsLoader(PARENT_DIR / "main_id_main_cont... | langchain/libs/community/tests/unit_tests/document_loaders/test_readthedoc.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_readthedoc.py",
"repo_id": "langchain",
"token_count": 579
} | 392 |
import { describe, expect, test } from "@jest/globals";
import { ChatMessage, HumanMessage } from "@langchain/core/messages";
import {
PromptTemplate,
ChatPromptTemplate,
AIMessagePromptTemplate,
HumanMessagePromptTemplate,
SystemMessagePromptTemplate,
} from "@langchain/core/prompts";
import { ChatGoogleVert... | langchainjs/libs/langchain-community/src/chat_models/tests/chatgooglevertexai.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/chat_models/tests/chatgooglevertexai.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1238
} | 1,019 |
import type { DataSource as DataSourceT, DataSourceOptions } from "typeorm";
import { Serializable } from "@langchain/core/load/serializable";
import {
generateTableInfoFromTables,
getTableAndColumnsName,
SerializedSqlDatabase,
SqlDatabaseDataSourceParams,
SqlDatabaseOptionsParams,
SqlTable,
verifyIgnoreT... | langchainjs/langchain/src/sql_db.ts/0 | {
"file_path": "langchainjs/langchain/src/sql_db.ts",
"repo_id": "langchainjs",
"token_count": 2031
} | 950 |
from typing import Optional
import numpy as np
import pytest
from langchain_core.documents import Document
from langchain_community.vectorstores import Qdrant
from tests.integration_tests.vectorstores.fake_embeddings import (
ConsistentFakeEmbeddings,
)
from tests.integration_tests.vectorstores.qdrant.common impo... | langchain/libs/community/tests/integration_tests/vectorstores/qdrant/test_similarity_search.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/qdrant/test_similarity_search.py",
"repo_id": "langchain",
"token_count": 4262
} | 382 |
import { OpenAIEmbeddings } from "@langchain/openai";
import { Neo4jVectorStore } from "@langchain/community/vectorstores/neo4j_vector";
// Configuration object for Neo4j connection and other related settings
const config = {
url: "bolt://localhost:7687", // URL for the Neo4j instance
username: "neo4j", // Usernam... | langchainjs/examples/src/indexes/vector_stores/neo4j_vector/neo4j_vector.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/neo4j_vector/neo4j_vector.ts",
"repo_id": "langchainjs",
"token_count": 380
} | 830 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/job/scheduler.go/0 | {
"file_path": "milvus/internal/querycoordv2/job/scheduler.go",
"repo_id": "milvus",
"token_count": 1481
} | 2,030 |
# 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/tokenization_utils.py/0 | {
"file_path": "transformers/src/transformers/models/roformer/tokenization_utils.py",
"repo_id": "transformers",
"token_count": 1140
} | 738 |
# Snowflake Loader
This loader connects to Snowflake (using SQLAlchemy under the hood). The user specifies a query and extracts Document objects corresponding to the results. You can use this loader to easily connect to a database on Snowflake and pass the documents into a `GPTSQLStructStoreIndex` from LlamaIndex.
##... | llama_index/llama-index-integrations/readers/llama-index-readers-snowflake/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-snowflake/README.md",
"repo_id": "llama_index",
"token_count": 519
} | 1,420 |
from __future__ import annotations
import logging
from typing import (
Any,
AsyncIterator,
Dict,
Iterator,
List,
Optional,
)
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_core.language_models.llms import LLM
from langch... | langchain/libs/community/langchain_community/llms/baidu_qianfan_endpoint.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/baidu_qianfan_endpoint.py",
"repo_id": "langchain",
"token_count": 3445
} | 284 |
# Grammar for subset of JSON - doesn't support full string or number syntax
root ::= object
value ::= object | array | string | number | boolean | "null"
object ::=
"{" ws (
string ":" ws value
("," ws string ":" ws value)*
)? "}"
array ::=
"[" ws (
value
("," ws value)*
)? ... | langchain/libs/langchain/langchain/llms/grammars/json.gbnf/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/grammars/json.gbnf",
"repo_id": "langchain",
"token_count": 295
} | 547 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.azcognitive_search import AzCognitiveSearchReader
def test_class():
names_of_base_classes = [b.__name__ for b in AzCognitiveSearchReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-azcognitive-search/tests/test_readers_azcognitive_search.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-azcognitive-search/tests/test_readers_azcognitive_search.py",
"repo_id": "llama_index",
"token_count": 95
} | 1,338 |
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.amazon_product_extraction import AmazonProductExtractionPack
def test_class():
names_of_base_classes = [b.__name__ for b in AmazonProductExtractionPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-amazon-product-extraction/tests/test_packs_amazon_product_extraction.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-amazon-product-extraction/tests/test_packs_amazon_product_extraction.py",
"repo_id": "llama_index",
"token_count": 101
} | 1,554 |
# LlamaIndex Managed Integration: Vectara
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,271 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.zulip import ZulipReader
def test_class():
names_of_base_classes = [b.__name__ for b in ZulipReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-zulip/tests/test_readers_zulip.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-zulip/tests/test_readers_zulip.py",
"repo_id": "llama_index",
"token_count": 91
} | 1,482 |
# 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/utils/import_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/import_utils.py",
"repo_id": "diffusers",
"token_count": 9367
} | 267 |
# 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/models/clvp/test_processor_clvp.py/0 | {
"file_path": "transformers/tests/models/clvp/test_processor_clvp.py",
"repo_id": "transformers",
"token_count": 2197
} | 775 |
kafka:
enabled: true
defaultReplicationFactor: 2
pulsar:
enabled: false | milvus/tests/scripts/values/kafka.yaml/0 | {
"file_path": "milvus/tests/scripts/values/kafka.yaml",
"repo_id": "milvus",
"token_count": 27
} | 2,133 |
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
export * as load__serializable from "../load/serializable.js";
export * as tools__aiplugin from "../tools/aiplugin.js";
export * as tools__bingserpapi from "../tools/bingserpapi.js";
export * as tools__brave_search from "../tools/brave_search.... | langchainjs/libs/langchain-community/src/load/import_map.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/load/import_map.ts",
"repo_id": "langchainjs",
"token_count": 1353
} | 1,064 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.