text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# coding=utf-8
# Copyright 2022 Meta Platforms, Inc.s 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/license... | transformers/src/transformers/models/maskformer/modeling_maskformer.py/0 | {
"file_path": "transformers/src/transformers/models/maskformer/modeling_maskformer.py",
"repo_id": "transformers",
"token_count": 38532
} | 663 |
import { base } from "$app/paths";
import { redirect } from "@sveltejs/kit";
export async function load({ parent, params }) {
const data = await parent();
const assistant = data.settings.assistants.find((id) => id === params.assistantId);
if (!assistant) {
throw redirect(302, `${base}/assistant/${params.assista... | chat-ui/src/routes/settings/assistants/[assistantId]/+page.ts/0 | {
"file_path": "chat-ui/src/routes/settings/assistants/[assistantId]/+page.ts",
"repo_id": "chat-ui",
"token_count": 115
} | 120 |
import { ChatYandexGPT } from "@langchain/yandex/chat_models";
import { HumanMessage, SystemMessage } from "@langchain/core/messages";
const chat = new ChatYandexGPT();
const res = await chat.invoke([
new SystemMessage(
"You are a helpful assistant that translates English to French."
),
new HumanMessage("I ... | langchainjs/examples/src/models/chat/integration_yandex.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/integration_yandex.ts",
"repo_id": "langchainjs",
"token_count": 202
} | 803 |
import * as fs from "node:fs/promises";
import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage } from "@langchain/core/messages";
const imageData = await fs.readFile("./hotdog.jpg");
const chat = new ChatOpenAI({
modelName: "gpt-4-vision-preview",
maxTokens: 1024,
});
const message = new HumanMessa... | langchainjs/examples/src/models/chat/integration_openai_vision.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/integration_openai_vision.ts",
"repo_id": "langchainjs",
"token_count": 1005
} | 837 |
use candle::{DType, Module, Result, Tensor, D};
use candle_nn::VarBuilder;
// https://github.com/huggingface/diffusers/blob/19edca82f1ff194c07317369a92b470dbae97f34/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py#L22
#[derive(Debug)]
pub struct WLayerNorm {
eps: f64,
}
impl WLayerNorm {
pub f... | candle/candle-transformers/src/models/wuerstchen/common.rs/0 | {
"file_path": "candle/candle-transformers/src/models/wuerstchen/common.rs",
"repo_id": "candle",
"token_count": 3219
} | 78 |
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
import { Callbacks } from "@langchain/core/callbacks/manager";
import {
BaseOutputParser,
OutputParserException,
} from "@langchain/core/output_parsers";
import { BasePromptTemplate } from "@langchain/core/prompts";
import { LLM... | langchainjs/langchain/src/output_parsers/fix.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/fix.ts",
"repo_id": "langchainjs",
"token_count": 1018
} | 910 |
<jupyter_start><jupyter_text>ClientDemo of a client interacting with a remote agent that can use history.See relevant documentation about agents:* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to... | langserve/examples/agent_with_history/client.ipynb/0 | {
"file_path": "langserve/examples/agent_with_history/client.ipynb",
"repo_id": "langserve",
"token_count": 1982
} | 1,022 |
import { DynamicTool, DynamicToolInput } from "@langchain/core/tools";
import { BaseChain } from "../chains/base.js";
/**
* @deprecated Wrap in a DynamicTool instead.
* Interface for the input parameters of the ChainTool constructor.
* Extends the DynamicToolInput interface, replacing the 'func' property
* with a ... | langchainjs/langchain/src/tools/chain.ts/0 | {
"file_path": "langchainjs/langchain/src/tools/chain.ts",
"repo_id": "langchainjs",
"token_count": 311
} | 915 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-docugami/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-docugami/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,354 |
""" Nested Transformer (NesT) in PyTorch
A PyTorch implement of Aggregating Nested Transformers as described in:
'Aggregating Nested Transformers'
- https://arxiv.org/abs/2105.12723
The official Jax code is released and available at https://github.com/google-research/nested-transformer. The weights
have been con... | pytorch-image-models/timm/models/nest.py/0 | {
"file_path": "pytorch-image-models/timm/models/nest.py",
"repo_id": "pytorch-image-models",
"token_count": 10075
} | 380 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/llama_index/readers/imdb_review/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,367 |
---
sidebar_class_name: hidden
---
# Map reduce
import QAExample from "@examples/chains/question_answering_map_reduce.ts";
import LcelExample from "@examples/chains/map_reduce_lcel.ts";
import CodeBlock from "@theme/CodeBlock";
The map reduce documents chain first applies an LLM chain to each document individually (... | langchainjs/docs/core_docs/docs/modules/chains/document/map_reduce.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/chains/document/map_reduce.mdx",
"repo_id": "langchainjs",
"token_count": 421
} | 728 |
#!/usr/bin/env python
import io
import json
import subprocess
pairs = [
["en", "ru"],
["ru", "en"],
["en", "de"],
["de", "en"],
]
n_objs = 8
def get_all_data(pairs, n_objs):
text = {}
for src, tgt in pairs:
pair = f"{src}-{tgt}"
cmd = f"sacrebleu -t wmt19 -l {pair} --echo s... | transformers/examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py",
"repo_id": "transformers",
"token_count": 410
} | 520 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package msgdispatcher
import (
context "context"
mqwrapper "github.com/milvus-io/milvus/pkg/mq/msgstream/mqwrapper"
mock "github.com/stretchr/testify/mock"
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
msgstream "github.com/milvus-io/milvus/pkg/mq... | milvus/pkg/mq/msgdispatcher/mock_client.go/0 | {
"file_path": "milvus/pkg/mq/msgdispatcher/mock_client.go",
"repo_id": "milvus",
"token_count": 1920
} | 2,036 |
<jupyter_start><jupyter_text>PredibaseThis notebook shows how you can use Predibase-hosted LLM's within Llamaindex. You can add [Predibase](https://predibase.com) to your existing Llamaindex worklow to: 1. Deploy and query pre-trained or custom open source LLM’s without the hassle2. Operationalize an end-to-end Retriev... | llama_index/docs/examples/llm/predibase.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/predibase.ipynb",
"repo_id": "llama_index",
"token_count": 925
} | 1,196 |
"""Script for auto-generating api_reference.rst."""
import importlib
import inspect
import os
import typing
from enum import Enum
from pathlib import Path
from typing import Dict, List, Literal, Optional, Sequence, TypedDict, Union
import toml
from pydantic import BaseModel
ROOT_DIR = Path(__file__).parents[2].absol... | langchain/docs/api_reference/create_api_rst.py/0 | {
"file_path": "langchain/docs/api_reference/create_api_rst.py",
"repo_id": "langchain",
"token_count": 4867
} | 82 |
## 1. System Overview
In this section, we sketch the system design of Milvus, including the data model, data organization, architecture, and state synchronization.
#### 1.1 Data Model
Milvus exposes the following set of data features to applications:
- a data model based on schematized relational tables, in that ro... | milvus/docs/developer_guides/chap01_system_overview.md/0 | {
"file_path": "milvus/docs/developer_guides/chap01_system_overview.md",
"repo_id": "milvus",
"token_count": 1266
} | 1,632 |
import * as fs from "node:fs";
import * as path from "node:path";
import { identifySecrets } from "./identify-secrets.js";
import type { ExtraImportMapEntry, ImportData } from "./types.js";
// .gitignore
const DEFAULT_GITIGNORE_PATHS = ["node_modules", "dist", ".yarn"];
// List of test-exports-* packages which we use... | langchainjs/libs/langchain-scripts/src/create-entrypoints.ts/0 | {
"file_path": "langchainjs/libs/langchain-scripts/src/create-entrypoints.ts",
"repo_id": "langchainjs",
"token_count": 4461
} | 1,067 |
import type { BaseChatModelParams } from "@langchain/core/language_models/chat_models";
import {
type OpenAIClient,
type ChatOpenAICallOptions,
type OpenAIChatInput,
type OpenAICoreRequestOptions,
ChatOpenAI,
} from "@langchain/openai";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
typ... | langchainjs/libs/langchain-community/src/chat_models/fireworks.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/chat_models/fireworks.ts",
"repo_id": "langchainjs",
"token_count": 1407
} | 936 |
from llama_index.readers.pinecone.base import PineconeReader
__all__ = ["PineconeReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/llama_index/readers/pinecone/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/llama_index/readers/pinecone/__init__.py",
"repo_id": "llama_index",
"token_count": 30
} | 1,366 |
//! ML framework for Rust
//!
//! ```rust
//! use candle_core::{Tensor, DType, Device};
//! # use candle_core::Error;
//! # fn main() -> Result<(), Error>{
//!
//! let a = Tensor::arange(0f32, 6f32, &Device::Cpu)?.reshape((2, 3))?;
//! let b = Tensor::arange(0f32, 12f32, &Device::Cpu)?.reshape((3, 4))?;
//!
//! let c =... | candle/candle-core/src/lib.rs/0 | {
"file_path": "candle/candle-core/src/lib.rs",
"repo_id": "candle",
"token_count": 1404
} | 36 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-snowflake/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-snowflake/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,525 |
"""Steam Toolkit."""
| langchain/libs/community/langchain_community/agent_toolkits/steam/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/steam/__init__.py",
"repo_id": "langchain",
"token_count": 7
} | 215 |
import os
import cassio
from langchain_community.chat_models import ChatOpenAI
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores import Cassandra
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchai... | langchain/templates/cassandra-entomology-rag/cassandra_entomology_rag/__init__.py/0 | {
"file_path": "langchain/templates/cassandra-entomology-rag/cassandra_entomology_rag/__init__.py",
"repo_id": "langchain",
"token_count": 718
} | 684 |
[tool.poetry]
name = "neo4j-cypher"
version = "0.1.0"
description = "Natural language interface for a Neo4j graph database"
authors = [
"Tomaz Bratanic <tomaz.bratanic@neo4j.com>",
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
neo4j = ">5.12"
openai = "<2"
[tool.poet... | langchain/templates/neo4j-cypher/pyproject.toml/0 | {
"file_path": "langchain/templates/neo4j-cypher/pyproject.toml",
"repo_id": "langchain",
"token_count": 296
} | 669 |
text:
- name: content
- name: source
numeric:
- name: start_index
vector:
- name: content_vector
algorithm: HNSW
datatype: FLOAT32
dims: 384
distance_metric: COSINE
| langchain/templates/rag-redis/rag_redis/schema.yml/0 | {
"file_path": "langchain/templates/rag-redis/rag_redis/schema.yml",
"repo_id": "langchain",
"token_count": 67
} | 686 |
"""Test LLM callbacks."""
from langchain_core.messages import HumanMessage
from langchain_community.chat_models.fake import FakeListChatModel
from langchain_community.llms.fake import FakeListLLM
from tests.unit_tests.callbacks.fake_callback_handler import (
FakeCallbackHandler,
FakeCallbackHandlerWithChatStar... | langchain/libs/community/tests/unit_tests/llms/test_callbacks.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/llms/test_callbacks.py",
"repo_id": "langchain",
"token_count": 590
} | 418 |
# PyMuPDF Loader
This loader extracts text from a local PDF file using the `PyMuPDF` Python library. This is the fastest among all other PDF parsing options available in `llama_hub`. If `metadata` is passed as True while calling `load` function; extracted documents will include basic metadata such as page numbers, fil... | llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/pymu_pdf/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/pymu_pdf/README.md",
"repo_id": "llama_index",
"token_count": 326
} | 1,351 |
# Hackathon DreamBooth 🏆
📣 **The hackathon is now over and the winners have been announced on Discord. You are still welcome to train models and submit them to the leaderboard, but we won't be offering prizes or certificates at this point in time.**
Welcome to the DreamBooth Hackathon! This is a community event wh... | diffusion-models-class/units/en/events/2.mdx/0 | {
"file_path": "diffusion-models-class/units/en/events/2.mdx",
"repo_id": "diffusion-models-class",
"token_count": 3034
} | 265 |
import { searchWeb } from "$lib/server/websearch/searchWeb";
import type { Message } from "$lib/types/Message";
import type { WebSearch, WebSearchSource } from "$lib/types/WebSearch";
import { generateQuery } from "$lib/server/websearch/generateQuery";
import { parseWeb } from "$lib/server/websearch/parseWeb";
import {... | chat-ui/src/lib/server/websearch/runWebSearch.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/runWebSearch.ts",
"repo_id": "chat-ui",
"token_count": 1534
} | 103 |
kind: StressChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-datanode-memory-stress
namespace: chaos-testing
spec:
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/instance: milvus-chaos
component: datanode
mode: all
stressors:
cpu:
work... | milvus/tests/python_client/chaos/chaos_objects/mem_stress/chaos_datanode_mem_stress.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/mem_stress/chaos_datanode_mem_stress.yaml",
"repo_id": "milvus",
"token_count": 174
} | 1,953 |
import { test, expect } from "@jest/globals";
import { OpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { PromptTemplate } from "@langchain/core/prompts";
import { LLMChain } from "../../chains/llm_chain.js";
import { StuffDocumentsChain } from "../../chains/combine_docs_chain.js";
import { ConversationalRet... | langchainjs/langchain/src/retrievers/tests/chain_extract.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/tests/chain_extract.int.test.ts",
"repo_id": "langchainjs",
"token_count": 589
} | 984 |
import { AgentExecutor, createOpenAIToolsAgent } from "langchain/agents";
import { pull } from "langchain/hub";
import { ChatOpenAI } from "@langchain/openai";
import type { ChatPromptTemplate } from "@langchain/core/prompts";
import { TavilySearchResults } from "@langchain/community/tools/tavily_search";
import { Calc... | langchainjs/examples/src/guides/debugging/simple_agent_verbose.ts/0 | {
"file_path": "langchainjs/examples/src/guides/debugging/simple_agent_verbose.ts",
"repo_id": "langchainjs",
"token_count": 262
} | 862 |
<jupyter_start><jupyter_text>Zep Vector Store A long-term memory store for LLM applicationsThis notebook demonstrates how to use the Zep Vector Store with LlamaIndex. About ZepZep makes it easy for developers to add relevant documents, chat history memory & rich user data to their LLM app's prompts. NoteZep can automat... | llama_index/docs/examples/vector_stores/ZepIndexDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/ZepIndexDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1668
} | 1,115 |
"""Init params."""
| llama_index/llama-index-core/llama_index/core/agent/legacy/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/agent/legacy/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,242 |
"""Test formatting functionality."""
import pytest
from langchain_core.utils import formatter
def test_valid_formatting() -> None:
"""Test formatting works as expected."""
template = "This is a {foo} test."
output = formatter.format(template, foo="good")
expected_output = "This is a good test."
as... | langchain/libs/langchain/tests/unit_tests/test_formatting.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/test_formatting.py",
"repo_id": "langchain",
"token_count": 269
} | 613 |
"""An agent designed to hold a conversation in addition to using tools."""
from __future__ import annotations
from typing import Any, List, Optional, Sequence, Tuple
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction
from langchain_core.callbacks import BaseCallbackManager
from l... | langchain/libs/langchain/langchain/agents/conversational_chat/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/conversational_chat/base.py",
"repo_id": "langchain",
"token_count": 2057
} | 466 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-json/llama_index/readers/json/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-json/llama_index/readers/json/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,513 |
<jupyter_start><jupyter_text>Parallelizing Ingestion Pipeline In this notebook, we demonstrate how to execute ingestion pipelines using parallel processes. Both sync and async versions of batched parallel execution are possible with `IngestionPipeline`.<jupyter_code>%pip install llama-index-embeddings-openai
import nes... | llama_index/docs/examples/ingestion/parallel_execution_ingestion_pipeline.ipynb/0 | {
"file_path": "llama_index/docs/examples/ingestion/parallel_execution_ingestion_pipeline.ipynb",
"repo_id": "llama_index",
"token_count": 1588
} | 1,123 |
#!/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/document_question_answering.py/0 | {
"file_path": "transformers/src/transformers/tools/document_question_answering.py",
"repo_id": "transformers",
"token_count": 1230
} | 691 |
import os
import time
import uuid
from contextlib import contextmanager
from typing import Optional
import pytest
import requests
from huggingface_hub.hf_api import HfApi, RepositoryNotFoundError
CI_HUB_USER = "__DUMMY_TRANSFORMERS_USER__"
CI_HUB_USER_FULL_NAME = "Dummy User"
CI_HUB_USER_TOKEN = "hf_hZEmnoOEYISjraJt... | datasets/tests/fixtures/hub.py/0 | {
"file_path": "datasets/tests/fixtures/hub.py",
"repo_id": "datasets",
"token_count": 2270
} | 156 |
use candle::{IndexOp, Result, Tensor, D};
use tokenizers::Tokenizer;
const LANGUAGES: [(&str, &str); 99] = [
("en", "english"),
("zh", "chinese"),
("de", "german"),
("es", "spanish"),
("ru", "russian"),
("ko", "korean"),
("fr", "french"),
("ja", "japanese"),
("pt", "portuguese"),
... | candle/candle-examples/examples/whisper/multilingual.rs/0 | {
"file_path": "candle/candle-examples/examples/whisper/multilingual.rs",
"repo_id": "candle",
"token_count": 1846
} | 58 |
import { ChatOpenAI } from "@langchain/openai";
import { StructuredTool } from "@langchain/core/tools";
import { z } from "zod";
import {
Runnable,
RunnableLambda,
RunnablePassthrough,
} from "@langchain/core/runnables";
class CountEmails extends StructuredTool {
schema = z.object({
lastNDays: z.number(),
... | langchainjs/examples/src/use_cases/human_in_the_loop/helpers.ts/0 | {
"file_path": "langchainjs/examples/src/use_cases/human_in_the_loop/helpers.ts",
"repo_id": "langchainjs",
"token_count": 523
} | 820 |
<!--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... | accelerate/docs/source/package_reference/utilities.md/0 | {
"file_path": "accelerate/docs/source/package_reference/utilities.md",
"repo_id": "accelerate",
"token_count": 1948
} | 2 |
import math
import torch
import torch.distributed
import numpy as np
from dataclasses import dataclass
from opentelemetry import trace
from transformers import PreTrainedTokenizerBase
from transformers.models.llama import LlamaTokenizerFast
from typing import Optional, Tuple, Type, List
from text_generation_server.p... | text-generation-inference/server/text_generation_server/models/flash_mistral.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/flash_mistral.py",
"repo_id": "text-generation-inference",
"token_count": 9775
} | 424 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/llama_index/readers/pinecone/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/llama_index/readers/pinecone/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,429 |
from llama_index.indices.managed.vectara.base import VectaraIndex
from llama_index.indices.managed.vectara.retriever import (
VectaraAutoRetriever,
VectaraRetriever,
)
__all__ = ["VectaraIndex", "VectaraRetriever", "VectaraAutoRetriever"]
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/llama_index/indices/managed/vectara/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-vectara/llama_index/indices/managed/vectara/__init__.py",
"repo_id": "llama_index",
"token_count": 97
} | 1,211 |
# LlamaIndex Embeddings Integration: Gradient
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-gradient/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-gradient/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,308 |
from abc import ABC
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, Type
import numpy as np
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import Field
from langchain_core.vectorstores import VectorStore
from langc... | langchain/libs/community/langchain_community/vectorstores/docarray/base.py/0 | {
"file_path": "langchain/libs/community/langchain_community/vectorstores/docarray/base.py",
"repo_id": "langchain",
"token_count": 2958
} | 314 |
import unittest
from typing import Any
from unittest.mock import MagicMock, patch
from langchain_community.graphs import FalkorDBGraph
class TestFalkorDB(unittest.TestCase):
def setUp(self) -> None:
self.host = "localhost"
self.graph = "test_falkordb"
self.port = 6379
@patch("redis.R... | langchain/libs/community/tests/integration_tests/graphs/test_falkordb.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/graphs/test_falkordb.py",
"repo_id": "langchain",
"token_count": 468
} | 333 |
from concurrent import futures
from typing import Any, Dict, cast
from uuid import UUID
from overrides import overrides
from chromadb.ingest import CollectionAssignmentPolicy
from chromadb.config import DEFAULT_DATABASE, DEFAULT_TENANT, Component, System
from chromadb.proto.convert import (
from_proto_metadata,
... | chroma/chromadb/db/impl/grpc/server.py/0 | {
"file_path": "chroma/chromadb/db/impl/grpc/server.py",
"repo_id": "chroma",
"token_count": 8582
} | 13 |
"""RSS feed reader for news - processes each article with NewsArticleReader."""
import logging
from typing import Any, List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
from llama_index.readers.web.news.base import NewsArticleReader
logger = logging.getLogger(__nam... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/rss_news/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/rss_news/base.py",
"repo_id": "llama_index",
"token_count": 1563
} | 1,395 |
from collections import defaultdict
import json
import argparse
from pymilvus import connections, list_collections
TIMEOUT = 120
def save_all_checker_collections(host="127.0.0.1", prefix="Checker"):
# create connection
connections.connect(host=host, port="19530")
all_collections = list_collections()
i... | milvus/tests/python_client/chaos/scripts/get_all_collections.py/0 | {
"file_path": "milvus/tests/python_client/chaos/scripts/get_all_collections.py",
"repo_id": "milvus",
"token_count": 464
} | 2,030 |
# Copyright 2024 Kakao Brain 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 requi... | diffusers/src/diffusers/pipelines/unclip/text_proj.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/text_proj.py",
"repo_id": "diffusers",
"token_count": 1637
} | 253 |
from typing import List
from unittest.mock import MagicMock, call, patch
from llama_index.core.base.llms.types import ChatMessage, MessageRole
from llama_index.llms.localai.base import LOCALAI_DEFAULTS
from llama_index.llms.openai import Tokenizer
from llama_index.llms.openai_like import OpenAILike
from openai.types i... | llama_index/llama-index-integrations/llms/llama-index-llms-openai-like/tests/test_openai_like.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-openai-like/tests/test_openai_like.py",
"repo_id": "llama_index",
"token_count": 1980
} | 1,309 |
# coding=utf-8
# Copyright 2023 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | transformers/src/transformers/models/rwkv/configuration_rwkv.py/0 | {
"file_path": "transformers/src/transformers/models/rwkv/configuration_rwkv.py",
"repo_id": "transformers",
"token_count": 2473
} | 716 |
import { MemgraphGraph } from "@langchain/community/graphs/memgraph_graph";
import { OpenAI } from "@langchain/openai";
import { GraphCypherQAChain } from "langchain/chains/graph_qa/cypher";
/**
* This example uses Memgraph database, an in-memory graph database.
* To set it up follow the instructions on https://memg... | langchainjs/examples/src/chains/memgraph.ts/0 | {
"file_path": "langchainjs/examples/src/chains/memgraph.ts",
"repo_id": "langchainjs",
"token_count": 326
} | 765 |
# 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_python_interpreter.py/0 | {
"file_path": "transformers/tests/tools/test_python_interpreter.py",
"repo_id": "transformers",
"token_count": 2013
} | 806 |
# Messages API
Text Generation Inference (TGI) now supports the Messages API, which is fully compatible with the OpenAI Chat Completion API. This feature is available starting from version 1.4.0. You can use OpenAI's client libraries or third-party libraries expecting OpenAI schema to interact with TGI's Messages API.... | text-generation-inference/docs/source/messages_api.md/0 | {
"file_path": "text-generation-inference/docs/source/messages_api.md",
"repo_id": "text-generation-inference",
"token_count": 1733
} | 381 |
"""Test Together API wrapper.
In order to run this test, you need to have an Together api key.
You can get it by registering for free at https://api.together.xyz/.
A test key can be found at https://api.together.xyz/settings/api-keys
You'll then need to set TOGETHER_API_KEY environment variable to your api key.
"""
i... | langchain/libs/community/tests/integration_tests/llms/test_together.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_together.py",
"repo_id": "langchain",
"token_count": 429
} | 345 |
# (Tensorflow) EfficientNet Lite
**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly... | pytorch-image-models/docs/models/.templates/models/tf-efficientnet-lite.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/tf-efficientnet-lite.md",
"repo_id": "pytorch-image-models",
"token_count": 2543
} | 320 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,261 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.s3 import S3Reader
def test_class():
names_of_base_classes = [b.__name__ for b in S3Reader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-s3/tests/test_readers_s3.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-s3/tests/test_readers_s3.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,548 |
from langchain_community.embeddings.cohere import CohereEmbeddings
__all__ = ["CohereEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/cohere.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/cohere.py",
"repo_id": "langchain",
"token_count": 32
} | 531 |
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: test-datacoord-network-partition
namespace: chaos-testing
spec:
action: partition
mode: all
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/instance: chaos-testing
app.kubernetes.io/name: m... | milvus/tests/python_client/chaos/chaos_objects/network_partition/chaos_datacoord_network_partition.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/network_partition/chaos_datacoord_network_partition.yaml",
"repo_id": "milvus",
"token_count": 243
} | 2,166 |
pipeline {
agent none
options {
timestamps()
}
parameters{
string defaultValue: 'registry.milvus.io', description: 'Local Docker registry URL', name: 'LOCAL_DOKCER_REGISTRY_URL', trim: true
string defaultValue: 'registry-1.docker.io', description: 'Remote Docker registry URL', ... | milvus/tests/benchmark/ci/publish_jenkinsfile/0 | {
"file_path": "milvus/tests/benchmark/ci/publish_jenkinsfile",
"repo_id": "milvus",
"token_count": 2022
} | 1,860 |
[package]
name = "candle-wasm-example-whisper"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
[dependencies]
candle = { workspace = true }
candle-nn = { workspace = true }
candle-t... | candle/candle-wasm-examples/whisper/Cargo.toml/0 | {
"file_path": "candle/candle-wasm-examples/whisper/Cargo.toml",
"repo_id": "candle",
"token_count": 428
} | 84 |
<!--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/ja/main_classes/processors.md/0 | {
"file_path": "transformers/docs/source/ja/main_classes/processors.md",
"repo_id": "transformers",
"token_count": 3103
} | 490 |
"""Test volc engine maas LLM model."""
from typing import Generator
from langchain_core.outputs import LLMResult
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture
from langchain_community.llms.volcengine_maas import (
VolcEngineMaasBase,
VolcEngineMaasLLM,
)
def test_api_ke... | langchain/libs/community/tests/integration_tests/llms/test_volcengine_maas.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_volcengine_maas.py",
"repo_id": "langchain",
"token_count": 626
} | 375 |
# Copyright 2021 The Fairseq Authors 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/m2m_100/tokenization_m2m_100.py/0 | {
"file_path": "transformers/src/transformers/models/m2m_100/tokenization_m2m_100.py",
"repo_id": "transformers",
"token_count": 7599
} | 627 |
# Grobid
GROBID is a machine learning library for extracting, parsing, and re-structuring raw documents.
It is designed and expected to be used to parse academic papers, where it works particularly well.
*Note*: if the articles supplied to Grobid are large documents (e.g. dissertations) exceeding a certain number
of... | langchain/docs/docs/integrations/providers/grobid.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/grobid.mdx",
"repo_id": "langchain",
"token_count": 497
} | 137 |
import type { BaseLanguageModelCallOptions } from "@langchain/core/language_models/base";
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
import { GenerationChunk } from "@langchain/core/outputs";
import type { StringWithAutocomplete } from "@langchain/core/utils/types";
import { LLM, type... | langchainjs/libs/langchain-community/src/llms/ollama.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/ollama.ts",
"repo_id": "langchainjs",
"token_count": 2697
} | 992 |
<jupyter_start><jupyter_text>ClientDemo of a client interacting with a remote conversational retrieval chain. You can interact with this via API directly<jupyter_code>import requests
inputs = {"input": {"question": "what do you know about harrison", "chat_history": []}}
response = requests.post("http://localhost:8000... | langserve/examples/conversational_retrieval_chain/client.ipynb/0 | {
"file_path": "langserve/examples/conversational_retrieval_chain/client.ipynb",
"repo_id": "langserve",
"token_count": 1059
} | 997 |
"""Test BESVectorStore functionality."""
from typing import List, Optional
from langchain_core.documents import Document
from langchain_community.vectorstores import BESVectorStore
from tests.integration_tests.vectorstores.fake_embeddings import (
FakeEmbeddings,
fake_texts,
)
def _bes_vector_db_from_texts(... | langchain/libs/community/tests/integration_tests/vectorstores/test_baiducloud_vector_search.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_baiducloud_vector_search.py",
"repo_id": "langchain",
"token_count": 299
} | 376 |
"""Slack tools."""
from langchain_community.tools.slack.get_channel import SlackGetChannel
from langchain_community.tools.slack.get_message import SlackGetMessage
from langchain_community.tools.slack.schedule_message import SlackScheduleMessage
from langchain_community.tools.slack.send_message import SlackSendMessage
... | langchain/libs/langchain/langchain/tools/slack/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/slack/__init__.py",
"repo_id": "langchain",
"token_count": 136
} | 586 |
# 2Markdown
>[2markdown](https://2markdown.com/) service transforms website content into structured markdown files.
## Installation and Setup
We need the `API key`. See [instructions how to get it](https://2markdown.com/login).
## Document Loader
See a [usage example](/docs/integrations/document_loaders/tomarkdow... | langchain/docs/docs/integrations/providers/tomarkdown.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/tomarkdown.mdx",
"repo_id": "langchain",
"token_count": 118
} | 162 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/mq/mqimpl/rocksmq/server/rocksmq.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/server/rocksmq.go",
"repo_id": "milvus",
"token_count": 490
} | 1,727 |
/* eslint-disable spaced-comment */
import { PromptTemplate } from "@langchain/core/prompts";
const template = `Write a concise summary of the following:
"{text}"
CONCISE SUMMARY:`;
export const DEFAULT_PROMPT = /*#__PURE__*/ new PromptTemplate({
template,
inputVariables: ["text"],
});
| langchainjs/langchain/src/chains/summarization/stuff_prompts.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/summarization/stuff_prompts.ts",
"repo_id": "langchainjs",
"token_count": 96
} | 895 |
# Conclusion [[Conclusion]]
That’s all for today. Congrats on finishing this unit and the tutorial!
The best way to learn is to practice and try stuff. **Why not improve the implementation to handle frames as input?**.
See you on second part of this Unit 🔥
## Keep Learning, Stay awesome 🤗
| deep-rl-class/units/en/unit8/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit8/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 78
} | 169 |
# Data Node
DataNode is the component to write insert and delete messages into persistent blob storage, for example MinIO or S3.
## Dependency
- KV store: a kv store that persists messages into blob storage.
- Message stream: receive messages and publish imformation
- Root Coordinator: get the latest unique IDs.
- D... | milvus/internal/datanode/README.md/0 | {
"file_path": "milvus/internal/datanode/README.md",
"repo_id": "milvus",
"token_count": 91
} | 1,917 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-mondaydotcom/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mondaydotcom/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,412 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.together import TogetherLLM
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in TogetherLLM.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-together/tests/test_llms_together.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-together/tests/test_llms_together.py",
"repo_id": "llama_index",
"token_count": 92
} | 1,374 |
export * from "../../../../../utils/convex.js";
| langchainjs/libs/langchain-community/src/vectorstores/tests/convex/convex/langchain/db.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/convex/convex/langchain/db.ts",
"repo_id": "langchainjs",
"token_count": 18
} | 1,027 |
# coding=utf-8
# Copyright 2020 The SqueezeBert authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | transformers/src/transformers/models/squeezebert/modeling_squeezebert.py/0 | {
"file_path": "transformers/src/transformers/models/squeezebert/modeling_squeezebert.py",
"repo_id": "transformers",
"token_count": 19019
} | 734 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/llms/llama-index-llms-ai21/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-ai21/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,212 |
// Adapted from turboderp exllama: https://github.com/turboderp/exllama
#ifndef _cuda_buffers_cuh
#define _cuda_buffers_cuh
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cstdint>
#include <cstdio>
const int CUDA_MAX_DEVICES = 16;
// #ifndef _cuda_buffers_cu
// extern __constant__ half2 q4_table[16][256... | text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh/0 | {
"file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh",
"repo_id": "text-generation-inference",
"token_count": 471
} | 414 |
kind: Schedule
apiVersion: chaos-mesh.org/v1alpha1
metadata:
name: test-querycoord-pod-kill
namespace: chaos-testing
spec:
schedule: '*/5 * * * * *'
startingDeadlineSeconds: 60
concurrencyPolicy: Forbid
historyLimit: 1
type: PodChaos
podChaos:
selector:
namespaces:
- chaos-testing
... | milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_querycoord_pod_kill.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_kill/chaos_querycoord_pod_kill.yaml",
"repo_id": "milvus",
"token_count": 222
} | 2,112 |
<jupyter_start><jupyter_text>Vectara>[Vectara](https://vectara.com/) is the trusted GenAI platform that provides an easy-to-use API for document indexing and querying. Vectara provides an end-to-end managed service for Retrieval Augmented Generation or [RAG](https://vectara.com/grounded-generation/), which includes:1. ... | langchain/docs/docs/integrations/vectorstores/vectara.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/vectara.ipynb",
"repo_id": "langchain",
"token_count": 3015
} | 187 |
from typing import Any, Generator, Optional, Sequence, cast
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.indices.prompt_helper import PromptHelper
from llama_index.core.prompts import BasePromptTemplate
from llama_index.core.prompts.default_prompt_selectors import (
DEFAULT_TEX... | llama_index/llama-index-core/llama_index/core/response_synthesizers/simple_summarize.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/response_synthesizers/simple_summarize.py",
"repo_id": "llama_index",
"token_count": 1761
} | 1,295 |
from langchain_community.chat_models.promptlayer_openai import PromptLayerChatOpenAI
__all__ = ["PromptLayerChatOpenAI"]
| langchain/libs/langchain/langchain/chat_models/promptlayer_openai.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chat_models/promptlayer_openai.py",
"repo_id": "langchain",
"token_count": 37
} | 506 |
import {
DynamoDBClient,
DynamoDBClientConfig,
GetItemCommand,
GetItemCommandInput,
UpdateItemCommand,
UpdateItemCommandInput,
DeleteItemCommand,
DeleteItemCommandInput,
AttributeValue,
} from "@aws-sdk/client-dynamodb";
import { BaseListChatMessageHistory } from "@langchain/core/chat_history";
impor... | langchainjs/libs/langchain-community/src/stores/message/dynamodb.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/stores/message/dynamodb.ts",
"repo_id": "langchainjs",
"token_count": 2040
} | 981 |
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
AnyMessage,
BaseMessage,
BaseMessageChunk,
ChatMessage,
ChatMessageChunk,
FunctionMessage,
FunctionMessageChunk,
HumanMessage,
HumanMessageChunk,
SystemMessage,
SystemMessageChunk,
ToolMessage,
T... | langchain/libs/langchain/langchain/schema/messages.py/0 | {
"file_path": "langchain/libs/langchain/langchain/schema/messages.py",
"repo_id": "langchain",
"token_count": 436
} | 544 |
# Guarantee Timestamp in Search Requests
[English Version of This Doc](./how-guarantee-ts-works.md)
很多同学接触 Milvus 时都会对 Search 请求里面茫茫多的参数感到迷惑不解,尤其是为 Milvus 开
发 sdk 客户端的同学。这个文档就会介绍 Search 请求里面一个比较特殊的参数——“Guarantee
Timestamp”,以下简称 “GuaranteeTs”。
## Milvus 时钟机制
像大多数分布式系统一样,Milvus 会为每一条进入系统的记录分配一个时间戳。与此同时,Milvus
是一个存储计算... | milvus/docs/developer_guides/how-guarantee-ts-works-cn.md/0 | {
"file_path": "milvus/docs/developer_guides/how-guarantee-ts-works-cn.md",
"repo_id": "milvus",
"token_count": 2647
} | 1,647 |
<jupyter_start><jupyter_text>Reciprocal Rerank Fusion RetrieverIn this example, we walk through how you can combine retrieval results from multiple queries and multiple indexes. The retrieved nodes will be reranked according to the `Reciprocal Rerank Fusion` algorithm demonstrated in this [paper](https://plg.uwaterloo.... | llama_index/docs/examples/retrievers/reciprocal_rerank_fusion.ipynb/0 | {
"file_path": "llama_index/docs/examples/retrievers/reciprocal_rerank_fusion.ipynb",
"repo_id": "llama_index",
"token_count": 1537
} | 1,142 |
from langchain_core.example_selectors.base import BaseExampleSelector
__all__ = ["BaseExampleSelector"]
| langchain/libs/langchain/langchain/prompts/example_selector/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/prompts/example_selector/base.py",
"repo_id": "langchain",
"token_count": 30
} | 562 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/llama_index/packs/llama_guard_moderator/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llama-guard-moderator/llama_index/packs/llama_guard_moderator/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,590 |
from llama_index.indices.managed.google.base import GoogleIndex
__all__ = ["GoogleIndex"]
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/llama_index/indices/managed/google/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/llama_index/indices/managed/google/__init__.py",
"repo_id": "llama_index",
"token_count": 28
} | 1,209 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-apify/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-apify/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,330 |
from llama_index.readers.stackoverflow.base import StackoverflowReader
__all__ = ["StackoverflowReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-stackoverflow/llama_index/readers/stackoverflow/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-stackoverflow/llama_index/readers/stackoverflow/__init__.py",
"repo_id": "llama_index",
"token_count": 32
} | 1,555 |
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.packs.cogniswitch_agent import CogniswitchAgentPack
def test_class():
names_of_base_classes = [b.__name__ for b in CogniswitchAgentPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/tests/test_packs_cogniswitch_agent.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-cogniswitch-agent/tests/test_packs_cogniswitch_agent.py",
"repo_id": "llama_index",
"token_count": 103
} | 1,561 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.