text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
"""Test Petals API wrapper."""
from langchain_core.pydantic_v1 import SecretStr
from pytest import CaptureFixture
from langchain_community.llms.petals import Petals
def test_api_key_is_string() -> None:
llm = Petals(huggingface_api_key="secret-api-key")
assert isinstance(llm.huggingface_api_key, SecretStr)
... | langchain/libs/community/tests/integration_tests/llms/test_petals.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_petals.py",
"repo_id": "langchain",
"token_count": 303
} | 340 |
# LlamaIndex Managed Integration: Google
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-google/README.md",
"repo_id": "llama_index",
"token_count": 10
} | 1,243 |
.PHONY: style quality
# make sure to test the local checkout in scripts and not the pre-installed one (don't use quotes!)
export PYTHONPATH = src
check_dirs := src tests scripts
style:
black --line-length 119 --target-version py310 $(check_dirs) setup.py
isort $(check_dirs) setup.py
quality:
black --check --line... | alignment-handbook/Makefile/0 | {
"file_path": "alignment-handbook/Makefile",
"repo_id": "alignment-handbook",
"token_count": 363
} | 26 |
// 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/storage/prometheus_client.h/0 | {
"file_path": "milvus/internal/core/src/storage/prometheus_client.h",
"repo_id": "milvus",
"token_count": 1932
} | 1,747 |
import Handlebars from "handlebars";
import { type ParsedFStringNode } from "@langchain/core/prompts";
import type { InputValues } from "@langchain/core/utils/types";
import {
CustomFormatPromptTemplate,
CustomFormatPromptTemplateInput,
} from "./custom_format.js";
export const parseHandlebars = (template: string)... | langchainjs/langchain/src/experimental/prompts/handlebars.ts/0 | {
"file_path": "langchainjs/langchain/src/experimental/prompts/handlebars.ts",
"repo_id": "langchainjs",
"token_count": 1155
} | 912 |
from __future__ import annotations
from typing import Optional, Type
from urllib.parse import urlparse
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel, Field, validator
from langchain_community.tools.playwrig... | langchain/libs/community/langchain_community/tools/playwright/navigate.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/playwright/navigate.py",
"repo_id": "langchain",
"token_count": 1019
} | 305 |
# coding=utf-8
# Copyright 2023 Microsoft Research 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/L... | transformers/tests/models/kosmos2/test_processor_kosmos2.py/0 | {
"file_path": "transformers/tests/models/kosmos2/test_processor_kosmos2.py",
"repo_id": "transformers",
"token_count": 9619
} | 737 |
import asyncio
import logging
from typing import List, Optional, Sequence, cast
from llama_index.core.async_utils import run_async_tasks
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import RESPONSE_TYPE
from llama_index.core.bridge.pydantic import BaseM... | llama_index/llama-index-core/llama_index/core/query_engine/sub_question_query_engine.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/query_engine/sub_question_query_engine.py",
"repo_id": "llama_index",
"token_count": 5120
} | 1,170 |
# sql-pgvector
This template enables user to use `pgvector` for combining postgreSQL with semantic search / RAG.
It uses [PGVector](https://github.com/pgvector/pgvector) extension as shown in the [RAG empowered SQL cookbook](https://github.com/langchain-ai/langchain/blob/master/cookbook/retrieval_in_sql.ipynb)
## E... | langchain/templates/sql-pgvector/README.md/0 | {
"file_path": "langchain/templates/sql-pgvector/README.md",
"repo_id": "langchain",
"token_count": 1043
} | 710 |
# sql-llamacpp
This template enables a user to interact with a SQL database using natural language.
It uses [Mistral-7b](https://mistral.ai/news/announcing-mistral-7b/) via [llama.cpp](https://github.com/ggerganov/llama.cpp) to run inference locally on a Mac laptop.
## Environment Setup
To set up the environment,... | langchain/templates/sql-llamacpp/README.md/0 | {
"file_path": "langchain/templates/sql-llamacpp/README.md",
"repo_id": "langchain",
"token_count": 892
} | 736 |
from neo4j_parent.chain import chain
if __name__ == "__main__":
original_query = "What is the plot of the Dune?"
print(chain.invoke(original_query)) # noqa: T201
| langchain/templates/neo4j-parent/main.py/0 | {
"file_path": "langchain/templates/neo4j-parent/main.py",
"repo_id": "langchain",
"token_count": 62
} | 698 |
# Hugging Face
All functionality related to the [Hugging Face Platform](https://huggingface.co/).
## LLMs
### Hugging Face Hub
>The [Hugging Face Hub](https://huggingface.co/docs/hub/index) is a platform
> with over 350k models, 75k datasets, and 150k demo apps (Spaces), all open source
> and publicly available, ... | langchain/docs/docs/integrations/platforms/huggingface.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/platforms/huggingface.mdx",
"repo_id": "langchain",
"token_count": 1666
} | 135 |
from llama_index.tools.wikipedia.base import WikipediaToolSpec
__all__ = ["WikipediaToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/llama_index/tools/wikipedia/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/llama_index/tools/wikipedia/__init__.py",
"repo_id": "llama_index",
"token_count": 27
} | 1,587 |
from basic_critique_revise.chain import chain
__all__ = ["chain"]
| langchain/templates/basic-critique-revise/basic_critique_revise/__init__.py/0 | {
"file_path": "langchain/templates/basic-critique-revise/basic_critique_revise/__init__.py",
"repo_id": "langchain",
"token_count": 22
} | 642 |
import { expect, test } from "@jest/globals";
import chroma from "./initClient";
test("it should modify collection", async () => {
await chroma.reset();
const collection = await chroma.createCollection({ name: "test" });
expect(collection.name).toBe("test");
expect(collection.metadata).toBeUndefined();
awai... | chroma/clients/js/test/collection.test.ts/0 | {
"file_path": "chroma/clients/js/test/collection.test.ts",
"repo_id": "chroma",
"token_count": 770
} | 31 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-resume-screener/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-resume-screener/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,590 |
<jupyter_start><jupyter_text>Custom callback handlersYou can create a custom handler to set on the object as well. In the example below, we'll implement streaming with a custom handler.<jupyter_code>from langchain.callbacks.base import BaseCallbackHandler
from langchain.schema import HumanMessage
from langchain_openai ... | langchain/docs/docs/modules/callbacks/custom_callbacks.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/callbacks/custom_callbacks.ipynb",
"repo_id": "langchain",
"token_count": 367
} | 190 |
import json
from io import BytesIO
from unittest import TestCase
import boto3
from botocore.response import StreamingBody
from botocore.stub import Stubber
from llama_index.legacy.embeddings.bedrock import BedrockEmbedding, Models
class TestBedrockEmbedding(TestCase):
bedrock_client = boto3.client("bedrock-runti... | llama_index/llama-index-legacy/tests/embeddings/test_bedrock.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/embeddings/test_bedrock.py",
"repo_id": "llama_index",
"token_count": 1184
} | 1,628 |
"""Llama pack class."""
from abc import abstractmethod
from typing import Any, Dict
class BaseLlamaPack:
@abstractmethod
def get_modules(self) -> Dict[str, Any]:
"""Get modules."""
@abstractmethod
def run(self, *args: Any, **kwargs: Any) -> Any:
"""Run."""
| llama_index/llama-index-legacy/llama_index/legacy/llama_pack/base.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llama_pack/base.py",
"repo_id": "llama_index",
"token_count": 117
} | 1,583 |
from langchain_robocorp import __all__
EXPECTED_ALL = [
"ActionServerToolkit",
]
def test_all_imports() -> None:
assert sorted(EXPECTED_ALL) == sorted(__all__)
| langchain/libs/partners/robocorp/tests/unit_tests/test_imports.py/0 | {
"file_path": "langchain/libs/partners/robocorp/tests/unit_tests/test_imports.py",
"repo_id": "langchain",
"token_count": 66
} | 635 |
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
README.md
LICENSE
.vscode
__pycache__ | milvus/tests/python_client/.dockerignore/0 | {
"file_path": "milvus/tests/python_client/.dockerignore",
"repo_id": "milvus",
"token_count": 60
} | 1,880 |
import os
import tarfile
import pyarrow as pa
import pytest
from datasets import Dataset, concatenate_datasets, load_dataset
from datasets.features import Audio, Features, Sequence, Value
from ..utils import (
require_sndfile,
)
@pytest.fixture()
def tar_wav_path(shared_datadir, tmp_path_factory):
audio_pa... | datasets/tests/features/test_audio.py/0 | {
"file_path": "datasets/tests/features/test_audio.py",
"repo_id": "datasets",
"token_count": 11528
} | 153 |
<jupyter_start><jupyter_text>Concurrent LoaderWorks just like the GenericLoader but concurrently for those who choose to optimize their workflow.<jupyter_code>from langchain_community.document_loaders import ConcurrentLoader
loader = ConcurrentLoader.from_filesystem("example_data/", glob="**/*.txt")
files = loader.load... | langchain/docs/docs/integrations/document_loaders/concurrent.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/concurrent.ipynb",
"repo_id": "langchain",
"token_count": 105
} | 105 |
// 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/segcore/plan_c.cpp/0 | {
"file_path": "milvus/internal/core/src/segcore/plan_c.cpp",
"repo_id": "milvus",
"token_count": 2480
} | 1,768 |
python_sources()
| llama_index/llama-index-integrations/program/llama-index-program-evaporate/llama_index/program/evaporate/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/program/llama-index-program-evaporate/llama_index/program/evaporate/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,440 |
# (Tensorflow) MobileNet v3
**MobileNetV3** is a convolutional neural network that is designed for mobile phone CPUs. The network design includes the use of a [hard swish activation](https://paperswithcode.com/method/hard-swish) and [squeeze-and-excitation](https://paperswithcode.com/method/squeeze-and-excitation-bloc... | pytorch-image-models/docs/models/.templates/models/tf-mobilenet-v3.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/tf-mobilenet-v3.md",
"repo_id": "pytorch-image-models",
"token_count": 3951
} | 352 |
import { ChatOpenAI } from "@langchain/openai";
const model = new ChatOpenAI({
temperature: 0.9,
configuration: {
baseURL: "https://your_custom_url.com",
},
});
const message = await model.invoke("Hi there!");
console.log(message);
/*
AIMessage {
content: 'Hello! How can I assist you today?',
ad... | langchainjs/examples/src/models/chat/integration_openai_custom_base.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/integration_openai_custom_base.ts",
"repo_id": "langchainjs",
"token_count": 130
} | 802 |
<jupyter_start><jupyter_text>Un entraînement complet Installez les bibliothèques 🤗 Transformers et 🤗 Datasets pour exécuter ce notebook.<jupyter_code>!pip install datasets transformers[sentencepiece]
!pip install accelerate
# Pour exécuter l'entraînement sur TPU, vous devez décommenter la ligne suivante :
# !pip inst... | notebooks/course/fr/chapter3/section4.ipynb/0 | {
"file_path": "notebooks/course/fr/chapter3/section4.ipynb",
"repo_id": "notebooks",
"token_count": 1937
} | 308 |
# 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/pytorch_utils.py/0 | {
"file_path": "transformers/src/transformers/pytorch_utils.py",
"repo_id": "transformers",
"token_count": 4640
} | 688 |
use super::ConversionError;
use crate::{
chroma_proto,
errors::{ChromaError, ErrorCodes},
};
use thiserror::Error;
#[derive(Debug, PartialEq)]
pub(crate) enum Operation {
Add,
Update,
Upsert,
Delete,
}
#[derive(Error, Debug)]
pub(crate) enum OperationConversionError {
#[error("Invalid oper... | chroma/rust/worker/src/types/operation.rs/0 | {
"file_path": "chroma/rust/worker/src/types/operation.rs",
"repo_id": "chroma",
"token_count": 939
} | 64 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,386 |
use crate::nn::conv1d_weight_norm;
use candle::{DType, IndexOp, Module, Result, Tensor};
use candle_nn::{conv1d, Conv1d, Conv1dConfig, VarBuilder};
// Encodec Model
// https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py
#[derive(Debug, Clone, PartialEq)]
enum Norm... | candle/candle-examples/examples/musicgen/encodec_model.rs/0 | {
"file_path": "candle/candle-examples/examples/musicgen/encodec_model.rs",
"repo_id": "candle",
"token_count": 9178
} | 43 |
// 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/typeutil/schema_test.go/0 | {
"file_path": "milvus/pkg/util/typeutil/schema_test.go",
"repo_id": "milvus",
"token_count": 26418
} | 1,951 |
package connection
import (
"context"
"strconv"
"sync"
"time"
"github.com/golang/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus/pkg/log"
)
const (
// we shouldn't check this too frequently.
defaultConnCheckDuration = 2 * time.Minute
defaultTTLForInacti... | milvus/internal/proxy/connection/manager.go/0 | {
"file_path": "milvus/internal/proxy/connection/manager.go",
"repo_id": "milvus",
"token_count": 1473
} | 1,741 |
# Querying
Querying is the most important part of your LLM application. To learn more about getting a final product that you can deploy, check out the [query engine](/module_guides/deploying/query_engine/root.md), [chat engine](/module_guides/deploying/chat_engines/root.md).
If you wish to combine advanced reasoning ... | llama_index/docs/module_guides/querying/querying.md/0 | {
"file_path": "llama_index/docs/module_guides/querying/querying.md",
"repo_id": "llama_index",
"token_count": 411
} | 1,160 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | diffusers/examples/wuerstchen/text_to_image/train_text_to_image_prior.py/0 | {
"file_path": "diffusers/examples/wuerstchen/text_to_image/train_text_to_image_prior.py",
"repo_id": "diffusers",
"token_count": 16370
} | 231 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/lilt.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/lilt.md",
"repo_id": "transformers",
"token_count": 1291
} | 457 |
import { SingleStoreVectorStore } from "@langchain/community/vectorstores/singlestore";
import { OpenAIEmbeddings } from "@langchain/openai";
export const run = async () => {
const vectorStore = await SingleStoreVectorStore.fromTexts(
["Hello world", "Bye bye", "hello nice world"],
[{ id: 2 }, { id: 1 }, { i... | langchainjs/examples/src/indexes/vector_stores/singlestore.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/singlestore.ts",
"repo_id": "langchainjs",
"token_count": 304
} | 819 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/core/src/exec/Driver.h/0 | {
"file_path": "milvus/internal/core/src/exec/Driver.h",
"repo_id": "milvus",
"token_count": 2620
} | 1,923 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/imagegpt/image_processing_imagegpt.py/0 | {
"file_path": "transformers/src/transformers/models/imagegpt/image_processing_imagegpt.py",
"repo_id": "transformers",
"token_count": 5907
} | 699 |
---
sidebar_class_name: node-only
---
import CodeBlock from "@theme/CodeBlock";
# AnalyticDB
[AnalyticDB for PostgreSQL](https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/latest/product-introduction-overview) is a massively parallel processing (MPP) data warehousing service that is designed to analyze l... | langchainjs/docs/core_docs/docs/integrations/vectorstores/analyticdb.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/analyticdb.mdx",
"repo_id": "langchainjs",
"token_count": 604
} | 772 |
<jupyter_start><jupyter_text>Analyze LangSmith Datasets with Lilac[](https://colab.research.google.com/github/langchain-ai/langsmith-cookbook/blob/main/exploratory-data-analysis/lilac/lilac.ipynb)Lilac is an open-source product that helps you analyze, structure, and clean unstructured data with AI. You can use it to be... | langsmith-cookbook/exploratory-data-analysis/lilac/lilac.ipynb/0 | {
"file_path": "langsmith-cookbook/exploratory-data-analysis/lilac/lilac.ipynb",
"repo_id": "langsmith-cookbook",
"token_count": 5163
} | 1,093 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/wav2vec2/test_modeling_wav2vec2.py/0 | {
"file_path": "transformers/tests/models/wav2vec2/test_modeling_wav2vec2.py",
"repo_id": "transformers",
"token_count": 38332
} | 795 |
<!--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... | accelerate/docs/source/basic_tutorials/install.md/0 | {
"file_path": "accelerate/docs/source/basic_tutorials/install.md",
"repo_id": "accelerate",
"token_count": 996
} | 2 |
[tool.poetry]
name = "chat-langchain"
version = "0.1.0"
description = ""
authors = ["SN <6432132+samnoyes@users.noreply.github.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
langchain = "^0.1.5"
langchain-community = "^0.0.19"
langchain-openai = "^0.0.3"
langchain-google-genai = "^0.0.6"
langs... | chat-langchain/pyproject.toml/0 | {
"file_path": "chat-langchain/pyproject.toml",
"repo_id": "chat-langchain",
"token_count": 392
} | 9 |
pub mod activation;
pub mod batch_norm;
pub mod conv;
pub mod embedding;
pub mod encoding;
pub mod func;
pub mod group_norm;
pub mod init;
pub mod layer_norm;
pub mod linear;
pub mod loss;
pub mod ops;
pub mod optim;
pub mod rnn;
pub mod sequential;
pub mod var_builder;
pub mod var_map;
pub use activation::{prelu, Act... | candle/candle-nn/src/lib.rs/0 | {
"file_path": "candle/candle-nn/src/lib.rs",
"repo_id": "candle",
"token_count": 421
} | 57 |
// 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/funcutil/random.go/0 | {
"file_path": "milvus/pkg/util/funcutil/random.go",
"repo_id": "milvus",
"token_count": 571
} | 1,902 |
# 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/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/__init__.py/0 | {
"file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/__init__.py",
"repo_id": "transformers",
"token_count": 4961
} | 760 |
import { TavilySearchResults } from "@langchain/community/tools/tavily_search";
import { AgentExecutor, createXmlAgent } from "langchain/agents";
import { pull } from "langchain/hub";
import type { PromptTemplate } from "@langchain/core/prompts";
import { ChatAnthropic } from "@langchain/anthropic";
// Define the too... | langchainjs/examples/src/agents/xml.ts/0 | {
"file_path": "langchainjs/examples/src/agents/xml.ts",
"repo_id": "langchainjs",
"token_count": 397
} | 759 |
package deletebuffer
import "github.com/milvus-io/milvus/pkg/util/typeutil"
// deleteBuffer caches L0 delete buffer for remote segments.
type deleteBuffer struct {
// timestamp => DeleteData
cache *typeutil.SkipList[uint64, []BufferItem]
}
// Cache delete data.
func (b *deleteBuffer) Cache(timestamp uint64, data [... | milvus/internal/querynodev2/delegator/deletebuffer/skiplist_buffer.go/0 | {
"file_path": "milvus/internal/querynodev2/delegator/deletebuffer/skiplist_buffer.go",
"repo_id": "milvus",
"token_count": 242
} | 1,838 |
"""Default query for PandasIndex.
WARNING: This tool provides the Agent access to the `eval` function.
Arbitrary code execution is possible on the machine running this tool.
This tool is not recommended to be used in a production setting, and would
require heavy sandboxing or virtual machines
"""
import logging
from... | llama_index/llama-index-core/llama_index/core/query_engine/pandas/pandas_query_engine.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/query_engine/pandas/pandas_query_engine.py",
"repo_id": "llama_index",
"token_count": 2931
} | 1,196 |
from langchain_community.llms.writer import Writer
__all__ = ["Writer"]
| langchain/libs/langchain/langchain/llms/writer.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/writer.py",
"repo_id": "langchain",
"token_count": 22
} | 567 |
# The certification process
The certification process is **completely free**:
- To get a *certificate of completion*: you need **to pass 80% of the assignments**.
- To get a *certificate of excellence*: you need **to pass 100% of the assignments**.
There's **no deadlines, the course is self-paced**.
<img src="http... | deep-rl-class/units/en/communication/certification.mdx/0 | {
"file_path": "deep-rl-class/units/en/communication/certification.mdx",
"repo_id": "deep-rl-class",
"token_count": 418
} | 159 |
<jupyter_start><jupyter_text>TileDB> [TileDB](https://github.com/TileDB-Inc/TileDB) is a powerful engine for indexing and querying dense and sparse multi-dimensional arrays.> TileDB offers ANN search capabilities using the [TileDB-Vector-Search](https://github.com/TileDB-Inc/TileDB-Vector-Search) module. It provides se... | langchain/docs/docs/integrations/vectorstores/tiledb.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/tiledb.ipynb",
"repo_id": "langchain",
"token_count": 782
} | 199 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.genius import GeniusReader
def test_class():
names_of_base_classes = [b.__name__ for b in GeniusReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-genius/tests/test_readers_genius.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-genius/tests/test_readers_genius.py",
"repo_id": "llama_index",
"token_count": 86
} | 1,447 |
<!--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/ja/tasks/object_detection.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/object_detection.md",
"repo_id": "transformers",
"token_count": 12769
} | 526 |
## Installation
From the `candle-pyo3` directory, enable a virtual env where you will want the
candle package to be installed then run.
```bash
maturin develop -r
python test.py
```
## Generating Stub Files for Type Hinting
For type hinting support, the `candle-pyo3` package requires `*.pyi` files. You can automa... | candle/candle-pyo3/README.md/0 | {
"file_path": "candle/candle-pyo3/README.md",
"repo_id": "candle",
"token_count": 190
} | 66 |
""" Halo Self Attention
Paper: `Scaling Local Self-Attention for Parameter Efficient Visual Backbones`
- https://arxiv.org/abs/2103.12731
@misc{2103.12731,
Author = {Ashish Vaswani and Prajit Ramachandran and Aravind Srinivas and Niki Parmar and Blake Hechtman and
Jonathon Shlens},
Title = {Scaling Local Self... | pytorch-image-models/timm/layers/halo_attn.py/0 | {
"file_path": "pytorch-image-models/timm/layers/halo_attn.py",
"repo_id": "pytorch-image-models",
"token_count": 4601
} | 345 |
from __future__ import annotations
from typing import Optional, Type
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel
from langchain_community.tools.playwright.base import BaseBrowserTool
from langchain_commun... | langchain/libs/community/langchain_community/tools/playwright/navigate_back.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/playwright/navigate_back.py",
"repo_id": "langchain",
"token_count": 758
} | 308 |
from langchain_core.utils.aiter import NoLock, Tee, py_anext
__all__ = ["py_anext", "NoLock", "Tee"]
| langchain/libs/langchain/langchain/utils/aiter.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utils/aiter.py",
"repo_id": "langchain",
"token_count": 41
} | 570 |
"""Test Google Speech-to-Text document loader.
You need to create a Google Cloud project and enable the Speech-to-Text API to run the
integration tests.
Follow the instructions in the example notebook:
google_speech_to_text.ipynb
to set up the app and configure authentication.
"""
import pytest
from langchain_commun... | langchain/libs/community/tests/integration_tests/document_loaders/test_google_speech_to_text.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_google_speech_to_text.py",
"repo_id": "langchain",
"token_count": 385
} | 324 |
<jupyter_start><jupyter_text>RePhraseQuery`RePhraseQuery` is a simple retriever that applies an LLM between the user input and the query passed by the retriever.It can be used to pre-process the user input in any way. Example Setting upCreate a vector store.<jupyter_code>import logging
from langchain.retrievers import... | langchain/docs/docs/integrations/retrievers/re_phrase.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/re_phrase.ipynb",
"repo_id": "langchain",
"token_count": 934
} | 162 |
# Copyright 2023 DDPO-pytorch authors (Kevin Black), metric-space, 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/lic... | trl/trl/trainer/ddpo_trainer.py/0 | {
"file_path": "trl/trl/trainer/ddpo_trainer.py",
"repo_id": "trl",
"token_count": 12350
} | 888 |
from pathlib import Path
from typing import Any
from langchain_core._api.path import as_import_path
def __getattr__(name: str) -> Any:
"""Get attr name."""
if name == "create_csv_agent":
# Get directory of langchain package
HERE = Path(__file__).parents[3]
here = as_import_path(Path(... | langchain/libs/community/langchain_community/agent_toolkits/csv/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/csv/__init__.py",
"repo_id": "langchain",
"token_count": 434
} | 223 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/meta/replica_manager.go/0 | {
"file_path": "milvus/internal/querycoordv2/meta/replica_manager.go",
"repo_id": "milvus",
"token_count": 3076
} | 1,978 |
import { expect, describe } from "@jest/globals";
import { GooglePlacesAPI } from "../google_places.js";
describe("GooglePlacesAPI", () => {
test("should be setup with correct parameters", async () => {
const instance = new GooglePlacesAPI();
expect(instance.name).toBe("google_places");
});
test("Google... | langchainjs/libs/langchain-community/src/tools/tests/google_places.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/tests/google_places.int.test.ts",
"repo_id": "langchainjs",
"token_count": 252
} | 1,018 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/models/mt5/test_modeling_mt5.py/0 | {
"file_path": "transformers/tests/models/mt5/test_modeling_mt5.py",
"repo_id": "transformers",
"token_count": 21202
} | 777 |
""" Step Scheduler
Basic step LR schedule with warmup, noise.
Hacked together by / Copyright 2020 Ross Wightman
"""
import math
import torch
from .scheduler import Scheduler
class StepLRScheduler(Scheduler):
"""
"""
def __init__(
self,
optimizer: torch.optim.Optimizer,
... | pytorch-image-models/timm/scheduler/step_lr.py/0 | {
"file_path": "pytorch-image-models/timm/scheduler/step_lr.py",
"repo_id": "pytorch-image-models",
"token_count": 939
} | 388 |
"""Common classes for structured operations."""
import logging
from abc import abstractmethod
from typing import Any, Callable, Dict, List, Optional, Sequence, cast
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
from llama_index.legacy.data_structs.table import StructDatapoint
from llama_in... | llama_index/llama-index-legacy/llama_index/legacy/indices/common/struct_store/base.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/common/struct_store/base.py",
"repo_id": "llama_index",
"token_count": 3769
} | 1,596 |
python_requirements(
name="reqs",
)
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/trafilatura_web/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/trafilatura_web/BUILD",
"repo_id": "llama_index",
"token_count": 24
} | 1,470 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/pipelines/test_pipelines_token_classification.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_token_classification.py",
"repo_id": "transformers",
"token_count": 20538
} | 800 |
interactions:
- request:
body: '{"input": [[8134], [2308], [43673]], "encoding_format": "base64"}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '65'
Content-Type:
- application/json
User-Age... | langchain/libs/community/tests/integration_tests/vectorstores/cassettes/test_weaviate/TestWeaviate.test_similarity_search_with_metadata_and_filter.yaml/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/cassettes/test_weaviate/TestWeaviate.test_similarity_search_with_metadata_and_filter.yaml",
"repo_id": "langchain",
"token_count": 22008
} | 370 |
<jupyter_start><jupyter_text>Defining Custom ToolsWhen constructing your own agent, you will need to provide it with a list of Tools that it can use. Besides the actual function that is called, the Tool consists of several components:- `name` (str), is required and must be unique within a set of tools provided to an ag... | langchain/docs/docs/modules/agents/tools/custom_tools.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/agents/tools/custom_tools.ipynb",
"repo_id": "langchain",
"token_count": 2772
} | 203 |
# Pod Kill Testcases All-in-one
# pod kill
# standalone
# todo
# cluster-1-node
# 11 pods(proxy, rootcoord, querynode, querycoord, datanode, datacoord,
# indexnode, indexcoord, pulsar, etcd, minio)
# cluster-n-nodes
# todo
Collections:
-
testcase:
name: test_qu... | milvus/tests/python_client/chaos/chaos_objects/pod_kill/testcases.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_kill/testcases.yaml",
"repo_id": "milvus",
"token_count": 2241
} | 1,960 |
from enum import Enum
from typing import Any, List, Optional
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.embeddings.base import BaseEmbedding
class NomicAITaskType(str, Enum):
SEARCH_QUERY = "search_query"... | llama_index/llama-index-legacy/llama_index/legacy/embeddings/nomic.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/embeddings/nomic.py",
"repo_id": "llama_index",
"token_count": 1561
} | 1,587 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | diffusers/examples/consistency_distillation/train_lcm_distill_sd_wds.py/0 | {
"file_path": "diffusers/examples/consistency_distillation/train_lcm_distill_sd_wds.py",
"repo_id": "diffusers",
"token_count": 26234
} | 207 |
from langchain_community.document_loaders.json_loader import JSONLoader
__all__ = ["JSONLoader"]
| langchain/libs/langchain/langchain/document_loaders/json_loader.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/json_loader.py",
"repo_id": "langchain",
"token_count": 28
} | 530 |
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import {
Group,
Text,
useMantineTheme,
Alert,
Table,
Button,
Title,
Flex,
Stack,
Spoiler,
Progress,
Card,
ScrollArea,
createStyles,
} from "@mantine/core";
import { IconUpload, IconX, IconAlertCircle... | auto-evaluator/nextjs/components/Playground.tsx/0 | {
"file_path": "auto-evaluator/nextjs/components/Playground.tsx",
"repo_id": "auto-evaluator",
"token_count": 13955
} | 1 |
"""PromptLayer wrapper."""
import datetime
from typing import Any, Dict, List, Optional
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_core.messages import BaseMessage
from langchain_core.outputs import ChatResult
from langchain_community.chat_... | langchain/libs/community/langchain_community/chat_models/promptlayer_openai.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_models/promptlayer_openai.py",
"repo_id": "langchain",
"token_count": 2353
} | 241 |
// 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/kv/etcd/etcd_kv_test.go/0 | {
"file_path": "milvus/internal/kv/etcd/etcd_kv_test.go",
"repo_id": "milvus",
"token_count": 10304
} | 1,992 |
use pyo3::prelude::*;
use std::collections::VecDeque;
/// An simple iterator that can be instantiated with a specified length.
/// We use this with iterators that don't have a size_hint but we might
/// know its size. This is useful with progress bars for example.
pub struct MaybeSizedIterator<I> {
length: Option<... | tokenizers/bindings/python/src/utils/iterators.rs/0 | {
"file_path": "tokenizers/bindings/python/src/utils/iterators.rs",
"repo_id": "tokenizers",
"token_count": 1797
} | 418 |
# coding=utf-8
# Copyright 2023 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/clvp/tokenization_clvp.py/0 | {
"file_path": "transformers/src/transformers/models/clvp/tokenization_clvp.py",
"repo_id": "transformers",
"token_count": 6732
} | 660 |
use tantivy::{
collector::{Collector, SegmentCollector},
DocId,
};
pub struct VecCollector;
impl Collector for VecCollector {
type Fruit = Vec<DocId>;
type Child = VecChildCollector;
fn for_segment(
&self,
_segment_local_id: tantivy::SegmentOrdinal,
_segment: &tantivy::Se... | milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/vec_collector.rs/0 | {
"file_path": "milvus/internal/core/thirdparty/tantivy/tantivy-binding/src/vec_collector.rs",
"repo_id": "milvus",
"token_count": 632
} | 1,780 |
"""Test tair functionality."""
from langchain_core.documents import Document
from langchain_community.vectorstores.tair import Tair
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
def test_tair() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "... | langchain/libs/community/tests/integration_tests/vectorstores/test_tair.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_tair.py",
"repo_id": "langchain",
"token_count": 184
} | 362 |
from typing import Any
from llama_index.core.callbacks.base_handler import BaseCallbackHandler
from llama_index.core.callbacks.simple_llm_handler import SimpleLLMHandler
def set_global_handler(eval_mode: str, **eval_params: Any) -> None:
"""Set global eval handlers."""
import llama_index.core
llama_inde... | llama_index/llama-index-core/llama_index/core/callbacks/global_handlers.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/callbacks/global_handlers.py",
"repo_id": "llama_index",
"token_count": 1821
} | 1,164 |
from langchain_community.retrievers.you import YouRetriever
__all__ = ["YouRetriever"]
| langchain/libs/langchain/langchain/retrievers/you.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/you.py",
"repo_id": "langchain",
"token_count": 29
} | 544 |
from typing import Annotated, List, Sequence
from uuid import uuid4
from fastapi import APIRouter, HTTPException, Path
from langchain.schema.messages import AnyMessage
from pydantic import BaseModel, Field
import app.storage as storage
from app.schema import OpengptsUserId, Thread, ThreadWithoutUserId
router = APIRo... | opengpts/backend/app/api/threads.py/0 | {
"file_path": "opengpts/backend/app/api/threads.py",
"repo_id": "opengpts",
"token_count": 945
} | 2,198 |
"""Hubspot reader."""
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class HubspotReader(BaseReader):
"""Hubspot reader. Reads data from a Hubspot account.
Args:
access_token(str): Hubspot API key.
"""
def __init__(... | llama_index/llama-index-integrations/readers/llama-index-readers-hubspot/llama_index/readers/hubspot/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-hubspot/llama_index/readers/hubspot/base.py",
"repo_id": "llama_index",
"token_count": 626
} | 1,385 |
# Fine-Tune Llama2-7b on SE paired dataset
import os
from dataclasses import dataclass, field
from typing import Optional
import torch
from accelerate import Accelerator
from datasets import load_dataset
from peft import AutoPeftModelForCausalLM, LoraConfig
from tqdm import tqdm
from transformers import AutoModelForCa... | trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py/0 | {
"file_path": "trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py",
"repo_id": "trl",
"token_count": 2634
} | 782 |
python_tests()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-fastembed/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,306 |
export type TextInputSequence = string
export type PreTokenizedInputSequence = string[]
export type InputSequence = TextInputSequence | PreTokenizedInputSequence
export type TextEncodeInput = TextInputSequence | [TextInputSequence, TextInputSequence]
export type PreTokenizedEncodeInput = PreTokenizedInputSequence | [P... | tokenizers/bindings/node/types.ts/0 | {
"file_path": "tokenizers/bindings/node/types.ts",
"repo_id": "tokenizers",
"token_count": 114
} | 400 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,330 |
from __future__ import annotations
import warnings
from typing import Any, Dict, List, Mapping, Optional
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import BaseModel, Extra
# Ignoring type because below is valid py... | langchain/libs/community/langchain_community/llms/mlflow_ai_gateway.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/mlflow_ai_gateway.py",
"repo_id": "langchain",
"token_count": 1482
} | 281 |
python_sources()
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/llama_index/storage/index_store/mongodb/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/llama_index/storage/index_store/mongodb/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,405 |
<!---
Copyright 2020 The HuggingFace Team. Tutti i diritti riservati.
Concesso in licenza in base alla Licenza Apache, Versione 2.0 (la "Licenza");
non è possibile utilizzare questo file se non in conformità con la Licenza.
È possibile ottenere una copia della Licenza all'indirizzo
http://www.apache.org/licenses/LICE... | transformers/docs/source/it/migration.md/0 | {
"file_path": "transformers/docs/source/it/migration.md",
"repo_id": "transformers",
"token_count": 5542
} | 473 |
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.postgres import PGVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in PGVectorStore.__mro__]
assert BasePydanticVectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/tests/test_vector_stores_postgres.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/tests/test_vector_stores_postgres.py",
"repo_id": "llama_index",
"token_count": 98
} | 1,617 |
import type { OpenAIClient } from "@langchain/openai";
import {
BaseMessage,
HumanMessage,
AIMessage,
SystemMessage,
} from "@langchain/core/messages";
/* #__PURE__ */ console.warn(
[
`[WARNING]: Importing from "langchain/schema" is deprecated.`,
``,
`Instead, please import from the appropriate e... | langchainjs/langchain/src/schema/index.ts/0 | {
"file_path": "langchainjs/langchain/src/schema/index.ts",
"repo_id": "langchainjs",
"token_count": 808
} | 986 |
#[cfg(test)]
pub mod simplified;
#[cfg(test)]
mod tests {
use anyhow::Result;
use candle::{DType, Device, Tensor};
use parquet::file::reader::SerializedFileReader;
// NOTE: Waiting on https://github.com/rust-lang/mdBook/pull/1856
#[rustfmt::skip]
#[tokio::test]
async fn book_hub_1() {
// A... | candle/candle-book/src/lib.rs/0 | {
"file_path": "candle/candle-book/src/lib.rs",
"repo_id": "candle",
"token_count": 2806
} | 34 |
<jupyter_start><jupyter_text>Mbox Reader If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-readers-mbox
!pip install llama-index
%env OPENAI_API_KEY=sk-************
from llama_index.readers.mbox import MboxReader
from llama_index.core import... | llama_index/docs/examples/data_connectors/MboxReaderDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/MboxReaderDemo.ipynb",
"repo_id": "llama_index",
"token_count": 242
} | 1,097 |
Citation Query Engine
=======================
.. automodule:: llama_index.core.query_engine.citation_query_engine
:members:
:inherited-members:
| llama_index/docs/api_reference/query/query_engines/citation_query_engine.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/query_engines/citation_query_engine.rst",
"repo_id": "llama_index",
"token_count": 49
} | 1,082 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.