text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
package writebuffer
import (
"math"
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/storage"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
type segmentBuffer struct {
segmentID int64
insertBuffer *InsertBuffe... | milvus/internal/datanode/writebuffer/segment_buffer.go/0 | {
"file_path": "milvus/internal/datanode/writebuffer/segment_buffer.go",
"repo_id": "milvus",
"token_count": 910
} | 1,848 |
[GLOBAL]
backend_packages = [
"pants.backend.python",
"pants.backend.python.lint.black",
"pants.backend.python.mixed_interpreter_constraints",
"pants.backend.python.typecheck.mypy",
]
pants_version = "2.19.0"
remote_cache_read = true
remote_cache_write = true
remote_instance_name = "main"
remote_store_a... | llama_index/pants.toml/0 | {
"file_path": "llama_index/pants.toml",
"repo_id": "llama_index",
"token_count": 250
} | 1,830 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/fsdp.md/0 | {
"file_path": "transformers/docs/source/en/fsdp.md",
"repo_id": "transformers",
"token_count": 2239
} | 473 |
python_tests()
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-ollama/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-ollama/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,311 |
"""Simple Reader that reads transcript of youtube video."""
from typing import Any, List
from llama_index.legacy.readers.base import BasePydanticReader
from llama_index.legacy.schema import Document
class YoutubeTranscriptReader(BasePydanticReader):
"""Youtube Transcript reader."""
is_remote: bool = True
... | llama_index/llama-index-legacy/llama_index/legacy/readers/youtube_transcript.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/youtube_transcript.py",
"repo_id": "llama_index",
"token_count": 616
} | 1,611 |
# LangChain Templates
For more information on LangChain Templates, visit
- [LangChain Templates Quickstart](https://github.com/langchain-ai/langchain/blob/master/templates/README.md)
- [LangChain Templates Index](https://github.com/langchain-ai/langchain/blob/master/templates/docs/INDEX.md)
- [Full List of Templates... | langchain/docs/docs/guides/deployments/template_repos.mdx/0 | {
"file_path": "langchain/docs/docs/guides/deployments/template_repos.mdx",
"repo_id": "langchain",
"token_count": 127
} | 90 |
{
"name": "weblangchain",
"version": "0.1.0",
"private": true,
"packageManager": "yarn@1.22.19",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write \"app\""
},
"dependencies": {
"@chakra-ui/icons": "^2.1.0"... | weblangchain/nextjs/package.json/0 | {
"file_path": "weblangchain/nextjs/package.json",
"repo_id": "weblangchain",
"token_count": 646
} | 2,006 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/mq/msgstream/mqwrapper/consumer.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/consumer.go",
"repo_id": "milvus",
"token_count": 612
} | 2,038 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/models/umt5/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/umt5/__init__.py",
"repo_id": "transformers",
"token_count": 736
} | 666 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/wav2vec2_bert/convert_wav2vec2_seamless_checkpoint.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2_bert/convert_wav2vec2_seamless_checkpoint.py",
"repo_id": "transformers",
"token_count": 3156
} | 715 |
python_sources()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-clip/llama_index/embeddings/clip/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-clip/llama_index/embeddings/clip/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,177 |
"""
This tool allows agents to interact with the python-gitlab library
and operate on a GitLab repository.
To use this tool, you must first set as environment variables:
GITLAB_PRIVATE_ACCESS_TOKEN
GITLAB_REPOSITORY -> format: {owner}/{repo}
"""
from typing import Optional
from langchain_core.callbacks impor... | langchain/libs/community/langchain_community/tools/gitlab/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/gitlab/tool.py",
"repo_id": "langchain",
"token_count": 332
} | 290 |
# 0. imports
import torch
from transformers import GPT2Tokenizer
from trl import AutoModelForCausalLMWithValueHead, PPOConfig, PPOTrainer
# 1. load a pretrained model
model = AutoModelForCausalLMWithValueHead.from_pretrained("gpt2")
model_ref = AutoModelForCausalLMWithValueHead.from_pretrained("gpt2")
tokenizer = GP... | trl/examples/hello_world.py/0 | {
"file_path": "trl/examples/hello_world.py",
"repo_id": "trl",
"token_count": 501
} | 773 |
[tool.poetry]
name = "streamlit-agent"
version = "0.1.0"
description = ""
authors = ["Tim Conkling <tconkling@gmail.com>", "Joshua Carroll <joshua.carroll@snowflake.com>"]
license = "Apache 2.0"
readme = "README.md"
packages = [{include = "streamlit_agent"}]
[tool.poetry.dependencies]
python = ">=3.10,<4.0"
langchain ... | streamlit-agent/pyproject.toml/0 | {
"file_path": "streamlit-agent/pyproject.toml",
"repo_id": "streamlit-agent",
"token_count": 438
} | 2,144 |
import os
import argparse
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
set_seed,
default_data_collator,
)
from datasets import load_from_disk
import torch
from transformers import Trainer, TrainingArguments
import torch.distributed as dist
def safe_save_model_for_hf_trainer(trainer:... | notebooks/sagemaker/25_pytorch_fsdp_model_parallelism/scripts/run_clm.py/0 | {
"file_path": "notebooks/sagemaker/25_pytorch_fsdp_model_parallelism/scripts/run_clm.py",
"repo_id": "notebooks",
"token_count": 1807
} | 334 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-patentsview/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-patentsview/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,442 |
{
"answer_accuracy": 0.9,
"total": 10,
"valid": 10,
"results": [
{
"db": "wta_1",
"exec_match": true,
"answer_match": true,
"gold": {
"question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.",
"sql_query... | llama_index/benchmarks/struct_indices/spider/spider-0_01-code-davinci-002/dev_eval.json/0 | {
"file_path": "llama_index/benchmarks/struct_indices/spider/spider-0_01-code-davinci-002/dev_eval.json",
"repo_id": "llama_index",
"token_count": 3848
} | 1,053 |
"""
InceptionNeXt paper: https://arxiv.org/abs/2303.16900
Original implementation & weights from: https://github.com/sail-sg/inceptionnext
"""
from functools import partial
import torch
import torch.nn as nn
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from timm.layers import trunc_normal_, Drop... | pytorch-image-models/timm/models/inception_next.py/0 | {
"file_path": "pytorch-image-models/timm/models/inception_next.py",
"repo_id": "pytorch-image-models",
"token_count": 7709
} | 354 |
from langchain_community.document_loaders.parsers.generic import MimeTypeBasedParser
__all__ = ["MimeTypeBasedParser"]
| langchain/libs/langchain/langchain/document_loaders/parsers/generic.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/parsers/generic.py",
"repo_id": "langchain",
"token_count": 36
} | 490 |
#!/bin/bash
namespace='default'
log_path='./milvus-log'
etcd="false"
minio="false"
pulsar="false"
kafka="false"
since_args=""
operator="false"
#-n namespace: The namespace that Milvus is installed in.
#-i milvus_instance: The name of milvus instance.
#-d log_path: Log storage path.
#-e export etcd logs
#-m export mi... | milvus/deployments/export-log/export-milvus-log.sh/0 | {
"file_path": "milvus/deployments/export-log/export-milvus-log.sh",
"repo_id": "milvus",
"token_count": 1946
} | 1,710 |
// eslint-disable-next-line import/no-extraneous-dependencies
import {
FieldPaths,
FunctionReference,
GenericActionCtx,
GenericDataModel,
NamedTableInfo,
TableNamesInDataModel,
VectorIndexNames,
makeFunctionReference,
} from "convex/server";
// eslint-disable-next-line import/no-extraneous-dependencies
... | langchainjs/libs/langchain-community/src/storage/convex.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/storage/convex.ts",
"repo_id": "langchainjs",
"token_count": 2524
} | 1,068 |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | transformers/src/transformers/models/xlnet/modeling_xlnet.py/0 | {
"file_path": "transformers/src/transformers/models/xlnet/modeling_xlnet.py",
"repo_id": "transformers",
"token_count": 41780
} | 695 |
package gcp
import (
"net/http"
"testing"
"github.com/cockroachdb/errors"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/stretchr/testify/assert"
"golang.org/x/oauth2"
)
func TestNewMinioClient(t *testing.T) {
t.Run("iam ok", func(t *testing.T) {
minioCli, err := ... | milvus/internal/storage/gcp/gcp_test.go/0 | {
"file_path": "milvus/internal/storage/gcp/gcp_test.go",
"repo_id": "milvus",
"token_count": 1190
} | 2,064 |
"""Test docstore."""
from pathlib import Path
import pytest
from llama_index.core.schema import Document, TextNode
from llama_index.core.storage.docstore import SimpleDocumentStore
from llama_index.core.storage.kvstore.simple_kvstore import SimpleKVStore
@pytest.fixture()
def simple_docstore(simple_kvstore: Simple... | llama_index/llama-index-core/tests/storage/docstore/test_simple_docstore.py/0 | {
"file_path": "llama_index/llama-index-core/tests/storage/docstore/test_simple_docstore.py",
"repo_id": "llama_index",
"token_count": 783
} | 1,200 |
from typing import Optional, Tuple, List
from chromadb.api import BaseAPI
from chromadb.api.types import (
Documents,
Embeddings,
IDs,
Metadatas,
)
def create_batches(
api: BaseAPI,
ids: IDs,
embeddings: Optional[Embeddings] = None,
metadatas: Optional[Metadatas] = None,
documents:... | chroma/chromadb/utils/batch_utils.py/0 | {
"file_path": "chroma/chromadb/utils/batch_utils.py",
"repo_id": "chroma",
"token_count": 543
} | 27 |
// Code generated by mockery v2.33.3. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma/chroma-coordinator/internal/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
)
// ITenantDb is an autogenerated mock type for the ITenantDb type
type ITenantDb struct {
mock.Mock
}
// DeleteAll provi... | chroma/go/coordinator/internal/metastore/db/dbmodel/mocks/ITenantDb.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/db/dbmodel/mocks/ITenantDb.go",
"repo_id": "chroma",
"token_count": 1003
} | 50 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/distributed/datanode/service_test.go/0 | {
"file_path": "milvus/internal/distributed/datanode/service_test.go",
"repo_id": "milvus",
"token_count": 4662
} | 1,931 |
/******************************************************************************
* Copyright (c) 2023, Tri Dao.
******************************************************************************/
#pragma once
#include "cute/algorithm/copy.hpp"
#include "cutlass/cutlass.h"
#include "cutlass/layout/layout.h"
#include <cu... | candle/candle-flash-attn/kernels/kernel_traits_sm90.h/0 | {
"file_path": "candle/candle-flash-attn/kernels/kernel_traits_sm90.h",
"repo_id": "candle",
"token_count": 3269
} | 51 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 982
} | 615 |
import logging
from pathlib import Path
import numpy as np
import pytorch_lightning as pl
import torch
from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
from pytorch_lightning.utilities import rank_zero_only
from utils import save_json
def count_trainable_parameters(model):
model_parameters... | transformers/examples/research_projects/seq2seq-distillation/callbacks.py/0 | {
"file_path": "transformers/examples/research_projects/seq2seq-distillation/callbacks.py",
"repo_id": "transformers",
"token_count": 1944
} | 588 |
import { CallbackManagerForToolRun } from "@langchain/core/callbacks/manager";
import { GoogleCalendarBase, GoogleCalendarAgentParams } from "./base.js";
import { runCreateEvent } from "./commands/run-create-events.js";
import { CREATE_TOOL_DESCRIPTION } from "./descriptions.js";
/**
* @example
* ```typescript
* co... | langchainjs/libs/langchain-community/src/tools/google_calendar/create.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/google_calendar/create.ts",
"repo_id": "langchainjs",
"token_count": 537
} | 997 |
from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any, Optional, Type
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel, Field, root_validator
from langchain_community.tools.playw... | langchain/libs/community/langchain_community/tools/playwright/extract_hyperlinks.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/playwright/extract_hyperlinks.py",
"repo_id": "langchain",
"token_count": 1188
} | 292 |
import time
import json
from collections import defaultdict
import pytest
from pymilvus import Collection
from base.client_base import TestcaseBase
from deploy.common import get_chaos_test_collections
from chaos import constants
from common.common_type import CaseLabel
from utils.util_log import test_log as log
class... | milvus/tests/python_client/chaos/testcases/test_get_collections.py/0 | {
"file_path": "milvus/tests/python_client/chaos/testcases/test_get_collections.py",
"repo_id": "milvus",
"token_count": 757
} | 1,972 |
<jupyter_start><jupyter_text>HTML Tag Reader If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-readers-file
!pip install llama-index<jupyter_output><empty_output><jupyter_text>Download HTML file<jupyter_code>%%bash
wget -e robots=off --no-cl... | llama_index/docs/examples/data_connectors/html_tag_reader.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/html_tag_reader.ipynb",
"repo_id": "llama_index",
"token_count": 688
} | 1,055 |
# 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 applicabl... | transformers/src/transformers/models/blip/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/blip/__init__.py",
"repo_id": "transformers",
"token_count": 1565
} | 651 |
from unittest.mock import MagicMock, patch
import httpx
from llama_index.legacy.llms import AzureOpenAI
from tests.llms.test_openai import mock_chat_completion_v1
@patch("llama_index.legacy.llms.azure_openai.SyncAzureOpenAI")
def test_custom_http_client(sync_azure_openai_mock: MagicMock) -> None:
"""
Verify... | llama_index/llama-index-legacy/tests/llms/test_azure_openai.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/llms/test_azure_openai.py",
"repo_id": "llama_index",
"token_count": 358
} | 1,536 |
"""
Test AstraDB caches. Requires an Astra DB vector instance.
Required to run this test:
- a recent `astrapy` Python package available
- an Astra DB instance;
- the two environment variables set:
export ASTRA_DB_API_ENDPOINT="https://<DB-ID>-us-east1.apps.astra.datastax.com"
export ASTRA_D... | langchain/libs/langchain/tests/integration_tests/cache/test_astradb.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/cache/test_astradb.py",
"repo_id": "langchain",
"token_count": 2533
} | 613 |
# LangSmith Client SDK
This package contains the Python client for interacting with the [LangSmith platform](https://smith.langchain.com/).
To install:
```bash
pip install -U langsmith
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_API_KEY=ls_...
```
Then trace:
```python
import openai
from langsmith.wrappers i... | langsmith-sdk/python/README.md/0 | {
"file_path": "langsmith-sdk/python/README.md",
"repo_id": "langsmith-sdk",
"token_count": 4015
} | 1,104 |
from langchain_core.tracers.evaluation import (
EvaluatorCallbackHandler,
wait_for_all_evaluators,
)
__all__ = ["wait_for_all_evaluators", "EvaluatorCallbackHandler"]
| langchain/libs/langchain/langchain/schema/callbacks/tracers/evaluation.py/0 | {
"file_path": "langchain/libs/langchain/langchain/schema/callbacks/tracers/evaluation.py",
"repo_id": "langchain",
"token_count": 65
} | 546 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/optimization/torch2.0.md/0 | {
"file_path": "diffusers/docs/source/ko/optimization/torch2.0.md",
"repo_id": "diffusers",
"token_count": 10790
} | 196 |
<jupyter_start><jupyter_text>CitationQueryEngineThis notebook walks through how to use the CitationQueryEngineThe CitationQueryEngine can be used with any existing index. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-embeddings-openai
%p... | llama_index/docs/examples/query_engine/citation_query_engine.ipynb/0 | {
"file_path": "llama_index/docs/examples/query_engine/citation_query_engine.ipynb",
"repo_id": "llama_index",
"token_count": 1546
} | 1,081 |
from summarize_anthropic.chain import chain
__all__ = ["chain"]
| langchain/templates/summarize-anthropic/summarize_anthropic/__init__.py/0 | {
"file_path": "langchain/templates/summarize-anthropic/summarize_anthropic/__init__.py",
"repo_id": "langchain",
"token_count": 19
} | 695 |
import math
from chromadb.test.property.strategies import NormalizedRecordSet, RecordSet
from typing import Callable, Optional, Tuple, Union, List, TypeVar, cast
from typing_extensions import Literal
import numpy as np
import numpy.typing as npt
from chromadb.api import types
from chromadb.api.models.Collection import ... | chroma/chromadb/test/property/invariants.py/0 | {
"file_path": "chroma/chromadb/test/property/invariants.py",
"repo_id": "chroma",
"token_count": 4543
} | 23 |
import pytest
from langchain_community.vectorstores.redis.schema import (
FlatVectorField,
HNSWVectorField,
NumericFieldSchema,
RedisModel,
RedisVectorField,
TagFieldSchema,
TextFieldSchema,
read_schema,
)
def test_text_field_schema_creation() -> None:
"""Test creating a text fiel... | langchain/libs/community/tests/unit_tests/vectorstores/redis/test_redis_schema.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/vectorstores/redis/test_redis_schema.py",
"repo_id": "langchain",
"token_count": 1994
} | 410 |
"""LlamaPack class."""
from typing import Any, Dict
from llama_index.core.llama_pack.base import BaseLlamaPack
# backwards compatibility
try:
from llama_index.agent.legacy.openai_agent import OpenAIAgent
except ImportError:
from llama_index.agent.openai import OpenAIAgent
class GmailOpenAIAgentPack(BaseLl... | llama_index/llama-index-packs/llama-index-packs-gmail-openai-agent/llama_index/packs/gmail_openai_agent/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-gmail-openai-agent/llama_index/packs/gmail_openai_agent/base.py",
"repo_id": "llama_index",
"token_count": 400
} | 1,790 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-llama-dataset-metadata/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llama-dataset-metadata/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,675 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-recursive-retriever/llama_index/packs/recursive_retriever/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-recursive-retriever/llama_index/packs/recursive_retriever/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,724 |
from llama_index.llms.litellm.base import LiteLLM
__all__ = ["LiteLLM"]
| llama_index/llama-index-integrations/llms/llama-index-llms-litellm/llama_index/llms/litellm/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-litellm/llama_index/llms/litellm/__init__.py",
"repo_id": "llama_index",
"token_count": 31
} | 1,225 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-feishu-docs/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-feishu-docs/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,398 |
<jupyter_start><jupyter_text>Ionic Shopping Tool[Ionic](https://www.ioniccommerce.com/) is a plug and play ecommerce marketplace for AI Assistants. By using Ionic, you are effortlessly providing your users with the ability to shop and transact directly within your agent, and you'll get a cut of the transaction.This is ... | llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/examples/ionic_shopping.ipynb/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/examples/ionic_shopping.ipynb",
"repo_id": "llama_index",
"token_count": 925
} | 1,570 |
"""PubMed API toolkit."""
| langchain/libs/community/langchain_community/tools/pubmed/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/pubmed/__init__.py",
"repo_id": "langchain",
"token_count": 9
} | 309 |
<jupyter_start><jupyter_text>Analysis of Twitter the-algorithm source code with LangChain, GPT4 and Activeloop's Deep LakeIn this tutorial, we are going to use Langchain + Activeloop's Deep Lake with GPT4 to analyze the code base of the twitter algorithm.<jupyter_code>!python3 -m pip install --upgrade langchain 'deepla... | langchain/cookbook/twitter-the-algorithm-analysis-deeplake.ipynb/0 | {
"file_path": "langchain/cookbook/twitter-the-algorithm-analysis-deeplake.ipynb",
"repo_id": "langchain",
"token_count": 2411
} | 77 |
.highlight .c1, .highlight .sd{
color: #999
}
.highlight .nn, .highlight .k, .highlight .s1, .highlight .nb, .highlight .bp, .highlight .kc, .highlight .kt {
color: #FB8D68;
}
.highlight .kn, .highlight .nv, .highlight .s2, .highlight .ow, .highlight .kd, .highlight .kr, .highlight .s {
color: #6670FF;
}... | tokenizers/docs/source/_static/css/code-snippets.css/0 | {
"file_path": "tokenizers/docs/source/_static/css/code-snippets.css",
"repo_id": "tokenizers",
"token_count": 166
} | 472 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.hwp import HWPReader
def test_class():
names_of_base_classes = [b.__name__ for b in HWPReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-hwp/tests/test_readers_hwp.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hwp/tests/test_readers_hwp.py",
"repo_id": "llama_index",
"token_count": 90
} | 1,336 |
<jupyter_start><jupyter_text>Async Ingestion Pipeline + Metadata ExtractionRecently, LlamaIndex has introduced async metadata extraction. Let's compare metadata extraction speeds in an ingestion pipeline using a newer and older version of LlamaIndex.We will test a pipeline using the classic Paul Graham essay.<jupyter_c... | llama_index/docs/examples/ingestion/async_ingestion_pipeline.ipynb/0 | {
"file_path": "llama_index/docs/examples/ingestion/async_ingestion_pipeline.ipynb",
"repo_id": "llama_index",
"token_count": 1655
} | 1,059 |
"""Init params."""
| llama_index/llama-index-legacy/llama_index/legacy/finetuning/cross_encoders/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/finetuning/cross_encoders/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,564 |
import { logVersion010MigrationWarning } from "../../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "chat_models/iflytek_xinghuo/web",
});
export * from "@langchain/community/chat_models/iflytek_xinghuo/web";
| langchainjs/langchain/src/chat_models/iflytek_xinghuo/web.ts/0 | {
"file_path": "langchainjs/langchain/src/chat_models/iflytek_xinghuo/web.ts",
"repo_id": "langchainjs",
"token_count": 91
} | 965 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-replicate/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,344 |
use crate::app::Data;
use tabled::settings::Merge;
use tabled::{builder::Builder, settings::Style, Table};
#[allow(clippy::too_many_arguments)]
pub(crate) fn parameters_table(
tokenizer_name: String,
sequence_length: u32,
decode_length: u32,
top_n_tokens: Option<u32>,
n_runs: usize,
warmups: us... | text-generation-inference/benchmark/src/table.rs/0 | {
"file_path": "text-generation-inference/benchmark/src/table.rs",
"repo_id": "text-generation-inference",
"token_count": 2298
} | 386 |
import { AppShell, Navbar } from "@mantine/core";
import React from "react";
import { useForm } from "react-hook-form";
import HeaderEvaluator, { MenuItem } from "../../components/HeaderEvaluator";
import Sidebar from "../../components/Sidebar";
import { FormValues } from "../../utils/types";
import Playground from "..... | auto-evaluator/nextjs/pages/playground/index.tsx/0 | {
"file_path": "auto-evaluator/nextjs/pages/playground/index.tsx",
"repo_id": "auto-evaluator",
"token_count": 582
} | 3 |
# Gradio Chat With Your LlamaIndex Agent
Create a LlamaIndex Agent (i.e., `BaseAgent`) and quickly chat with it using
this pack's Gradio Chatbot interface.
## CLI Usage
You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:
```bash
llamaindex-cli do... | llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/README.md",
"repo_id": "llama_index",
"token_count": 197
} | 1,672 |
# 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/activations.py/0 | {
"file_path": "transformers/src/transformers/activations.py",
"repo_id": "transformers",
"token_count": 3234
} | 555 |
# flake8: noqa E501
"""Test LLMSummarization functionality."""
import pytest
from langchain.chains.llm_summarization_checker.base import (
ARE_ALL_TRUE_PROMPT,
CHECK_ASSERTIONS_PROMPT,
CREATE_ASSERTIONS_PROMPT,
REVISED_SUMMARY_PROMPT,
LLMSummarizationCheckerChain,
)
from tests.unit_tests.llms.fak... | langchain/libs/langchain/tests/unit_tests/chains/test_llm_summarization_checker.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/chains/test_llm_summarization_checker.py",
"repo_id": "langchain",
"token_count": 709
} | 600 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/examples/community/composable_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/composable_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 12800
} | 207 |
[
{
"server_tag": "8c16m1g",
"suite_params": [
{
"suite": "080_gpu_search_debug.yaml",
"image_type": "gpu"
}
]
},
{
"server_tag": "16c32m1g",
"suite_params": [
{
"suite": "080_gpu_sear... | milvus/tests/benchmark/milvus_benchmark/scheduler/debug1.json/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/scheduler/debug1.json",
"repo_id": "milvus",
"token_count": 278
} | 1,939 |
""" Distributed training/validation utils
Hacked together by / Copyright 2020 Ross Wightman
"""
import logging
import os
from typing import Optional
import torch
from torch import distributed as dist
from .model import unwrap_model
_logger = logging.getLogger(__name__)
def reduce_tensor(tensor, n):
rt = tenso... | pytorch-image-models/timm/utils/distributed.py/0 | {
"file_path": "pytorch-image-models/timm/utils/distributed.py",
"repo_id": "pytorch-image-models",
"token_count": 2521
} | 389 |
"""Test Azure Cognitive Search wrapper."""
from langchain_core.documents import Document
from langchain_community.retrievers.azure_cognitive_search import (
AzureCognitiveSearchRetriever,
)
def test_azure_cognitive_search_get_relevant_documents() -> None:
"""Test valid call to Azure Cognitive Search."""
... | langchain/libs/community/tests/integration_tests/retrievers/test_azure_cognitive_search.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/retrievers/test_azure_cognitive_search.py",
"repo_id": "langchain",
"token_count": 339
} | 364 |
import init, { Model } from "./build/m.js";
async function fetchArrayBuffer(url, cacheFile = true) {
if (!cacheFile) return new Uint8Array(await (await fetch(url)).arrayBuffer());
const cacheName = "blip-candle-cache";
const cache = await caches.open(cacheName);
const cachedResponse = await cache.match(url);
... | candle/candle-wasm-examples/blip/blipWorker.js/0 | {
"file_path": "candle/candle-wasm-examples/blip/blipWorker.js",
"repo_id": "candle",
"token_count": 815
} | 81 |
<jupyter_start><jupyter_text>ScaNNScaNN (Scalable Nearest Neighbors) is a method for efficient vector similarity search at scale.ScaNN includes search space pruning and quantization for Maximum Inner Product Search and also supports other distance functions such as Euclidean distance. The implementation is optimized fo... | langchain/docs/docs/integrations/vectorstores/scann.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/scann.ipynb",
"repo_id": "langchain",
"token_count": 770
} | 179 |
from langchain.document_loaders.blob_loaders import __all__
def test_public_api() -> None:
"""Hard-code public API to help determine if we have broken it."""
assert sorted(__all__) == [
"Blob",
"BlobLoader",
"FileSystemBlobLoader",
"YoutubeAudioLoader",
]
| langchain/libs/langchain/tests/unit_tests/document_loaders/blob_loaders/test_public_api.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/document_loaders/blob_loaders/test_public_api.py",
"repo_id": "langchain",
"token_count": 123
} | 627 |
<!--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... | peft/docs/source/index.md/0 | {
"file_path": "peft/docs/source/index.md",
"repo_id": "peft",
"token_count": 1161
} | 337 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-self-rag/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-self-rag/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,698 |
# Outline
> [Outline](https://www.getoutline.com/) is an open-source collaborative knowledge base platform designed for team information sharing.
## Setup
You first need to [create an api key](https://www.getoutline.com/developers#section/Authentication) for your Outline instance. Then you need to set the following ... | langchain/docs/docs/integrations/providers/outline.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/outline.mdx",
"repo_id": "langchain",
"token_count": 190
} | 144 |
# coding=utf-8
# Copyright 2024 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... | diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py",
"repo_id": "diffusers",
"token_count": 4262
} | 286 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/util/indexparams/index_params_test.go/0 | {
"file_path": "milvus/pkg/util/indexparams/index_params_test.go",
"repo_id": "milvus",
"token_count": 7800
} | 2,112 |
# Conclusion [[conclusion]]
Congrats on finishing this chapter! There was a lot of information. And congrats on finishing the tutorial. You’ve just trained your first Deep Q-Learning agent and shared it on the Hub 🥳.
Take time to really grasp the material before continuing.
Don't hesitate to train your agent in oth... | deep-rl-class/units/en/unit3/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit3/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 291
} | 158 |
<!--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/perf_infer_cpu.md/0 | {
"file_path": "transformers/docs/source/en/perf_infer_cpu.md",
"repo_id": "transformers",
"token_count": 2080
} | 509 |
import pytest
import json
from text_generation.types import GrammarType
@pytest.fixture(scope="module")
def flash_llama_grammar_handle(launcher):
with launcher(
"TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=2, disable_grammar_support=False
) as handle:
yield handle
@pytest.fixture(scope="... | text-generation-inference/integration-tests/models/test_grammar_llama.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_grammar_llama.py",
"repo_id": "text-generation-inference",
"token_count": 2374
} | 390 |
import logging
from typing import Optional
import yaml
from typing_extensions import Annotated
import typer
import uvicorn
import os
import webbrowser
from chromadb.cli.utils import set_log_file_path
app = typer.Typer()
_logo = """
\033[38;5;069m((((((((( \033[38;5;203m(((((\033[38;5;220m####
... | chroma/chromadb/cli/cli.py/0 | {
"file_path": "chroma/chromadb/cli/cli.py",
"repo_id": "chroma",
"token_count": 1630
} | 17 |
import { ChatOpenAI } from "@langchain/openai";
const chat = new ChatOpenAI({
maxTokens: 25,
});
// Pass in a human message. Also accepts a raw string, which is automatically
// inferred to be a human message.
const stream = await chat.stream([["human", "Tell me a joke about bears."]]);
for await (const chunk of s... | langchainjs/examples/src/models/chat/chat_streaming_stream_method.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/chat_streaming_stream_method.ts",
"repo_id": "langchainjs",
"token_count": 278
} | 892 |
import { LLMChain } from "langchain/chains";
import { OpenAI } from "@langchain/openai";
import {
CallbackManager,
traceAsGroup,
TraceGroup,
} from "@langchain/core/callbacks/manager";
import { PromptTemplate } from "@langchain/core/prompts";
export const run = async () => {
// Initialize the LLMChain
const ... | langchainjs/examples/src/callbacks/trace_groups.ts/0 | {
"file_path": "langchainjs/examples/src/callbacks/trace_groups.ts",
"repo_id": "langchainjs",
"token_count": 519
} | 762 |
<jupyter_start><jupyter_text>Install Vllm `pip install vllm` or if you want to compile you can compile from https://docs.vllm.ai/en/latest/getting_started/installation.html Orca-7b Completion Example<jupyter_code>%pip install llama-index-llms-vllm
import os
os.environ["HF_HOME"] = "model/"
from llama_index.llms.vllm... | llama_index/docs/examples/llm/vllm.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/vllm.ipynb",
"repo_id": "llama_index",
"token_count": 1905
} | 1,070 |
// 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/cmd/components/data_coord.go/0 | {
"file_path": "milvus/cmd/components/data_coord.go",
"repo_id": "milvus",
"token_count": 764
} | 1,708 |
.. _Ref-Storage:
Storage Context
=================
LlamaIndex offers core abstractions around storage of Nodes, indices, and vectors.
A key abstraction is the `StorageContext` - this contains the underlying
`BaseDocumentStore` (for nodes), `BaseIndexStore` (for indices), and `VectorStore` (for vectors).
The Docume... | llama_index/docs/api_reference/storage.rst/0 | {
"file_path": "llama_index/docs/api_reference/storage.rst",
"repo_id": "llama_index",
"token_count": 282
} | 1,164 |
import { OpenAI } from "@langchain/openai";
import { PromptTemplate } from "@langchain/core/prompts";
import { CommaSeparatedListOutputParser } from "@langchain/core/output_parsers";
export const run = async () => {
// With a `CommaSeparatedListOutputParser`, we can parse a comma separated list.
const parser = new... | langchainjs/examples/src/prompts/comma_list_parser.ts/0 | {
"file_path": "langchainjs/examples/src/prompts/comma_list_parser.ts",
"repo_id": "langchainjs",
"token_count": 369
} | 846 |
"""FLARE output parsers."""
from typing import Any, Callable, Optional
from llama_index.core.query_engine.flare.schema import QueryTask
from llama_index.core.types import BaseOutputParser
def default_parse_is_done_fn(response: str) -> bool:
"""Default parse is done function."""
return "done" in response.low... | llama_index/llama-index-core/llama_index/core/query_engine/flare/output_parser.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/query_engine/flare/output_parser.py",
"repo_id": "llama_index",
"token_count": 859
} | 1,197 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/autoformer/configuration_autoformer.py/0 | {
"file_path": "transformers/src/transformers/models/autoformer/configuration_autoformer.py",
"repo_id": "transformers",
"token_count": 4684
} | 603 |
# 🧨 Diffusers Experimental
We are adding experimental code to support novel applications and usages of the Diffusers library.
Currently, the following experiments are supported:
* Reinforcement learning via an implementation of the [Diffuser](https://arxiv.org/abs/2205.09991) model. | diffusers/src/diffusers/experimental/README.md/0 | {
"file_path": "diffusers/src/diffusers/experimental/README.md",
"repo_id": "diffusers",
"token_count": 69
} | 209 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/indexbuilder/ScalarIndexCreator.h/0 | {
"file_path": "milvus/internal/core/src/indexbuilder/ScalarIndexCreator.h",
"repo_id": "milvus",
"token_count": 945
} | 1,661 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/groupvit/test_modeling_groupvit.py/0 | {
"file_path": "transformers/tests/models/groupvit/test_modeling_groupvit.py",
"repo_id": "transformers",
"token_count": 12757
} | 765 |
from diffusers.utils.testing_utils import require_onnxruntime
@require_onnxruntime
class OnnxPipelineTesterMixin:
"""
This mixin is designed to be used with unittest.TestCase classes.
It provides a set of common tests for each ONNXRuntime pipeline, e.g. saving and loading the pipeline,
equivalence of ... | diffusers/tests/pipelines/test_pipelines_onnx_common.py/0 | {
"file_path": "diffusers/tests/pipelines/test_pipelines_onnx_common.py",
"repo_id": "diffusers",
"token_count": 118
} | 296 |
<jupyter_start><jupyter_text>Hugging Face Hub>The [Hugging Face Hub](https://huggingface.co/docs/hub/index) is a platform with over 120k models, 20k datasets, and 50k demo apps (Spaces), all open source and publicly available, in an online platform where people can easily collaborate and build ML together.This example ... | langchain/docs/docs/integrations/llms/huggingface_hub.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/huggingface_hub.ipynb",
"repo_id": "langchain",
"token_count": 2035
} | 122 |
python_sources()
| llama_index/llama-index-integrations/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,220 |
from rag_elasticsearch.chain import chain
__all__ = ["chain"]
| langchain/templates/rag-elasticsearch/rag_elasticsearch/__init__.py/0 | {
"file_path": "langchain/templates/rag-elasticsearch/rag_elasticsearch/__init__.py",
"repo_id": "langchain",
"token_count": 20
} | 653 |
from llama_index.vector_stores.chroma.base import ChromaVectorStore
__all__ = ["ChromaVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/__init__.py",
"repo_id": "llama_index",
"token_count": 32
} | 1,476 |
from typing import Any, Mapping, Optional
from llama_index.readers.airbyte_cdk.base import AirbyteCDKReader, RecordHandler
class AirbyteSalesforceReader(AirbyteCDKReader):
"""AirbyteSalesforceReader reader.
Retrieve documents from Salesforce
Args:
config: The config object for the salesforce so... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/llama_index/readers/airbyte_salesforce/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/llama_index/readers/airbyte_salesforce/base.py",
"repo_id": "llama_index",
"token_count": 283
} | 1,368 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.maps import OpenMap
def test_class():
names_of_base_classes = [b.__name__ for b in OpenMap.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-maps/tests/test_readers_maps.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-maps/tests/test_readers_maps.py",
"repo_id": "llama_index",
"token_count": 85
} | 1,424 |
import { test, expect } from "@jest/globals";
import * as url from "node:url";
import * as path from "node:path";
import { NotionLoader } from "../fs/notion.js";
test("Test Notion Loader", async () => {
const directoryPath = path.resolve(
path.dirname(url.fileURLToPath(import.meta.url)),
"./example_data/noti... | langchainjs/langchain/src/document_loaders/tests/notion.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/notion.test.ts",
"repo_id": "langchainjs",
"token_count": 178
} | 867 |
<!---
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 a... | transformers/examples/flax/README.md/0 | {
"file_path": "transformers/examples/flax/README.md",
"repo_id": "transformers",
"token_count": 1866
} | 517 |
python_sources()
| llama_index/llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,484 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.