text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<jupyter_start><jupyter_text>Chroma>[Chroma](https://docs.trychroma.com/getting-started) is a database for building AI applications with embeddings.In the notebook, we'll demo the `SelfQueryRetriever` wrapped around a `Chroma` vector store. Creating a Chroma vector storeFirst we'll want to create a Chroma vector stor... | langchain/docs/docs/integrations/retrievers/self_query/chroma_self_query.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/self_query/chroma_self_query.ipynb",
"repo_id": "langchain",
"token_count": 1731
} | 157 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,205 |
import { Gradient } from "@gradientai/nodejs-sdk";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
import { chunkArray } from "@langchain/core/utils/chunk_array";
/**
* Interface for GradientEmbeddings parameters. Extends E... | langchainjs/libs/langchain-community/src/embeddings/gradient_ai.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/gradient_ai.ts",
"repo_id": "langchainjs",
"token_count": 1201
} | 953 |
[tool.poetry]
name = "langchain-cli"
version = "0.0.21"
description = "CLI for interacting with LangChain"
authors = ["Erick Friis <erick@langchain.dev>"]
readme = "README.md"
repository = "https://github.com/langchain-ai/langchain"
license = "MIT"
[tool.poetry.urls]
"Source Code" = "https://github.com/langchain-ai/la... | langchain/libs/cli/pyproject.toml/0 | {
"file_path": "langchain/libs/cli/pyproject.toml",
"repo_id": "langchain",
"token_count": 744
} | 208 |
# LlamaIndex Vector_Stores Integration: Postgres
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,671 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-telegram/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-telegram/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,387 |
"""LlamaIndex Tool classes."""
from typing import Any, Dict, List
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.langchain import BaseTool
from llama_index.core.bridge.pydantic import BaseModel, Field
fro... | llama_index/llama-index-core/llama_index/core/langchain_helpers/agents/tools.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/langchain_helpers/agents/tools.py",
"repo_id": "llama_index",
"token_count": 1003
} | 1,158 |
# LlamaIndex Llms Integration: Watsonx
| llama_index/llama-index-integrations/llms/llama-index-llms-watsonx/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-watsonx/README.md",
"repo_id": "llama_index",
"token_count": 11
} | 1,424 |
from extraction_openai_functions.chain import chain
__all__ = ["chain"]
| langchain/templates/extraction-openai-functions/extraction_openai_functions/__init__.py/0 | {
"file_path": "langchain/templates/extraction-openai-functions/extraction_openai_functions/__init__.py",
"repo_id": "langchain",
"token_count": 22
} | 636 |
/* eslint-disable */
// tslint:disable
/**
* FastAPI
*
*
* OpenAPI spec version: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator+.
* https://github.com/karlvr/openapi-generator-plus
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { BASE_PATH, C... | chroma/clients/js/src/generated/api.ts/0 | {
"file_path": "chroma/clients/js/src/generated/api.ts",
"repo_id": "chroma",
"token_count": 23657
} | 33 |
Retriever Router Query Engine
=============================
.. automodule:: llama_index.core.query_engine.retriever_query_engine
:members:
:inherited-members:
| llama_index/docs/api_reference/query/query_engines/retriever_router_query_engine.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/query_engines/retriever_router_query_engine.rst",
"repo_id": "llama_index",
"token_count": 52
} | 1,094 |
from llama_index.core.question_gen.types import BaseQuestionGenerator
from llama_index.question_gen.guidance import GuidanceQuestionGenerator
def test_class():
names_of_base_classes = [b.__name__ for b in GuidanceQuestionGenerator.__mro__]
assert BaseQuestionGenerator.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/question_gen/llama-index-question-gen-guidance/tests/test_question_gen_guidance_generator.py/0 | {
"file_path": "llama_index/llama-index-integrations/question_gen/llama-index-question-gen-guidance/tests/test_question_gen_guidance_generator.py",
"repo_id": "llama_index",
"token_count": 99
} | 1,305 |
# LlamaIndex Llms Integration: Bedrock
| llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/README.md",
"repo_id": "llama_index",
"token_count": 11
} | 1,218 |
#!/usr/bin/env python
# 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/LI... | transformers/examples/research_projects/luke/run_luke_ner_no_trainer.py/0 | {
"file_path": "transformers/examples/research_projects/luke/run_luke_ner_no_trainer.py",
"repo_id": "transformers",
"token_count": 12486
} | 536 |
import { ToolInterface } from "@langchain/core/tools";
import { Toolkit } from "@langchain/community/agents/toolkits/base";
import { ZapierNLARunAction, ZapierNLAWrapper } from "../../../tools/zapier.js";
/**
* Represents a toolkit for working with Zapier actions. It extends the
* Toolkit class and provides function... | langchainjs/langchain/src/agents/toolkits/zapier/zapier.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/toolkits/zapier/zapier.ts",
"repo_id": "langchainjs",
"token_count": 562
} | 884 |
"""Integration tests for the langchain tracer module."""
import asyncio
import os
from aiohttp import ClientSession
from langchain_core.callbacks.manager import atrace_as_chain_group, trace_as_chain_group
from langchain_core.prompts import PromptTemplate
from langchain_core.tracers.context import tracing_enabled, trac... | langchain/libs/community/tests/integration_tests/callbacks/test_langchain_tracer.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/callbacks/test_langchain_tracer.py",
"repo_id": "langchain",
"token_count": 4532
} | 317 |
# coding=utf-8
# Copyright Google AI and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | transformers/src/transformers/models/canine/tokenization_canine.py/0 | {
"file_path": "transformers/src/transformers/models/canine/tokenization_canine.py",
"repo_id": "transformers",
"token_count": 3965
} | 617 |
<jupyter_start><jupyter_text>Ollama - Llama 2 7B SetupFirst, follow the [readme](https://github.com/jmorganca/ollama) to set up and run a local Ollama instance.When the Ollama app is running on your local machine:- All of your local models are automatically served on localhost:11434- Select your model when setting llm... | llama_index/docs/examples/llm/ollama.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/ollama.ipynb",
"repo_id": "llama_index",
"token_count": 1165
} | 1,195 |
# Vespa
>[Vespa](https://vespa.ai/) is a fully featured search engine and vector database.
> It supports vector search (ANN), lexical search, and search in structured data, all in the same query.
## Installation and Setup
```bash
pip install pyvespa
```
## Retriever
See a [usage example](/docs/integrations/re... | langchain/docs/docs/integrations/providers/vespa.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/vespa.mdx",
"repo_id": "langchain",
"token_count": 126
} | 153 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/ctrl.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/ctrl.md",
"repo_id": "transformers",
"token_count": 1209
} | 459 |
import base64
import io
import os
import uuid
from io import BytesIO
from pathlib import Path
from langchain.retrievers.multi_vector import MultiVectorRetriever
from langchain.storage import LocalFileStore
from langchain_community.chat_models import ChatOllama
from langchain_community.embeddings import OllamaEmbedding... | langchain/templates/rag-multi-modal-mv-local/ingest.py/0 | {
"file_path": "langchain/templates/rag-multi-modal-mv-local/ingest.py",
"repo_id": "langchain",
"token_count": 2174
} | 722 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py",
"repo_id": "transformers",
"token_count": 2437
} | 727 |
# Create a dataset
Sometimes, you may need to create a dataset if you're working with your own data. Creating a dataset with 🤗 Datasets confers all the advantages of the library to your dataset: fast loading and processing, [stream enormous datasets](stream), [memory-mapping](https://huggingface.co/course/chapter5/4?... | datasets/docs/source/create_dataset.mdx/0 | {
"file_path": "datasets/docs/source/create_dataset.mdx",
"repo_id": "datasets",
"token_count": 2167
} | 116 |
python_test_utils(
name="test_utils",
dependencies=[
'llama-index-core/tests/indices/vector_store/mock_services.py',
"llama-index-core/tests/indices/list/__init__.py",
"llama-index-core/tests/indices/list:list",
'llama-index-core/tests/mock_utils/mock_predict.py',
'llama-... | llama_index/llama-index-core/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/BUILD",
"repo_id": "llama_index",
"token_count": 248
} | 1,183 |
from __future__ import annotations
import json
from json import JSONDecodeError
from time import sleep
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import CallbackManager
from langchain_core... | langchain/libs/langchain/langchain/agents/openai_assistant/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/openai_assistant/base.py",
"repo_id": "langchain",
"token_count": 12569
} | 443 |
import { describe, expect, test } from "@jest/globals";
import { Document } from "@langchain/core/documents";
import {
CharacterTextSplitter,
LatexTextSplitter,
MarkdownTextSplitter,
RecursiveCharacterTextSplitter,
TokenTextSplitter,
} from "../text_splitter.js";
function textLineGenerator(char: string, leng... | langchainjs/langchain/src/tests/text_splitter.test.ts/0 | {
"file_path": "langchainjs/langchain/src/tests/text_splitter.test.ts",
"repo_id": "langchainjs",
"token_count": 5652
} | 954 |
import { HfInference, HfInferenceEndpoint } from "@huggingface/inference";
import { Embeddings, type EmbeddingsParams } from "@langchain/core/embeddings";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
/**
* Interface that extends EmbeddingsParams and defines additional
* parameters specific to ... | langchainjs/libs/langchain-community/src/embeddings/hf.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/hf.ts",
"repo_id": "langchainjs",
"token_count": 844
} | 940 |
python_sources()
| llama_index/llama-index-finetuning/llama_index/finetuning/BUILD/0 | {
"file_path": "llama_index/llama-index-finetuning/llama_index/finetuning/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,334 |
""" Swin Transformer V2
A PyTorch impl of : `Swin Transformer V2: Scaling Up Capacity and Resolution`
- https://arxiv.org/pdf/2111.09883
Code adapted from https://github.com/ChristophReich1996/Swin-Transformer-V2, original copyright/license info below
This implementation is experimental and subject to change in ... | pytorch-image-models/timm/models/swin_transformer_v2_cr.py/0 | {
"file_path": "pytorch-image-models/timm/models/swin_transformer_v2_cr.py",
"repo_id": "pytorch-image-models",
"token_count": 18939
} | 403 |
from langchain_community.embeddings.elasticsearch import ElasticsearchEmbeddings
__all__ = ["ElasticsearchEmbeddings"]
| langchain/libs/langchain/langchain/embeddings/elasticsearch.py/0 | {
"file_path": "langchain/libs/langchain/langchain/embeddings/elasticsearch.py",
"repo_id": "langchain",
"token_count": 34
} | 497 |
<jupyter_start><jupyter_text>Entraîner un nouveau *tokenizer* à partir d'un ancien Installez les bibliothèques 🤗 *Transformers* et 🤗 *Datasets* pour exécuter ce *notebook*.<jupyter_code>!pip install datasets transformers[sentencepiece]
!apt install git-lfs<jupyter_output><empty_output><jupyter_text>Vous aurez besoin ... | notebooks/course/fr/chapter6/section2.ipynb/0 | {
"file_path": "notebooks/course/fr/chapter6/section2.ipynb",
"repo_id": "notebooks",
"token_count": 1147
} | 290 |
<jupyter_start><jupyter_text>If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers and 🤗 Datasets. Uncomment the following cell and execute it:<jupyter_code>#! pip install datasets transformers[sentencepiece]<jupyter_output><empty_output><jupyter_text>If you're opening this notebo... | notebooks/examples/tokenizer_training.ipynb/0 | {
"file_path": "notebooks/examples/tokenizer_training.ipynb",
"repo_id": "notebooks",
"token_count": 5402
} | 305 |
// 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/producer_impl.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/client/producer_impl.go",
"repo_id": "milvus",
"token_count": 802
} | 1,803 |
import CodeBlock from "@theme/CodeBlock";
import CallbacksExample from "@examples/agents/agent_callbacks.ts";
# Subscribing to events
You can subscribe to a number of events that are emitted by the Agent and the underlying tools, chains and models via callbacks.
For more info on the events available see the [Callbac... | langchainjs/docs/core_docs/docs/modules/agents/how_to/callbacks.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/agents/how_to/callbacks.mdx",
"repo_id": "langchainjs",
"token_count": 177
} | 754 |
<jupyter_start><jupyter_text>`LlamaDataset` Submission Template NotebookThis notebook serves as a template for creating a particular kind of `LlamaDataset`, namely `LabelledRagDataset`. Additionally, this template aids in the preparation of all of the necessary supplementary materials in order to make a `LlamaDataset` ... | llama_index/docs/examples/llama_dataset/ragdataset_submission_template.ipynb/0 | {
"file_path": "llama_index/docs/examples/llama_dataset/ragdataset_submission_template.ipynb",
"repo_id": "llama_index",
"token_count": 5903
} | 1,064 |
""" Binary Cross Entropy w/ a few extras
Hacked together by / Copyright 2021 Ross Wightman
"""
from typing import Optional, Union
import torch
import torch.nn as nn
import torch.nn.functional as F
class BinaryCrossEntropy(nn.Module):
""" BCE with optional one-hot from dense targets, label smoothing, thresholdin... | pytorch-image-models/timm/loss/binary_cross_entropy.py/0 | {
"file_path": "pytorch-image-models/timm/loss/binary_cross_entropy.py",
"repo_id": "pytorch-image-models",
"token_count": 1082
} | 397 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/clap/convert_clap_original_pytorch_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/clap/convert_clap_original_pytorch_to_hf.py",
"repo_id": "transformers",
"token_count": 2042
} | 591 |
// 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/msgstream/mqwrapper/rmq/rmq_producer.go/0 | {
"file_path": "milvus/internal/mq/msgstream/mqwrapper/rmq/rmq_producer.go",
"repo_id": "milvus",
"token_count": 702
} | 1,951 |
# Overview
The how-to guides offer a more comprehensive overview of all the tools 🤗 Datasets offers and how to use them. This will help you tackle messier real-world datasets where you may need to manipulate the dataset structure or content to get it ready for training.
The guides assume you are familiar and comfort... | datasets/docs/source/how_to.md/0 | {
"file_path": "datasets/docs/source/how_to.md",
"repo_id": "datasets",
"token_count": 469
} | 131 |
#!/bin/bash
set -eu
# Initialize a variable to keep track of errors
errors=0
# make sure not importing from langchain, langchain_experimental, or langchain_community
git --no-pager grep '^from langchain\.' . && errors=$((errors+1))
git --no-pager grep '^from langchain_experimental\.' . && errors=$((errors+1))
git --... | langchain/libs/cli/langchain_cli/integration_template/scripts/lint_imports.sh/0 | {
"file_path": "langchain/libs/cli/langchain_cli/integration_template/scripts/lint_imports.sh",
"repo_id": "langchain",
"token_count": 166
} | 204 |
import { WatsonxAI } from "@langchain/community/llms/watsonx_ai";
// Note that modelParameters are optional
const model = new WatsonxAI({
modelId: "meta-llama/llama-2-70b-chat",
modelParameters: {
max_new_tokens: 100,
min_new_tokens: 0,
stop_sequences: [],
repetition_penalty: 1,
},
});
const res... | langchainjs/examples/src/llms/watsonx_ai.ts/0 | {
"file_path": "langchainjs/examples/src/llms/watsonx_ai.ts",
"repo_id": "langchainjs",
"token_count": 161
} | 886 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-slack/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-slack/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,456 |
# Neo4j Schema Query Builder
The `Neo4jQueryToolSpec` class provides a way to query a Neo4j graph database based on a provided schema definition. The class uses a language model to generate Cypher queries from user questions and has the capability to recover from Cypher syntax errors through a self-healing mechanism.
... | llama_index/llama-index-integrations/tools/llama-index-tools-neo4j/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-neo4j/README.md",
"repo_id": "llama_index",
"token_count": 611
} | 1,489 |
"""Integration test for Github Wrapper."""
import pytest
from langchain_community.utilities.github import GitHubAPIWrapper
# Make sure you have set the following env variables:
# GITHUB_REPOSITORY
# GITHUB_BRANCH
# GITHUB_APP_ID
# GITHUB_PRIVATE_KEY
@pytest.fixture
def api_client() -> GitHubAPIWrapper:
return G... | langchain/libs/community/tests/integration_tests/utilities/test_github.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_github.py",
"repo_id": "langchain",
"token_count": 251
} | 381 |
# LlamaIndex Embeddings Integration: Ollama
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-ollama/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-ollama/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,282 |
[tool.poetry]
name = "robocorp-action-server"
version = "0.0.1"
description = ""
authors = ["Robocorp Technologies <info@robocorp.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
langchain-openai = ">=0.0.2,<0.1"
langchain-robocorp = ">=0.0.1,<0.1"
[tool.poetry.group.d... | langchain/templates/robocorp-action-server/pyproject.toml/0 | {
"file_path": "langchain/templates/robocorp-action-server/pyproject.toml",
"repo_id": "langchain",
"token_count": 266
} | 680 |
<!---
Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | transformers/examples/research_projects/xtreme-s/README.md/0 | {
"file_path": "transformers/examples/research_projects/xtreme-s/README.md",
"repo_id": "transformers",
"token_count": 3401
} | 560 |
# Snscrape twitter Loader
This loader loads documents from Twitter using the Snscrape Python package.
## Usage
Here's an example usage of the SnscrapeReader.
```python
from llama_index import download_loader
import os
SnscrapeReader = download_loader("SnscrapeTwitterReader")
loader = SnscrapeReader()
documents = ... | llama_index/llama-index-integrations/readers/llama-index-readers-snscrape-twitter/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-snscrape-twitter/README.md",
"repo_id": "llama_index",
"token_count": 218
} | 1,458 |
// 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/retry/retry_test.go/0 | {
"file_path": "milvus/pkg/util/retry/retry_test.go",
"repo_id": "milvus",
"token_count": 1318
} | 1,851 |
""" Real labels evaluator for ImageNet
Paper: `Are we done with ImageNet?` - https://arxiv.org/abs/2006.07159
Based on Numpy example at https://github.com/google-research/reassessed-imagenet
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
import json
import numpy as np
import pkgutil
class RealLabels... | pytorch-image-models/timm/data/real_labels.py/0 | {
"file_path": "pytorch-image-models/timm/data/real_labels.py",
"repo_id": "pytorch-image-models",
"token_count": 854
} | 350 |
import sys
from pathlib import Path
import pytest
from langchain_community.document_loaders.html_bs import BSHTMLLoader
HERE = Path(__file__).parent
EXAMPLES = HERE.parent.parent / "integration_tests" / "examples"
@pytest.mark.requires("bs4", "lxml")
def test_bs_html_loader() -> None:
"""Test unstructured load... | langchain/libs/community/tests/unit_tests/document_loaders/test_bshtml.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_bshtml.py",
"repo_id": "langchain",
"token_count": 513
} | 392 |
# 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... | transformers/src/transformers/models/persimmon/convert_persimmon_weights_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/persimmon/convert_persimmon_weights_to_hf.py",
"repo_id": "transformers",
"token_count": 1749
} | 645 |
# Illustration
Collection TTL(Time to Live ) is the expiration time attribute on the collection. The expired data will not be queried or searched and clean up with the GC mechanism.
# Manipulation
We provide a property of collection level to config TTL: `collection.ttl.seconds`.
There is a priority for the collectio... | milvus/docs/user_guides/collection_ttl.md/0 | {
"file_path": "milvus/docs/user_guides/collection_ttl.md",
"repo_id": "milvus",
"token_count": 263
} | 1,739 |
"""Init params."""
| llama_index/llama-index-legacy/tests/logger/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/logger/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,627 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.clickhouse import ClickHouseReader
def test_class():
names_of_base_classes = [b.__name__ for b in ClickHouseReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-clickhouse/tests/test_readers_clickhouse.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-clickhouse/tests/test_readers_clickhouse.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,275 |
import json
from typing import Any, AsyncIterator, Dict, Iterator, List, Mapping, Optional
import aiohttp
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun,
CallbackManagerForLLMRun,
)
from langchain_core.language_models.llms import LLM
from langchain_core.outputs import GenerationChunk
from... | langchain/libs/community/langchain_community/llms/deepinfra.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/deepinfra.py",
"repo_id": "langchain",
"token_count": 3153
} | 262 |
---
sidebar_position: 7
---
# Tool error handling
Using a model to invoke a tool has some obvious potential failure modes. Firstly, the model needs to return a output that can be parsed at all. Secondly, the model needs to return tool arguments that are valid.
We can build error handling into our chains to mitigate ... | langchainjs/docs/core_docs/docs/use_cases/tool_use/tool_error_handling.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/tool_use/tool_error_handling.mdx",
"repo_id": "langchainjs",
"token_count": 1527
} | 771 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/model_doc/canine.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/canine.md",
"repo_id": "transformers",
"token_count": 3007
} | 492 |
# 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... | diffusers/examples/community/ddim_noise_comparative_analysis.py/0 | {
"file_path": "diffusers/examples/community/ddim_noise_comparative_analysis.py",
"repo_id": "diffusers",
"token_count": 3417
} | 201 |
import { SupabaseVectorStore } from "@langchain/community/vectorstores/supabase";
import { OpenAIEmbeddings } from "@langchain/openai";
import { createClient } from "@supabase/supabase-js";
// First, follow set-up instructions at
// https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/supabase
con... | langchainjs/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts",
"repo_id": "langchainjs",
"token_count": 364
} | 833 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
predicates "github.com/milvus-io/milvus/internal/kv/predicates"
mock "github.com/stretchr/testify/mock"
)
// TxnKV is an autogenerated mock type for the TxnKV type
type TxnKV struct {
mock.Mock
}
type TxnKV_Expecter struct {
mock *mock.Mo... | milvus/internal/kv/mocks/txn_kv.go/0 | {
"file_path": "milvus/internal/kv/mocks/txn_kv.go",
"repo_id": "milvus",
"token_count": 7487
} | 1,807 |
import pytest
import datetime
from time import sleep
from pymilvus import connections, utility
from base.collection_wrapper import ApiCollectionWrapper
from common.cus_resource_opts import CustomResourceOperations as CusResource
from common import common_func as cf
from common import common_type as ct
from chaos.chaos... | milvus/tests/python_client/chaos/test_chaos_data_consist.py/0 | {
"file_path": "milvus/tests/python_client/chaos/test_chaos_data_consist.py",
"repo_id": "milvus",
"token_count": 2859
} | 2,032 |
// 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/allocator/cached_allocator.go/0 | {
"file_path": "milvus/internal/allocator/cached_allocator.go",
"repo_id": "milvus",
"token_count": 2577
} | 1,727 |
from llama_index.legacy.prompts.utils import get_template_vars
def test_get_template_vars() -> None:
template = "hello {text} {foo}"
template_vars = get_template_vars(template)
assert template_vars == ["text", "foo"]
| llama_index/llama-index-legacy/tests/prompts/test_utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/prompts/test_utils.py",
"repo_id": "llama_index",
"token_count": 85
} | 1,630 |
"""Init params."""
from llama_index.finetuning.rerankers.cohere_reranker import (
CohereRerankerFinetuneEngine,
)
from llama_index.finetuning.rerankers.dataset_gen import CohereRerankerFinetuneDataset
__all__ = ["CohereRerankerFinetuneEngine", "CohereRerankerFinetuneDataset"]
| llama_index/llama-index-finetuning/llama_index/finetuning/rerankers/__init__.py/0 | {
"file_path": "llama_index/llama-index-finetuning/llama_index/finetuning/rerankers/__init__.py",
"repo_id": "llama_index",
"token_count": 111
} | 1,162 |
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Embeddings, type EmbeddingsParams } from "@langchain/core/embeddings";
import { type EmbeddingsResult as MistralAIEmbeddingsResult } from "@mistralai/mistralai";
import { chunkArray } from "@langchain/core/utils/chunk_array";
/**
* Interface... | langchainjs/libs/langchain-mistralai/src/embeddings.ts/0 | {
"file_path": "langchainjs/libs/langchain-mistralai/src/embeddings.ts",
"repo_id": "langchainjs",
"token_count": 1573
} | 981 |
// 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/config/manager_test.go/0 | {
"file_path": "milvus/pkg/config/manager_test.go",
"repo_id": "milvus",
"token_count": 2420
} | 2,031 |
from llama_index.vector_stores.redis.base import RedisVectorStore
__all__ = ["RedisVectorStore"]
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/llama_index/vector_stores/redis/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-redis/llama_index/vector_stores/redis/__init__.py",
"repo_id": "llama_index",
"token_count": 32
} | 1,535 |
<jupyter_start><jupyter_text>Oracle Cloud Infrastructure Generative AI Oracle Cloud Infrastructure (OCI) Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs), that cover a wide range of use cases, and which are available through a single API.Using t... | langchain/docs/docs/integrations/text_embedding/oci_generative_ai.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/oci_generative_ai.ipynb",
"repo_id": "langchain",
"token_count": 764
} | 165 |
// Code generated from Plan.g4 by ANTLR 4.9. DO NOT EDIT.
package planparserv2
import (
"fmt"
"unicode"
"github.com/antlr/antlr4/runtime/Go/antlr"
)
// Suppress unused import error
var _ = fmt.Printf
var _ = unicode.IsLetter
var serializedLexerAtn = []uint16{
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598,... | milvus/internal/parser/planparserv2/generated/plan_lexer.go/0 | {
"file_path": "milvus/internal/parser/planparserv2/generated/plan_lexer.go",
"repo_id": "milvus",
"token_count": 16924
} | 1,953 |
from dataclasses import dataclass, field
from typing import ClassVar, Dict
from ..features import Features, Value
from .base import TaskTemplate
@dataclass(frozen=True)
class LanguageModeling(TaskTemplate):
task: str = field(default="language-modeling", metadata={"include_in_asdict_even_if_is_default": True})
... | datasets/src/datasets/tasks/language_modeling.py/0 | {
"file_path": "datasets/src/datasets/tasks/language_modeling.py",
"repo_id": "datasets",
"token_count": 195
} | 141 |
# OpenSearch
This page covers how to use the OpenSearch ecosystem within LangChain.
It is broken into two parts: installation and setup, and then references to specific OpenSearch wrappers.
## Installation and Setup
- Install the Python package with `pip install opensearch-py`
## Wrappers
### VectorStore
There exis... | langchain/docs/docs/integrations/providers/opensearch.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/opensearch.mdx",
"repo_id": "langchain",
"token_count": 195
} | 148 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/docs/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/docs/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,406 |
package crypto
import (
"testing"
"github.com/stretchr/testify/assert"
"golang.org/x/crypto/bcrypt"
)
//func BenchmarkPasswordVerify(b *testing.B) {
// correctPassword := "test_my_pass_new"
// credInfo := &internalpb.CredentialInfo{
// Username: "root",
// Sha256Password: "bcca79df9650cef1d7ed9f63449d7f8a... | milvus/pkg/util/crypto/crypto_test.go/0 | {
"file_path": "milvus/pkg/util/crypto/crypto_test.go",
"repo_id": "milvus",
"token_count": 601
} | 1,963 |
from langchain_community.document_loaders.notebook import (
NotebookLoader,
concatenate_cells,
remove_newlines,
)
__all__ = ["concatenate_cells", "remove_newlines", "NotebookLoader"]
| langchain/libs/langchain/langchain/document_loaders/notebook.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/notebook.py",
"repo_id": "langchain",
"token_count": 70
} | 488 |
"""Test LLM Math functionality."""
import pytest
from langchain_experimental.llm_symbolic_math.base import (
LLMSymbolicMathChain,
)
from langchain_experimental.llm_symbolic_math.prompt import (
_PROMPT_TEMPLATE,
)
from tests.unit_tests.fake_llm import FakeLLM
try:
import sympy
except ImportError:
py... | langchain/libs/experimental/tests/unit_tests/test_llm_symbolic_math.py/0 | {
"file_path": "langchain/libs/experimental/tests/unit_tests/test_llm_symbolic_math.py",
"repo_id": "langchain",
"token_count": 1234
} | 455 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/utils/overwrite_expected_slice.py/0 | {
"file_path": "diffusers/utils/overwrite_expected_slice.py",
"repo_id": "diffusers",
"token_count": 1258
} | 284 |
<jupyter_start><jupyter_text>Neo4j[Neo4j](https://en.wikipedia.org/wiki/Neo4j) is an open-source graph database management system, renowned for its efficient management of highly connected data. Unlike traditional databases that store data in tables, Neo4j uses a graph structure with nodes, edges, and properties to rep... | langchain/docs/docs/integrations/memory/neo4j_chat_message_history.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/memory/neo4j_chat_message_history.ipynb",
"repo_id": "langchain",
"token_count": 244
} | 133 |
- sections:
- local: index
title: 🤗 Transformers
- local: quicktour
title: Schnellstart
- local: installation
title: Installation
title: Erste Schritte
- sections:
- local: pipeline_tutorial
title: Pipelines für Inferenzen
- local: autoclass_tutorial
title: Laden von vortrainierten Inst... | transformers/docs/source/de/_toctree.yml/0 | {
"file_path": "transformers/docs/source/de/_toctree.yml",
"repo_id": "transformers",
"token_count": 485
} | 463 |
build_performance:
collections:
-
server:
db_config.primary_path: /test/milvus/db_data_7/sift_1b_2048_128_l2_sq8h_wal
cache_config.cpu_cache_capacity: 32
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 1
gpu_resource_config.enable: true
... | milvus/tests/benchmark/milvus_benchmark/suites/gpu_build_sift1b_sq8h.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/gpu_build_sift1b_sq8h.yaml",
"repo_id": "milvus",
"token_count": 326
} | 1,873 |
# `tokenizers-darwin-arm64`
This is the **aarch64-apple-darwin** binary for `tokenizers`
| tokenizers/bindings/node/npm/darwin-arm64/README.md/0 | {
"file_path": "tokenizers/bindings/node/npm/darwin-arm64/README.md",
"repo_id": "tokenizers",
"token_count": 33
} | 407 |
from .visualizer import Annotation, EncodingVisualizer
| tokenizers/bindings/python/py_src/tokenizers/tools/__init__.py/0 | {
"file_path": "tokenizers/bindings/python/py_src/tokenizers/tools/__init__.py",
"repo_id": "tokenizers",
"token_count": 13
} | 459 |
# rag-vectara-multiquery
This template performs multiquery RAG with vectara.
## Environment Setup
Set the `OPENAI_API_KEY` environment variable to access the OpenAI models.
Also, ensure the following environment variables are set:
* `VECTARA_CUSTOMER_ID`
* `VECTARA_CORPUS_ID`
* `VECTARA_API_KEY`
## Usage
To use ... | langchain/templates/rag-vectara-multiquery/README.md/0 | {
"file_path": "langchain/templates/rag-vectara-multiquery/README.md",
"repo_id": "langchain",
"token_count": 664
} | 702 |
import { toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import { emojisplosion } from "emojisplosion";
import { useState, useRef } from "react";
import * as DOMPurify from "dompurify";
import { SourceBubble, Source } from "./SourceBubble";
import {
VStack,
Flex,
Heading,
HStack,
... | chat-langchain/chat-langchain/app/components/ChatMessageBubble.tsx/0 | {
"file_path": "chat-langchain/chat-langchain/app/components/ChatMessageBubble.tsx",
"repo_id": "chat-langchain",
"token_count": 5136
} | 7 |
---
sidebar_class_name: hidden
---
# Modules
LangChain provides standard, extendable interfaces and external integrations for the following modules, listed from least to most complex:
#### [Model I/O](/docs/modules/model_io/)
Interface with language models
#### [Data connection](/docs/modules/data_connection/)
In... | langchainjs/docs/core_docs/docs/modules/index.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/index.mdx",
"repo_id": "langchainjs",
"token_count": 217
} | 766 |
""" Global Context ViT
From scratch implementation of GCViT in the style of timm swin_transformer_v2_cr.py
Global Context Vision Transformers -https://arxiv.org/abs/2206.09959
@article{hatamizadeh2022global,
title={Global Context Vision Transformers},
author={Hatamizadeh, Ali and Yin, Hongxu and Kautz, Jan and M... | pytorch-image-models/timm/models/gcvit.py/0 | {
"file_path": "pytorch-image-models/timm/models/gcvit.py",
"repo_id": "pytorch-image-models",
"token_count": 10789
} | 402 |
DEFAULT_GIT_REPO = "https://github.com/langchain-ai/langchain.git"
DEFAULT_GIT_REF = "langserve-templates"
DEFAULT_GIT_SUBDIRECTORY = "templates"
DEFAULT_GIT_REF = "master"
| langchain/libs/cli/langchain_cli/constants.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/constants.py",
"repo_id": "langchain",
"token_count": 73
} | 215 |
from rag_elasticsearch import chain
if __name__ == "__main__":
questions = [
"What is the nasa sales team?",
"What is our work from home policy?",
"Does the company own my personal project?",
"How does compensation work?",
]
response = chain.invoke(
{
"q... | langchain/templates/rag-elasticsearch/main.py/0 | {
"file_path": "langchain/templates/rag-elasticsearch/main.py",
"repo_id": "langchain",
"token_count": 415
} | 688 |
language = "C++"
pragma_once = true
| milvus/internal/core/thirdparty/tantivy/tantivy-binding/cbindgen.toml/0 | {
"file_path": "milvus/internal/core/thirdparty/tantivy/tantivy-binding/cbindgen.toml",
"repo_id": "milvus",
"token_count": 15
} | 1,679 |
# coding=utf-8
# Copyright 2022 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/speech_encoder_decoder/modeling_flax_speech_encoder_decoder.py/0 | {
"file_path": "transformers/src/transformers/models/speech_encoder_decoder/modeling_flax_speech_encoder_decoder.py",
"repo_id": "transformers",
"token_count": 19082
} | 722 |
// 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/cache/hash_test.go/0 | {
"file_path": "milvus/pkg/util/cache/hash_test.go",
"repo_id": "milvus",
"token_count": 1148
} | 1,961 |
// 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/expression/BinaryArithOpEvalRangeExpr.cpp/0 | {
"file_path": "milvus/internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.cpp",
"repo_id": "milvus",
"token_count": 21636
} | 1,657 |
from langchain_community.document_loaders.url_selenium import SeleniumURLLoader
__all__ = ["SeleniumURLLoader"]
| langchain/libs/langchain/langchain/document_loaders/url_selenium.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/url_selenium.py",
"repo_id": "langchain",
"token_count": 37
} | 527 |
<jupyter_start><jupyter_text>MyScale>[MyScale](https://docs.myscale.com/en/overview/) is a cloud-based database optimized for AI applications and solutions, built on the open-source [ClickHouse](https://github.com/ClickHouse/ClickHouse). This notebook shows how to use functionality related to the `MyScale` vector datab... | langchain/docs/docs/integrations/vectorstores/myscale.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/myscale.ipynb",
"repo_id": "langchain",
"token_count": 1769
} | 196 |
"""Psychic reader."""
import logging
import os
from typing import List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
logger = logging.getLogger(__name__)
class PsychicReader(BaseReader):
"""Psychic reader.
Psychic is a platform that allows synci... | llama_index/llama-index-integrations/readers/llama-index-readers-psychic/llama_index/readers/psychic/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-psychic/llama_index/readers/psychic/base.py",
"repo_id": "llama_index",
"token_count": 1186
} | 1,508 |
---
hide_table_of_contents: true
---
# Bedrock
[Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) is a fully managed service that makes base models from Amazon and third-party model providers accessible through an API.
When this documentation was written, Bedrock supports one... | langchainjs/docs/core_docs/docs/integrations/text_embedding/bedrock.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/text_embedding/bedrock.mdx",
"repo_id": "langchainjs",
"token_count": 516
} | 742 |
# Infinity
>[Infinity](https://github.com/michaelfeil/infinity) allows the creation of text embeddings.
## Text Embedding Model
There exists an infinity Embedding model, which you can access with
```python
from langchain_community.embeddings import InfinityEmbeddings
```
For a more detailed walkthrough of this, see... | langchain/docs/docs/integrations/providers/infinity.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/infinity.mdx",
"repo_id": "langchain",
"token_count": 108
} | 138 |
<jupyter_start><jupyter_text>Semantic Scholar Loader in llama-index<jupyter_code>from llama_hub.semanticscholar.base import SemanticScholarReader
import os
import openai
from llama_index.llms import OpenAI
from llama_index.query_engine import CitationQueryEngine
from llama_index import (
VectorStoreIndex,
Stora... | llama_index/llama-index-integrations/readers/llama-index-readers-semanticscholar/examples/demo_s2.ipynb/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-semanticscholar/examples/demo_s2.ipynb",
"repo_id": "llama_index",
"token_count": 1017
} | 1,373 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/using-diffusers/write_own_pipeline.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/write_own_pipeline.md",
"repo_id": "diffusers",
"token_count": 9948
} | 198 |
"""Test XMLOutputParser"""
import pytest
from langchain_core.output_parsers.xml import XMLOutputParser
DEF_RESULT_ENCODING = """<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>
<baz></baz>
<baz>slim.shady</baz>
</bar>
<baz>tag</baz>
</foo>"""
DEF_RESULT_EXPECTED = {
"foo": [
... | langchain/libs/core/tests/unit_tests/output_parsers/test_xml_parser.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/output_parsers/test_xml_parser.py",
"repo_id": "langchain",
"token_count": 663
} | 405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.