text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-github/llama_index/readers/github/collaborators/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-github/llama_index/readers/github/collaborators/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,448 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/tests/test_encoder_decoder_models.py/0 | {
"file_path": "peft/tests/test_encoder_decoder_models.py",
"repo_id": "peft",
"token_count": 4380
} | 354 |
import numpy as np
import torch
from torch.utils.data import Dataset, IterableDataset
from ..utils.generic import ModelOutput
class PipelineDataset(Dataset):
def __init__(self, dataset, process, params):
self.dataset = dataset
self.process = process
self.params = params
def __len__(s... | transformers/src/transformers/pipelines/pt_utils.py/0 | {
"file_path": "transformers/src/transformers/pipelines/pt_utils.py",
"repo_id": "transformers",
"token_count": 5884
} | 683 |
import sys
from unittest.mock import MagicMock
from llama_index.legacy.schema import NodeRelationship, RelatedNodeInfo, TextNode
from llama_index.legacy.vector_stores.weaviate import WeaviateVectorStore
def test_weaviate_add() -> None:
# mock import
sys.modules["weaviate"] = MagicMock()
weaviate_client =... | llama_index/llama-index-legacy/tests/vector_stores/test_weaviate.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/vector_stores/test_weaviate.py",
"repo_id": "llama_index",
"token_count": 428
} | 1,687 |
"""Test RetrievalQA functionality."""
from langchain_community.document_loaders import DirectoryLoader
from langchain_community.embeddings.openai import OpenAIEmbeddings
from langchain_community.llms import OpenAI
from langchain_community.vectorstores import FAISS
from langchain.chains import RetrievalQAWithSourcesCha... | langchain/libs/langchain/tests/integration_tests/chains/test_retrieval_qa_with_sources.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/chains/test_retrieval_qa_with_sources.py",
"repo_id": "langchain",
"token_count": 596
} | 624 |
import { db } from "../db.js";
const context = await db.getTableInfo();
console.log(context);
/**
CREATE TABLE Album (
AlbumId INTEGER NOT NULL,
Title NVARCHAR(160) NOT NULL,
ArtistId INTEGER NOT NULL
)
SELECT * FROM "Album" LIMIT 3;
AlbumId Title ArtistId
1 For Those About To Rock We Salute You 1
2 Ball... | langchainjs/examples/src/use_cases/sql/prompting/table_definitions.ts/0 | {
"file_path": "langchainjs/examples/src/use_cases/sql/prompting/table_definitions.ts",
"repo_id": "langchainjs",
"token_count": 1799
} | 822 |
from os import PathLike
from pathlib import Path
from typing import Optional, Union
class VwLogger:
def __init__(self, path: Optional[Union[str, PathLike]]):
self.path = Path(path) if path else None
if self.path:
self.path.parent.mkdir(parents=True, exist_ok=True)
def log(self, vw... | langchain/libs/experimental/langchain_experimental/rl_chain/vw_logger.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/rl_chain/vw_logger.py",
"repo_id": "langchain",
"token_count": 232
} | 448 |
---
hide_table_of_contents: true
---
# GitBook
This example goes over how to load data from any GitBook, using Cheerio. One document will be created for each page.
## Setup
```bash npm2yarn
npm install cheerio
```
## Load from single GitBook page
```typescript
import { GitbookLoader } from "langchain/document_loa... | langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/gitbook.mdx",
"repo_id": "langchainjs",
"token_count": 286
} | 734 |
#include <metal_stdlib>
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
METAL_FUNC uint get_strided_index(
uint idx,
constant size_t &num_dims,
constant size_t *dims,
constant size_t *strides
) {
uint strided_i = 0;
for (uint d = 0; d < num_dims; d++) {
... | candle/candle-metal-kernels/src/binary.metal/0 | {
"file_path": "candle/candle-metal-kernels/src/binary.metal",
"repo_id": "candle",
"token_count": 1688
} | 60 |
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
import evaluate
import numpy as np
import torch
import torch.nn as nn
from datasets import load_dataset
from peft import LoraConfig, TaskType, get_peft_model
from transformers import (
AutoModelForSequenceClassification,
... | trl/examples/research_projects/stack_llama/scripts/reward_modeling.py/0 | {
"file_path": "trl/examples/research_projects/stack_llama/scripts/reward_modeling.py",
"repo_id": "trl",
"token_count": 4474
} | 774 |
import os
import pytest
from langchain_community.document_loaders import EtherscanLoader
if "ETHERSCAN_API_KEY" in os.environ:
etherscan_key_set = True
api_key = os.environ["ETHERSCAN_API_KEY"]
else:
etherscan_key_set = False
@pytest.mark.skipif(not etherscan_key_set, reason="Etherscan API key not prov... | langchain/libs/community/tests/integration_tests/document_loaders/test_etherscan.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_etherscan.py",
"repo_id": "langchain",
"token_count": 1036
} | 323 |
from langchain_nvidia_trt.llms import TritonTensorRTLLM
__all__ = ["TritonTensorRTLLM"]
| langchain/libs/partners/nvidia-trt/langchain_nvidia_trt/__init__.py/0 | {
"file_path": "langchain/libs/partners/nvidia-trt/langchain_nvidia_trt/__init__.py",
"repo_id": "langchain",
"token_count": 38
} | 621 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/models/seamless_m4t/test_processor_seamless_m4t.py/0 | {
"file_path": "transformers/tests/models/seamless_m4t/test_processor_seamless_m4t.py",
"repo_id": "transformers",
"token_count": 2078
} | 788 |
# 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/tests/models/auto/test_image_processing_auto.py/0 | {
"file_path": "transformers/tests/models/auto/test_image_processing_auto.py",
"repo_id": "transformers",
"token_count": 4164
} | 704 |
# 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/tests/pipelines/test_pipelines_document_question_answering.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_document_question_answering.py",
"repo_id": "transformers",
"token_count": 6554
} | 829 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/proxy/channels_time_ticker.go/0 | {
"file_path": "milvus/internal/proxy/channels_time_ticker.go",
"repo_id": "milvus",
"token_count": 2404
} | 2,013 |
import { GooglePaLM } from "@langchain/community/llms/googlepalm";
export const run = async () => {
const model = new GooglePaLM({
apiKey: "<YOUR API KEY>", // or set it in environment variable as `GOOGLE_PALM_API_KEY`
// other params
temperature: 1, // OPTIONAL
modelName: "models/text-bison-001", //... | langchainjs/examples/src/models/llm/googlepalm.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/googlepalm.ts",
"repo_id": "langchainjs",
"token_count": 302
} | 853 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-imdb-review/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,510 |
# LlamaIndex Vector Stores Integration: Upstash
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-upstash/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-upstash/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,542 |
# candle-blip
The
[blip-image-captioning](https://huggingface.co/Salesforce/blip-image-captioning-base)
model can generate captions for an input image.
## Running on an example
```bash
cargo run --example blip --release -- --image candle-examples/examples/yolo-v8/assets/bike.jpg
```
```
Running on CPU, to run on GP... | candle/candle-examples/examples/blip/README.md/0 | {
"file_path": "candle/candle-examples/examples/blip/README.md",
"repo_id": "candle",
"token_count": 190
} | 35 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-graphdb-cypher/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-graphdb-cypher/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,360 |
"""Test Redis functionality."""
import os
from typing import Any, Dict, List, Optional
import pytest
from langchain_core.documents import Document
from langchain_community.vectorstores.redis import (
Redis,
RedisFilter,
RedisNum,
RedisText,
)
from langchain_community.vectorstores.redis.filters import ... | langchain/libs/community/tests/integration_tests/vectorstores/test_redis.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_redis.py",
"repo_id": "langchain",
"token_count": 6160
} | 394 |
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Tool } from "@langchain/core/tools";
/**
* Interface for the parameters required to instantiate a BraveSearch
* instance.
*/
export interface BraveSearchParams {
apiKey?: string;
}
/**
* Class for interacting with the Brave Search engi... | langchainjs/libs/langchain-community/src/tools/brave_search.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/brave_search.ts",
"repo_id": "langchainjs",
"token_count": 737
} | 1,038 |
# coding=utf-8
# Copyright 2022 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/src/transformers/models/cvt/modeling_tf_cvt.py/0 | {
"file_path": "transformers/src/transformers/models/cvt/modeling_tf_cvt.py",
"repo_id": "transformers",
"token_count": 19162
} | 640 |
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
import { LLMResult } from "@langchain/core/outputs";
import {
BaseLLM,
BaseLLMCallOptions,
BaseLLMParams,
} from "@langchain/core/language_models/llms";
export interface AdvancedCustomLLMCallOptions extends BaseLLMCallOptions {}
expor... | langchainjs/examples/src/models/llm/custom_advanced.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/custom_advanced.ts",
"repo_id": "langchainjs",
"token_count": 566
} | 807 |
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.llama_dataset_metadata import LlamaDatasetMetadataPack
def test_class():
names_of_base_classes = [b.__name__ for b in LlamaDatasetMetadataPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-llama-dataset-metadata/tests/test_packs_llama_dataset_metadata.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llama-dataset-metadata/tests/test_packs_llama_dataset_metadata.py",
"repo_id": "llama_index",
"token_count": 109
} | 1,573 |
"""Jaguar Reader."""
import datetime
import json
from typing import Any, List, Optional
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
class JaguarReader(BaseReader):
"""Jaguar reader.
Retrieve documents from existing persisted Jaguar store.
"""
... | llama_index/llama-index-legacy/llama_index/legacy/readers/jaguar.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/jaguar.py",
"repo_id": "llama_index",
"token_count": 3773
} | 1,763 |
lint lint_diff lint_package lint_tests:
poetry run poe lint
test:
poetry run poe test
format:
poetry run poe format
| langchain/templates/Makefile/0 | {
"file_path": "langchain/templates/Makefile",
"repo_id": "langchain",
"token_count": 49
} | 641 |
# 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/stable_diffusion_panorama/test_stable_diffusion_panorama.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_panorama/test_stable_diffusion_panorama.py",
"repo_id": "diffusers",
"token_count": 7596
} | 292 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/schedulers/scheduling_utils_flax.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_utils_flax.py",
"repo_id": "diffusers",
"token_count": 5030
} | 260 |
from langchain_community.embeddings.xinference import XinferenceEmbeddings
__all__ = ["XinferenceEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/xinference.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/xinference.py",
"repo_id": "langchain",
"token_count": 34
} | 549 |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | tokenizers/docs/source/conf.py/0 | {
"file_path": "tokenizers/docs/source/conf.py",
"repo_id": "tokenizers",
"token_count": 781
} | 473 |
import threading
import time
import pytest
from pymilvus import DefaultConfig
from pymilvus.exceptions import MilvusException
from base.client_base import TestcaseBase
from base.collection_wrapper import ApiCollectionWrapper
from base.utility_wrapper import ApiUtilityWrapper
from utils.util_log import test_log as log
... | milvus/tests/python_client/testcases/test_utility.py/0 | {
"file_path": "milvus/tests/python_client/testcases/test_utility.py",
"repo_id": "milvus",
"token_count": 118838
} | 2,008 |
"""Simple reader that reads files of different formats from a directory."""
import logging
import mimetypes
import multiprocessing
import os
import warnings
from datetime import datetime
from functools import reduce
from itertools import repeat
from pathlib import Path
from typing import Any, Callable, Dict, Generator... | llama_index/llama-index-legacy/llama_index/legacy/readers/file/base.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/file/base.py",
"repo_id": "llama_index",
"token_count": 7366
} | 1,703 |
from langchain_core.load.dump import default, dumpd, dumps
__all__ = ["default", "dumps", "dumpd"]
| langchain/libs/langchain/langchain/load/dump.py/0 | {
"file_path": "langchain/libs/langchain/langchain/load/dump.py",
"repo_id": "langchain",
"token_count": 34
} | 522 |
import importlib.util
import logging
from typing import Any, Callable, List, Mapping, Optional
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.pydantic_v1 import Extra
from langchain_community.llms.self_hosted import SelfHostedPipeline
from langchain_community.llms.utils import enfor... | langchain/libs/community/langchain_community/llms/self_hosted_hugging_face.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/self_hosted_hugging_face.py",
"repo_id": "langchain",
"token_count": 3229
} | 292 |
from langchain_community.tools.file_management.write import (
WriteFileInput,
WriteFileTool,
)
__all__ = ["WriteFileInput", "WriteFileTool"]
| langchain/libs/langchain/langchain/tools/file_management/write.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/file_management/write.py",
"repo_id": "langchain",
"token_count": 50
} | 600 |
<jupyter_start><jupyter_text>RunGPTRunGPT is an open-source cloud-native large-scale multimodal models (LMMs) serving framework. It is designed to simplify the deployment and management of large language models, on a distributed cluster of GPUs. RunGPT aim to make it a one-stop solution for a centralized and accessible... | llama_index/docs/examples/llm/rungpt.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/rungpt.ipynb",
"repo_id": "llama_index",
"token_count": 1111
} | 1,146 |
export * from "langchain/load";
export * from "langchain/load/serializable";
export * from "langchain/agents";
export * from "langchain/agents/toolkits";
export * from "langchain/agents/toolkits/connery";
export * from "langchain/agents/format_scratchpad";
export * from "langchain/agents/format_scratchpad/openai_tools"... | langchainjs/environment_tests/test-exports-bun/src/entrypoints.js/0 | {
"file_path": "langchainjs/environment_tests/test-exports-bun/src/entrypoints.js",
"repo_id": "langchainjs",
"token_count": 1760
} | 829 |
export function encodePointer(p: string): string {
return encodeURI(escapePointer(p));
}
export function escapePointer(p: string): string {
return p.replace(/~/g, "~0").replace(/\//g, "~1");
}
| langchainjs/langchain-core/src/utils/@cfworker/json-schema/src/pointer.ts/0 | {
"file_path": "langchainjs/langchain-core/src/utils/@cfworker/json-schema/src/pointer.ts",
"repo_id": "langchainjs",
"token_count": 70
} | 835 |
use crate::{Error, Result, Shape};
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Layout {
shape: Shape,
// The strides are given in number of elements and not in bytes.
stride: Vec<usize>,
start_offset: usize,
}
impl Layout {
pub fn new(shape: Shape, stride: Vec<usize>, start_offset: usize) ->... | candle/candle-core/src/layout.rs/0 | {
"file_path": "candle/candle-core/src/layout.rs",
"repo_id": "candle",
"token_count": 4361
} | 36 |
// 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/common/Consts.h/0 | {
"file_path": "milvus/internal/core/src/common/Consts.h",
"repo_id": "milvus",
"token_count": 828
} | 1,743 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Playground</title>
</head>
<body>
<div id="root"></div>
<script>
try {
window.CONFIG_SCHEMA... | langserve/langserve/playground/index.html/0 | {
"file_path": "langserve/langserve/playground/index.html",
"repo_id": "langserve",
"token_count": 292
} | 1,028 |
import path from "path";
import url from "url";
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
const [exampleName, ...args] = process.argv.slice(2);
if (!exampleName) {
console.error("Please provide path to example to run");
process.exit(1);
}
// Allow people to pass all possible variati... | langchainjs/examples/src/index.ts/0 | {
"file_path": "langchainjs/examples/src/index.ts",
"repo_id": "langchainjs",
"token_count": 576
} | 843 |
from typing import Any, Callable, List, Optional, Sequence, TypedDict
import numpy as np
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.embeddings.base import BaseEmbedding
from llama_index.legacy.embeddings.openai import Open... | llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/semantic_splitter.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/semantic_splitter.py",
"repo_id": "llama_index",
"token_count": 3637
} | 1,595 |
"""DashVector Vector Store."""
import logging
from typing import Any, List, Optional, cast
from llama_index.core.schema import BaseNode, MetadataMode, TextNode
from llama_index.core.vector_stores.types import (
MetadataFilters,
VectorStore,
VectorStoreQuery,
VectorStoreQueryMode,
VectorStoreQueryR... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/llama_index/vector_stores/dashvector/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-dashvector/llama_index/vector_stores/dashvector/base.py",
"repo_id": "llama_index",
"token_count": 3286
} | 1,652 |
// 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/pkg/util/paramtable/component_param.go/0 | {
"file_path": "milvus/pkg/util/paramtable/component_param.go",
"repo_id": "milvus",
"token_count": 44309
} | 1,912 |
OPENAI_API_KEY: your_secret_key_here
LANGCHAIN_TRACING_V2: "true"
LANGCHAIN_PROJECT: langserve-launch-example
LANGCHAIN_API_KEY: your_secret_key_here
REDIS_URL: your_secret_here
TAVILY_API_KEY: your_secret_here
FIREWORKS_API_KEY: your_secret_here
YDC_API_KEY: your_secret_here
AWS_ACCESS_KEY_ID: your_secret_here
AWS_SEC... | opengpts/.env.gcp.yaml.example/0 | {
"file_path": "opengpts/.env.gcp.yaml.example",
"repo_id": "opengpts",
"token_count": 324
} | 2,196 |
<!--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/en/using-diffusers/inference_with_lcm.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/inference_with_lcm.md",
"repo_id": "diffusers",
"token_count": 3677
} | 173 |
"""Wrapper around Minimax chat models."""
import logging
from typing import Any, Dict, List, Optional, cast
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_core.language_models.chat_models import BaseChatModel
from langchain_core.messages import ... | langchain/libs/community/langchain_community/chat_models/minimax.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_models/minimax.py",
"repo_id": "langchain",
"token_count": 1215
} | 227 |
from langchain_community.embeddings.johnsnowlabs import JohnSnowLabsEmbeddings
__all__ = ["JohnSnowLabsEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/johnsnowlabs.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/johnsnowlabs.py",
"repo_id": "langchain",
"token_count": 39
} | 524 |
"""Gmail tool utils."""
from __future__ import annotations
import logging
import os
from typing import TYPE_CHECKING, List, Optional, Tuple
if TYPE_CHECKING:
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import Installed... | langchain/libs/community/langchain_community/tools/gmail/utils.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/gmail/utils.py",
"repo_id": "langchain",
"token_count": 1748
} | 291 |
# Builds GPU docker image of PyTorch specifically
# Uses multi-staged approach to reduce size
# Stage 1
# Use base conda image to reduce time
FROM continuumio/miniconda3:latest AS compile-image
# Specify py version
ENV PYTHON_VERSION=3.9
# Install apt libs
RUN apt-get update && \
apt-get install -y curl git wget &&... | accelerate/docker/accelerate-gpu/Dockerfile/0 | {
"file_path": "accelerate/docker/accelerate-gpu/Dockerfile",
"repo_id": "accelerate",
"token_count": 539
} | 1 |
from langchain_community.tools.shell.tool import (
ShellInput,
ShellTool,
)
__all__ = ["ShellInput", "ShellTool"]
| langchain/libs/langchain/langchain/tools/shell/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/shell/tool.py",
"repo_id": "langchain",
"token_count": 44
} | 589 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-genius/llama_index/readers/genius/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-genius/llama_index/readers/genius/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,405 |
from llama_index.readers.file.ipynb.base import IPYNBReader
__all__ = ["IPYNBReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/ipynb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/ipynb/__init__.py",
"repo_id": "llama_index",
"token_count": 34
} | 1,294 |
<jupyter_start><jupyter_text>Création de votre propre jeu de données Installez les bibliothèques 🤗 Transformers et 🤗 Datasets pour exécuter ce *notebook*.<jupyter_code>!pip install datasets evaluate transformers[sentencepiece]
!apt install git-lfs<jupyter_output><empty_output><jupyter_text>Vous aurez besoin de config... | notebooks/course/fr/chapter5/section5.ipynb/0 | {
"file_path": "notebooks/course/fr/chapter5/section5.ipynb",
"repo_id": "notebooks",
"token_count": 1679
} | 309 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-minio/llama_index/readers/minio/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-minio/llama_index/readers/minio/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,342 |
[package]
name = "candle-book"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { ... | candle/candle-book/Cargo.toml/0 | {
"file_path": "candle/candle-book/Cargo.toml",
"repo_id": "candle",
"token_count": 467
} | 28 |
<jupyter_start><jupyter_text>Elasticsearch> [Elasticsearch](https://www.elastic.co/elasticsearch/) is a distributed, RESTful search and analytics engine.> It provides a distributed, multi-tenant-capable full-text search engine with an HTTP web interface and schema-free> JSON documents.In this notebook, we'll demo the `... | langchain/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb",
"repo_id": "langchain",
"token_count": 1646
} | 169 |
import type { OpenAIClient } from "@langchain/openai";
import {
JsonSchema7ObjectType,
JsonSchema7ArrayType,
JsonSchema7Type,
} from "zod-to-json-schema";
import type { OpenAPIV3_1 } from "openapi-types";
import { ChainValues } from "@langchain/core/utils/types";
import { ChatOpenAI } from "@langchain/openai";
i... | langchainjs/langchain/src/chains/openai_functions/openapi.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/openai_functions/openapi.ts",
"repo_id": "langchainjs",
"token_count": 6678
} | 927 |
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Iterator, Optional
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseBlobParser
from langchain_community.document_loaders.blob_loaders import Blob
from langchain_community.document_lo... | langchain/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/parsers/language/language_parser.py",
"repo_id": "langchain",
"token_count": 3259
} | 245 |
import logging
import math
from typing import Any, List
from llama_index.core.schema import BaseNode, MetadataMode, TextNode
from llama_index.core.vector_stores.types import (
MetadataFilters,
VectorStore,
VectorStoreQuery,
VectorStoreQueryResult,
)
from llama_index.core.vector_stores.utils import (
... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-bagel/llama_index/vector_stores/bagel/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-bagel/llama_index/vector_stores/bagel/base.py",
"repo_id": "llama_index",
"token_count": 2516
} | 1,548 |
# Copyright 2024 The Intel Labs Team Authors and the HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | diffusers/src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py",
"repo_id": "diffusers",
"token_count": 17823
} | 234 |
from __future__ import annotations
from typing import Optional
from ionic.models.components import Product, QueryAPIRequest
from ionic.models.components import Query as SDKQuery
from ionic.models.operations import QueryResponse, QuerySecurity
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class Ioni... | llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/llama_index/tools/ionic_shopping/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/llama_index/tools/ionic_shopping/base.py",
"repo_id": "llama_index",
"token_count": 865
} | 1,488 |
// 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/rootcoord/step_executor_test.go/0 | {
"file_path": "milvus/internal/rootcoord/step_executor_test.go",
"repo_id": "milvus",
"token_count": 2210
} | 1,866 |
"""Test prompt functionality."""
| langchain/libs/core/tests/unit_tests/prompts/__init__.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/prompts/__init__.py",
"repo_id": "langchain",
"token_count": 7
} | 431 |
"""Init params."""
| llama_index/llama-index-core/tests/postprocessor/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/tests/postprocessor/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,196 |
#[cfg(not(debug_assertions))]
use assert_approx_eq::assert_approx_eq;
use std::collections::HashMap;
use std::fs::read_to_string;
use std::path::Path;
#[cfg(not(debug_assertions))]
use tokenizers::models::unigram::Lattice;
use tokenizers::models::unigram::Unigram;
use tokenizers::models::unigram::UnigramTrainer;
use to... | tokenizers/tokenizers/tests/unigram.rs/0 | {
"file_path": "tokenizers/tokenizers/tests/unigram.rs",
"repo_id": "tokenizers",
"token_count": 1698
} | 426 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/clip/configuration_clip.py/0 | {
"file_path": "transformers/src/transformers/models/clip/configuration_clip.py",
"repo_id": "transformers",
"token_count": 8388
} | 632 |
import { IEmbeddingFunction } from './embeddings/IEmbeddingFunction';
import { Configuration, ApiApi as DefaultApi } from "./generated";
import { handleSuccess, handleError } from "./utils";
import { Collection } from './Collection';
import { ChromaClientParams, CollectionMetadata, CollectionType, ConfigOptions, Create... | chroma/clients/js/src/ChromaClient.ts/0 | {
"file_path": "chroma/clients/js/src/ChromaClient.ts",
"repo_id": "chroma",
"token_count": 4229
} | 30 |
"""Test PaiEasEndpoint API wrapper."""
import os
from typing import Generator
from langchain_community.llms.pai_eas_endpoint import PaiEasEndpoint
def test_pai_eas_v1_call() -> None:
"""Test valid call to PAI-EAS Service."""
llm = PaiEasEndpoint(
eas_service_url=os.getenv("EAS_SERVICE_URL"),
... | langchain/libs/community/tests/integration_tests/llms/test_pai_eas_endpoint.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/llms/test_pai_eas_endpoint.py",
"repo_id": "langchain",
"token_count": 771
} | 338 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/audioldm/pipeline_audioldm.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/audioldm/pipeline_audioldm.py",
"repo_id": "diffusers",
"token_count": 11818
} | 247 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-rungpt/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,245 |
# LlamaIndex Readers Integration: Faiss
| llama_index/llama-index-integrations/readers/llama-index-readers-faiss/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-faiss/README.md",
"repo_id": "llama_index",
"token_count": 10
} | 1,430 |
"""Response builder class.
This class provides general functions for taking in a set of text
and generating a response.
Will support different modes, from 1) stuffing chunks into prompt,
2) create and refine separately over each chunk, 3) tree summarization.
"""
import logging
from abc import abstractmethod
from typ... | llama_index/llama-index-core/llama_index/core/response_synthesizers/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/response_synthesizers/base.py",
"repo_id": "llama_index",
"token_count": 4046
} | 1,245 |
python_sources()
| llama_index/llama-index-integrations/program/llama-index-program-lmformatenforcer/llama_index/program/lmformatenforcer/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/program/llama-index-program-lmformatenforcer/llama_index/program/lmformatenforcer/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,302 |
// 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/storage/LocalChunkManager.cpp/0 | {
"file_path": "milvus/internal/core/src/storage/LocalChunkManager.cpp",
"repo_id": "milvus",
"token_count": 3501
} | 1,673 |
"""Wrapper around Bookend AI embedding models."""
import json
from typing import Any, List
import requests
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Field
API_URL = "https://api.bookend.ai/"
DEFAULT_TASK = "embeddings"
PATH = "/models/predict"
class BookendE... | langchain/libs/community/langchain_community/embeddings/bookend.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/bookend.py",
"repo_id": "langchain",
"token_count": 1241
} | 274 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/mq/mqimpl/rocksmq/client/util.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/client/util.go",
"repo_id": "milvus",
"token_count": 423
} | 1,949 |
# 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/image_utils.py/0 | {
"file_path": "transformers/src/transformers/image_utils.py",
"repo_id": "transformers",
"token_count": 11878
} | 556 |
"""MultiOn agent."""
from __future__ import annotations
from typing import List
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools import BaseTool
from langchain_community.tools.multion.close_session import MultionCloseSession
from langchain_community.tools.multion.create_s... | langchain/libs/community/langchain_community/agent_toolkits/multion/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/multion/toolkit.py",
"repo_id": "langchain",
"token_count": 353
} | 225 |
import type { Config } from "tailwindcss";
const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(... | langchainjs/docs/api_refs/tailwind.config.ts/0 | {
"file_path": "langchainjs/docs/api_refs/tailwind.config.ts",
"repo_id": "langchainjs",
"token_count": 240
} | 700 |
# coding=utf-8
# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | transformers/src/transformers/models/fsmt/configuration_fsmt.py/0 | {
"file_path": "transformers/src/transformers/models/fsmt/configuration_fsmt.py",
"repo_id": "transformers",
"token_count": 4031
} | 666 |
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/tests/models/align/test_processor_align.py/0 | {
"file_path": "transformers/tests/models/align/test_processor_align.py",
"repo_id": "transformers",
"token_count": 3309
} | 717 |
use image::{DynamicImage, ImageBuffer};
use serde::Deserialize;
use std::collections::HashMap;
use candle::{DType, Device, Result, Tensor};
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct ProcessorConfig {
do_resize: bool,
height: u32,
width: u32,
do_rescale: bool,
do_normalize: bool,
... | candle/candle-examples/examples/trocr/image_processor.rs/0 | {
"file_path": "candle/candle-examples/examples/trocr/image_processor.rs",
"repo_id": "candle",
"token_count": 2274
} | 52 |
"""Playwright browser toolkit."""
from langchain_community.agent_toolkits.playwright.toolkit import (
PlayWrightBrowserToolkit,
)
__all__ = ["PlayWrightBrowserToolkit"]
| langchain/libs/community/langchain_community/agent_toolkits/playwright/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/playwright/__init__.py",
"repo_id": "langchain",
"token_count": 56
} | 225 |
<jupyter_start><jupyter_text>MLflow>[MLflow](https://www.mlflow.org/docs/latest/what-is-mlflow) is a versatile, expandable, open-source platform for managing workflows and artifacts across the machine learning lifecycle. It has built-in integrations with many popular ML libraries, but can be used with any library, algo... | langchain/docs/docs/integrations/providers/mlflow_tracking.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/providers/mlflow_tracking.ipynb",
"repo_id": "langchain",
"token_count": 1078
} | 141 |
import { InMemoryRecordManager } from "@langchain/community/indexes/memory";
import { PGVectorStore } from "@langchain/community/vectorstores/pgvector";
import { Document } from "@langchain/core/documents";
import { FakeEmbeddings } from "@langchain/core/utils/testing";
import { index } from "../indexing.js";
import {... | langchainjs/langchain/src/indexes/tests/indexing.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/indexes/tests/indexing.int.test.ts",
"repo_id": "langchainjs",
"token_count": 4470
} | 927 |
"""A Tracer implementation that records to LangChain endpoint."""
from __future__ import annotations
import logging
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
from uuid import UUID
from langsmith import ... | langchain/libs/core/langchain_core/tracers/langchain.py/0 | {
"file_path": "langchain/libs/core/langchain_core/tracers/langchain.py",
"repo_id": "langchain",
"token_count": 3719
} | 424 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.myscale import MyScaleReader
def test_class():
names_of_base_classes = [b.__name__ for b in MyScaleReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-myscale/tests/test_readers_myscale.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-myscale/tests/test_readers_myscale.py",
"repo_id": "llama_index",
"token_count": 89
} | 1,434 |
// 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/pkg/util/paramtable/base_table.go/0 | {
"file_path": "milvus/pkg/util/paramtable/base_table.go",
"repo_id": "milvus",
"token_count": 3042
} | 1,945 |
from enum import Enum
from typing import Dict, Type
from llama_index.core.storage.docstore.simple_docstore import SimpleDocumentStore
from llama_index.core.storage.docstore.types import BaseDocumentStore
class DocumentStoreType(str, Enum):
MONGO = "mongo"
SIMPLE = "simple"
DOCSTORE_TYPE_TO_CLASS: Dict[Docu... | llama_index/llama-index-core/llama_index/core/storage/docstore/registry.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/storage/docstore/registry.py",
"repo_id": "llama_index",
"token_count": 216
} | 1,179 |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | trl/examples/research_projects/tools/triviaqa.py/0 | {
"file_path": "trl/examples/research_projects/tools/triviaqa.py",
"repo_id": "trl",
"token_count": 2555
} | 881 |
<jupyter_start><jupyter_text>Simple Fusion RetrieverIn this example, we walk through how you can combine retrieval results from multiple queries and multiple indexes. The retrieved nodes will be returned as the top-k across all queries and indexes, as well as handling de-duplication of any nodes.<jupyter_code>import os... | llama_index/docs/examples/retrievers/simple_fusion.ipynb/0 | {
"file_path": "llama_index/docs/examples/retrievers/simple_fusion.ipynb",
"repo_id": "llama_index",
"token_count": 952
} | 1,086 |
from llama_index.experimental.param_tuner import (
AsyncParamTuner,
BaseParamTuner,
ParamTuner,
RayTuneParamTuner,
)
def test_class():
names_of_base_classes = [b.__name__ for b in AsyncParamTuner.__mro__]
assert BaseParamTuner.__name__ in names_of_base_classes
names_of_base_classes = [b._... | llama_index/llama-index-experimental/tests/param_tuner/test_param_tuner_classes.py/0 | {
"file_path": "llama_index/llama-index-experimental/tests/param_tuner/test_param_tuner_classes.py",
"repo_id": "llama_index",
"token_count": 221
} | 1,236 |
// 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/checkers/leader_checker_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/checkers/leader_checker_test.go",
"repo_id": "milvus",
"token_count": 6526
} | 1,752 |
# 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... | trl/trl/trainer/reward_config.py/0 | {
"file_path": "trl/trl/trainer/reward_config.py",
"repo_id": "trl",
"token_count": 461
} | 794 |
import torch
from diffusers import SASolverScheduler
from diffusers.utils.testing_utils import require_torchsde, torch_device
from .test_schedulers import SchedulerCommonTest
@require_torchsde
class SASolverSchedulerTest(SchedulerCommonTest):
scheduler_classes = (SASolverScheduler,)
forward_default_kwargs =... | diffusers/tests/schedulers/test_scheduler_sasolver.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_sasolver.py",
"repo_id": "diffusers",
"token_count": 3629
} | 282 |
<jupyter_start><jupyter_text>OpenAI Adapter**Please ensure OpenAI library is version 1.0.0 or higher; otherwise, refer to the older doc [OpenAI Adapter(Old)](./openai-old).**A lot of people get started with OpenAI but want to explore other models. LangChain's integrations with many model providers make this easy to do ... | langchain/docs/docs/integrations/adapters/openai.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/adapters/openai.ipynb",
"repo_id": "langchain",
"token_count": 1336
} | 97 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.