text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<jupyter_start><jupyter_text>Que faire quand vous obtenez une erreurCe chapitre portant sur le débogage, la langue nous importe peu ici. Nous nous intéressons surtout à la logique du code pour comprendre d'où provient l'erreur. Installez les bibliothèques 🤗 Transformers et 🤗 Datasets pour exécuter ce *notebook*.<jupy... | notebooks/course/fr/chapter8/section2.ipynb/0 | {
"file_path": "notebooks/course/fr/chapter8/section2.ipynb",
"repo_id": "notebooks",
"token_count": 1365
} | 303 |
// 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/SystemProperty.h/0 | {
"file_path": "milvus/internal/core/src/common/SystemProperty.h",
"repo_id": "milvus",
"token_count": 838
} | 1,724 |
from typing import List
import numpy as np
def _number_of_shards_in_gen_kwargs(gen_kwargs: dict) -> int:
"""Return the number of possible shards according to the input gen_kwargs"""
# Having lists of different sizes makes sharding ambigious, raise an error in this case
# until we decide how to define sha... | datasets/src/datasets/utils/sharding.py/0 | {
"file_path": "datasets/src/datasets/utils/sharding.py",
"repo_id": "datasets",
"token_count": 1742
} | 142 |
"""Chain pipeline where the outputs of one step feed directly into next."""
from typing import Any, Dict, List, Optional
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
)
from langchain_core.pydantic_v1 import Extra, root_validator
from langchain_core.utils.i... | langchain/libs/langchain/langchain/chains/sequential.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/sequential.py",
"repo_id": "langchain",
"token_count": 3372
} | 466 |
<jupyter_start><jupyter_text>Python REPLSometimes, for complex calculations, rather than have an LLM generate the answer directly, it can be better to have the LLM generate code to calculate the answer, and then run that code to get the answer. In order to easily do that, we provide a simple Python REPL to execute comm... | langchain/docs/docs/integrations/tools/python.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/tools/python.ipynb",
"repo_id": "langchain",
"token_count": 265
} | 176 |
from langchain_community.tools.playwright.navigate import (
NavigateTool,
NavigateToolInput,
)
__all__ = ["NavigateToolInput", "NavigateTool"]
| langchain/libs/langchain/langchain/tools/playwright/navigate.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/playwright/navigate.py",
"repo_id": "langchain",
"token_count": 52
} | 567 |
<jupyter_start><jupyter_text>Upstash Vector StoreWe're going to look at how to use LlamaIndex to interface with Upstash Vector!<jupyter_code>! pip install -q llama-index upstash-vector
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.core.vector_stores import UpstashVectorStore
from... | llama_index/docs/examples/vector_stores/UpstashVectorDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/UpstashVectorDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1029
} | 1,219 |
import { test, expect } from "@jest/globals";
import { OpenAI } from "@langchain/openai";
import type { PromptTemplate } from "@langchain/core/prompts";
import { TavilySearchResults } from "@langchain/community/tools/tavily_search";
import { pull } from "../../hub.js";
import { AgentExecutor, createReactAgent } from ".... | langchainjs/langchain/src/agents/tests/create_react_agent.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/create_react_agent.int.test.ts",
"repo_id": "langchainjs",
"token_count": 375
} | 917 |
import {
AsyncCaller,
AsyncCallerParams,
} from "@langchain/core/utils/async_caller";
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { StructuredTool } from "@langchain/core/tools";
import { ZodOptional, ZodString, z } from "zod";
/**
* An object containing configuration parameters for... | langchainjs/libs/langchain-community/src/tools/connery.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/connery.ts",
"repo_id": "langchainjs",
"token_count": 2834
} | 1,013 |
<!--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/zh/tokenizer_summary.md/0 | {
"file_path": "transformers/docs/source/zh/tokenizer_summary.md",
"repo_id": "transformers",
"token_count": 10784
} | 565 |
"""Agent utils."""
from llama_index.legacy.agent.types import TaskStep
from llama_index.legacy.core.llms.types import MessageRole
from llama_index.legacy.llms.base import ChatMessage
from llama_index.legacy.memory import BaseMemory
def add_user_step_to_memory(
step: TaskStep, memory: BaseMemory, verbose: bool = ... | llama_index/llama-index-legacy/llama_index/legacy/agent/utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/utils.py",
"repo_id": "llama_index",
"token_count": 192
} | 1,550 |
<jupyter_start><jupyter_text>Xorbits inference (Xinference)This notebook goes over how to use Xinference embeddings within LangChain InstallationInstall `Xinference` through PyPI:<jupyter_code>%pip install --upgrade --quiet "xinference[all]"<jupyter_output><empty_output><jupyter_text>Deploy Xinference Locally or in a... | langchain/docs/docs/integrations/text_embedding/xinference.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/xinference.ipynb",
"repo_id": "langchain",
"token_count": 575
} | 164 |
# Hands-on: advanced Deep Reinforcement Learning. Using Sample Factory to play Doom from pixels
<CourseFloatingBanner classNames="absolute z-10 right-0 top-0"
notebooks={[
{label: "Google Colab", value: "https://colab.research.google.com/github/huggingface/deep-rl-class/blob/main/notebooks/unit8/unit8_part2.ipynb"}
... | deep-rl-class/units/en/unit8/hands-on-sf.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit8/hands-on-sf.mdx",
"repo_id": "deep-rl-class",
"token_count": 5955
} | 159 |
from langchain_community.storage import __all__
EXPECTED_ALL = [
"AstraDBStore",
"AstraDBByteStore",
"MongoDBStore",
"RedisStore",
"UpstashRedisByteStore",
"UpstashRedisStore",
]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/community/tests/unit_tests/storage/test_imports.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/storage/test_imports.py",
"repo_id": "langchain",
"token_count": 121
} | 383 |
/*
* 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... | milvus/internal/proxy/trace_log_interceptor_test.go/0 | {
"file_path": "milvus/internal/proxy/trace_log_interceptor_test.go",
"repo_id": "milvus",
"token_count": 1738
} | 1,748 |
<jupyter_start><jupyter_text>Run TemplateIn `server.py`, set -```add_routes(app, chain_ext, path="/rag-weaviate")```<jupyter_code>from langserve.client import RemoteRunnable
rag_app_weaviate = RemoteRunnable("http://localhost:8000/rag-weaviate")
rag_app_weaviate.invoke("How does agent memory work?")<jupyter_output><em... | langchain/templates/hybrid-search-weaviate/hybrid_search_weaviate.ipynb/0 | {
"file_path": "langchain/templates/hybrid-search-weaviate/hybrid_search_weaviate.ipynb",
"repo_id": "langchain",
"token_count": 125
} | 651 |
import { loadSummarizationChain } from "langchain/chains";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import * as fs from "fs";
import { ChatOpenAI } from "@langchain/openai";
import { ChatAnthropic } from "@langchain/anthropic";
// In this example, we use a separate LLM as the final sum... | langchainjs/examples/src/chains/summarization_separate_output_llm.ts/0 | {
"file_path": "langchainjs/examples/src/chains/summarization_separate_output_llm.ts",
"repo_id": "langchainjs",
"token_count": 615
} | 765 |
from llama_index.indices.managed.colbert.base import ColbertIndex
__all__ = ["ColbertIndex"]
| llama_index/llama-index-integrations/indices/llama-index-indices-managed-colbert/llama_index/indices/managed/colbert/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/indices/llama-index-indices-managed-colbert/llama_index/indices/managed/colbert/__init__.py",
"repo_id": "llama_index",
"token_count": 30
} | 1,336 |
from llama_index.core.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-core/tests/prompts/test_utils.py/0 | {
"file_path": "llama_index/llama-index-core/tests/prompts/test_utils.py",
"repo_id": "llama_index",
"token_count": 84
} | 1,241 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | transformers/tests/tools/test_text_summarization.py/0 | {
"file_path": "transformers/tests/tools/test_text_summarization.py",
"repo_id": "transformers",
"token_count": 1135
} | 759 |
from llama_index.agent.openai_legacy.context_retriever_agent import (
ContextRetrieverOpenAIAgent,
)
from llama_index.agent.openai_legacy.openai_agent import BaseOpenAIAgent, OpenAIAgent
from llama_index.agent.openai_legacy.retriever_openai_agent import (
FnRetrieverOpenAIAgent,
)
__all__ = [
"ContextRetri... | llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/llama_index/agent/openai_legacy/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/agent/llama-index-agent-openai-legacy/llama_index/agent/openai_legacy/__init__.py",
"repo_id": "llama_index",
"token_count": 168
} | 1,339 |
---
hide_table_of_contents: true
---
import CodeBlock from "@theme/CodeBlock";
import WithoutReference from "@examples/guides/evaluation/comparision_evaluator/pairwise_string_without_reference.ts";
import WithReference from "@examples/guides/evaluation/comparision_evaluator/pairwise_string_with_reference.ts";
import C... | langchainjs/docs/core_docs/docs/guides/evaluation/comparison/pairwise_string.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/guides/evaluation/comparison/pairwise_string.mdx",
"repo_id": "langchainjs",
"token_count": 1042
} | 771 |
<jupyter_start><jupyter_text>Psychic ReaderDemonstrates the Psychic data connector. Used to query data from many SaaS tools from a single LlamaIndex-compatible API. PrerequisitesConnections must first be established from the Psychic dashboard or React hook before documents can be loaded. Refer to https://docs.psychic.d... | llama_index/docs/examples/data_connectors/PsychicDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/PsychicDemo.ipynb",
"repo_id": "llama_index",
"token_count": 771
} | 1,098 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 29896,
"logprob": -0.7685547,
"special": false,
"text": "1"
},
{
"id": 29906,
"logprob... | text-generation-inference/integration-tests/models/__snapshots__/test_grammar_llama/test_flash_llama_grammar_single_load_instance.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_grammar_llama/test_flash_llama_grammar_single_load_instance.json",
"repo_id": "text-generation-inference",
"token_count": 866
} | 387 |
from typing import TYPE_CHECKING
from ....utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
is_torch_available,
is_transformers_available,
is_transformers_version,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and i... | diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py",
"repo_id": "diffusers",
"token_count": 1112
} | 258 |
"""Multi-document agents Pack."""
from typing import Any, Dict, List
from llama_index.agent.openai import OpenAIAgent
from llama_index.agent.openai_legacy import FnRetrieverOpenAIAgent
from llama_index.core import ServiceContext, SummaryIndex, VectorStoreIndex
from llama_index.core.llama_pack.base import BaseLlamaPac... | llama_index/llama-index-packs/llama-index-packs-multi-document-agents/llama_index/packs/multi_document_agents/base.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-multi-document-agents/llama_index/packs/multi_document_agents/base.py",
"repo_id": "llama_index",
"token_count": 2499
} | 1,660 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/unittest/test_bool_index.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_bool_index.cpp",
"repo_id": "milvus",
"token_count": 2983
} | 1,683 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,533 |
// 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/util/flowgraph/input_node.go/0 | {
"file_path": "milvus/internal/util/flowgraph/input_node.go",
"repo_id": "milvus",
"token_count": 2360
} | 1,793 |
import { v4 as uuidv4 } from "uuid";
import { apiBaseUrl } from "./constants";
type SendFeedbackProps = {
key: string;
runId: string;
score?: number;
value?: string;
comment?: string;
feedbackId?: string;
isExplicit: boolean;
};
type FeedbackResponse = {
feedbackId: string;
code: number;
result: s... | chat-langchain/chat-langchain/app/utils/sendFeedback.tsx/0 | {
"file_path": "chat-langchain/chat-langchain/app/utils/sendFeedback.tsx",
"repo_id": "chat-langchain",
"token_count": 396
} | 7 |
# Anthropic
All functionality related to Anthropic models.
[Anthropic](https://www.anthropic.com/) is an AI safety and research company, and is the creator of Claude.
This page covers all integrations between Anthropic models and LangChain.
## Prompting Overview
Claude is chat-based model, meaning it is trained on ... | langchainjs/docs/core_docs/docs/integrations/platforms/anthropic.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/platforms/anthropic.mdx",
"repo_id": "langchainjs",
"token_count": 821
} | 785 |
from langchain_community.chat_message_histories.zep import ZepChatMessageHistory
__all__ = ["ZepChatMessageHistory"]
| langchain/libs/langchain/langchain/memory/chat_message_histories/zep.py/0 | {
"file_path": "langchain/libs/langchain/langchain/memory/chat_message_histories/zep.py",
"repo_id": "langchain",
"token_count": 35
} | 523 |
import asyncio
from threading import Thread
from typing import Any, List, Optional, Tuple
from llama_index.legacy.callbacks import CallbackManager, trace_method
from llama_index.legacy.chat_engine.types import (
AgentChatResponse,
BaseChatEngine,
StreamingAgentChatResponse,
ToolOutput,
)
from llama_ind... | llama_index/llama-index-legacy/llama_index/legacy/chat_engine/context.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/chat_engine/context.py",
"repo_id": "llama_index",
"token_count": 5010
} | 1,694 |
# MEP: Datanode remove dependency of `Datacoord`
Current state: "Accepted"
ISSUE: https://github.com/milvus-io/milvus/issues/26758
Keywords: datacoord, datanode, flush, dependency, roll-upgrade
## Summary
Remove the dependency of `Datacoord` for `Datanodes`.
## Motivation
1. Datanodes shall be always be running... | milvus/docs/design_docs/20230918-datanode_remove_datacoord_dependency.md/0 | {
"file_path": "milvus/docs/design_docs/20230918-datanode_remove_datacoord_dependency.md",
"repo_id": "milvus",
"token_count": 1320
} | 1,735 |
# NebulaGraph Query Engine Pack
This LlamaPack creates a NebulaGraph query engine, and executes its `query` function. This pack offers the option of creating multiple types of query engines, namely:
- Knowledge graph vector-based entity retrieval (default if no query engine type option is provided)
- Knowledge graph ... | llama_index/llama-index-packs/llama-index-packs-nebulagraph-query-engine/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-nebulagraph-query-engine/README.md",
"repo_id": "llama_index",
"token_count": 1255
} | 1,595 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-llava-completion/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-llava-completion/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,853 |
package meta
import (
"fmt"
"sort"
"strconv"
"strings"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus/cmd/tools/migration/allocator"
"github.com/milvus-io/milvus/cmd/tools/migration/legacy/legacypb"
"github.com/milvus-io/milvus/cmd/tools/migration/versi... | milvus/cmd/tools/migration/meta/210_to_220.go/0 | {
"file_path": "milvus/cmd/tools/migration/meta/210_to_220.go",
"repo_id": "milvus",
"token_count": 4646
} | 1,843 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/meta/segment_dist_manager.go/0 | {
"file_path": "milvus/internal/querycoordv2/meta/segment_dist_manager.go",
"repo_id": "milvus",
"token_count": 1932
} | 1,832 |
import { test, expect } from "@jest/globals";
import { FakeLLM, FakeChatModel } from "@langchain/core/utils/testing";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import {
createOpenAIFunctionsAgent,
createOpenAIToolsAgent,
createReactAgent,
createStructuredChatAgent,
createXmlAgent,
} from "... | langchainjs/langchain/src/agents/tests/create_agent_functions.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/create_agent_functions.test.ts",
"repo_id": "langchainjs",
"token_count": 847
} | 853 |
"""Integration test for Golden API Wrapper."""
import json
from langchain_community.utilities.golden_query import GoldenQueryAPIWrapper
def test_call() -> None:
"""Test that call gives the correct answer."""
search = GoldenQueryAPIWrapper()
output = json.loads(search.run("companies in nanotech"))
ass... | langchain/libs/community/tests/integration_tests/utilities/test_golden_query_api.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_golden_query_api.py",
"repo_id": "langchain",
"token_count": 109
} | 374 |
#include <boost/dynamic_bitset.hpp>
namespace boost_ext {
const char* get_data(const boost::dynamic_bitset<>& bitset);
char* get_data(boost::dynamic_bitset<>& bitset);
} // namespace boost_ext
| milvus/internal/core/thirdparty/boost_ext/dynamic_bitset_ext.hpp/0 | {
"file_path": "milvus/internal/core/thirdparty/boost_ext/dynamic_bitset_ext.hpp",
"repo_id": "milvus",
"token_count": 75
} | 1,678 |
<jupyter_start><jupyter_text>CachingLangChain provides an optional caching layer for chat models. This is useful for two reasons:It can save you money by reducing the number of API calls you make to the LLM provider, if you're often requesting the same completion multiple times.It can speed up your application by reduc... | langchain/docs/docs/modules/model_io/chat/chat_model_caching.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/model_io/chat/chat_model_caching.ipynb",
"repo_id": "langchain",
"token_count": 449
} | 191 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["PdbAbstractReader"]
contains_example = false
import_path = "llama_index.readers.pdb"
[to... | llama_index/llama-index-integrations/readers/llama-index-readers-pdb/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pdb/pyproject.toml",
"repo_id": "llama_index",
"token_count": 681
} | 1,427 |
package tasks
import (
"github.com/milvus-io/milvus/pkg/util/paramtable"
)
var _ schedulePolicy = &fifoPolicy{}
// newFIFOPolicy create a new fifo schedule policy.
func newFIFOPolicy() schedulePolicy {
return &fifoPolicy{
queue: newMergeTaskQueue(""),
}
}
// fifoPolicy is a fifo policy with merge queue.
type f... | milvus/internal/querynodev2/tasks/fifo_policy.go/0 | {
"file_path": "milvus/internal/querynodev2/tasks/fifo_policy.go",
"repo_id": "milvus",
"token_count": 381
} | 1,997 |
from langchain_community.document_loaders.gcs_directory import GCSDirectoryLoader
__all__ = ["GCSDirectoryLoader"]
| langchain/libs/langchain/langchain/document_loaders/gcs_directory.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/gcs_directory.py",
"repo_id": "langchain",
"token_count": 33
} | 505 |
<!--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/zh/internal/generation_utils.md/0 | {
"file_path": "transformers/docs/source/zh/internal/generation_utils.md",
"repo_id": "transformers",
"token_count": 3697
} | 570 |
# 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/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py/0 | {
"file_path": "transformers/src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py",
"repo_id": "transformers",
"token_count": 11951
} | 669 |
services:
db:
image: ankane/pgvector
ports:
- 5432:5432
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=ChangeMe
- POSTGRES_USER=myuser
- POSTGRES_DB=api
| langchainjs/examples/src/indexes/vector_stores/typeorm_vectorstore/docker-compose.example.yml/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/typeorm_vectorstore/docker-compose.example.yml",
"repo_id": "langchainjs",
"token_count": 113
} | 820 |
import {
SupabaseFilterRPCCall,
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_store... | langchainjs/examples/src/indexes/vector_stores/supabase_with_query_builder_metadata_filter.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/supabase_with_query_builder_metadata_filter.ts",
"repo_id": "langchainjs",
"token_count": 979
} | 823 |
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, List, Optional
if TYPE_CHECKING:
from llama_index import ServiceContext
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import BaseCallbackHandler, CallbackManager
from llama_in... | llama_index/llama-index-core/llama_index/core/settings.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/settings.py",
"repo_id": "llama_index",
"token_count": 3757
} | 1,298 |
import { test, expect } from "@jest/globals";
import * as url from "node:url";
import * as path from "node:path";
import * as fs from "node:fs/promises";
import { WebPDFLoader } from "../web/pdf.js";
test("Test Web PDF loader from blob", async () => {
const filePath = path.resolve(
path.dirname(url.fileURLToPath... | langchainjs/langchain/src/document_loaders/tests/webpdf.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/webpdf.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1462
} | 910 |
from llama_index.legacy.indices.vector_store.retrievers.retriever import ( # noqa: I001
VectorIndexRetriever,
)
from llama_index.legacy.indices.vector_store.retrievers.auto_retriever import (
VectorIndexAutoRetriever,
)
__all__ = [
"VectorIndexRetriever",
"VectorIndexAutoRetriever",
]
| llama_index/llama-index-legacy/llama_index/legacy/indices/vector_store/retrievers/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/vector_store/retrievers/__init__.py",
"repo_id": "llama_index",
"token_count": 118
} | 1,572 |
""" Deep Layer Aggregation and DLA w/ Res2Net
DLA original adapted from Official Pytorch impl at: https://github.com/ucbdrive/dla
DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484
Res2Net additions from: https://github.com/gasvn/Res2Net/
Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architec... | pytorch-image-models/timm/models/dla.py/0 | {
"file_path": "pytorch-image-models/timm/models/dla.py",
"repo_id": "pytorch-image-models",
"token_count": 9144
} | 383 |
"""Simple Web scraper."""
from typing import List, Optional, Dict, Callable
import requests
from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.readers.base import BasePydanticReader
from llama_index.core.schema import Document
class SimpleWebPageReader(BasePydanticReader):
"""Simple ... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/simple_web/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/simple_web/base.py",
"repo_id": "llama_index",
"token_count": 939
} | 1,446 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/it/run_scripts.md/0 | {
"file_path": "transformers/docs/source/it/run_scripts.md",
"repo_id": "transformers",
"token_count": 6803
} | 475 |
<jupyter_start><jupyter_text>Human-in-the-loopThere are certain tools that we don't trust a model to execute on its own. One thing we can do in such situations is require human approval before the tool is invoked. SetupWe'll need to install the following packages:```bashnpm install langchain @langchain/core @langchain... | langchainjs/docs/core_docs/docs/use_cases/tool_use/human_in_the_loop.ipynb/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/tool_use/human_in_the_loop.ipynb",
"repo_id": "langchainjs",
"token_count": 897
} | 745 |
import json
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.... | llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/llama_index/llms/bedrock/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/llama_index/llms/bedrock/base.py",
"repo_id": "llama_index",
"token_count": 4823
} | 1,346 |
# 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 applicabl... | transformers/src/transformers/sagemaker/training_args_sm.py/0 | {
"file_path": "transformers/src/transformers/sagemaker/training_args_sm.py",
"repo_id": "transformers",
"token_count": 2130
} | 730 |
import { expect, test } from "@jest/globals";
import { loadEvaluator } from "../../loader.js";
test("Test PairwiseStringEvalChain", async () => {
const chain = await loadEvaluator("pairwise_string", {
criteria: "conciseness",
});
const res = await chain.evaluateStringPairs({
prediction: "Addition is a m... | langchainjs/langchain/src/evaluation/comparison/tests/pairwise_eval_chain.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/evaluation/comparison/tests/pairwise_eval_chain.int.test.ts",
"repo_id": "langchainjs",
"token_count": 616
} | 877 |
import * as url from "node:url";
import * as path from "node:path";
import * as fs from "node:fs/promises";
import { test, expect } from "@jest/globals";
import { Document } from "@langchain/core/documents";
import { JSONLinesLoader } from "../fs/json.js";
test("Test JSONL loader from blob", async () => {
const file... | langchainjs/langchain/src/document_loaders/tests/jsonl-blob.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/jsonl-blob.test.ts",
"repo_id": "langchainjs",
"token_count": 706
} | 907 |
from langchain_community.document_loaders.blackboard import BlackboardLoader
__all__ = ["BlackboardLoader"]
| langchain/libs/langchain/langchain/document_loaders/blackboard.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/blackboard.py",
"repo_id": "langchain",
"token_count": 29
} | 510 |
<!--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/training/distributed_inference.md/0 | {
"file_path": "diffusers/docs/source/en/training/distributed_inference.md",
"repo_id": "diffusers",
"token_count": 1499
} | 179 |
python_sources()
| llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/llama_index/readers/huggingface_fs/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-huggingface-fs/llama_index/readers/huggingface_fs/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,459 |
use crate::Result;
pub(super) fn nearest_int(v: f32) -> i32 {
v.round() as i32
}
/// Validates that the input and output are the right size and returns an iterator which maps each
/// input region `xs` to its corresponding output block in `ys`. Each output region is guaranteed
/// to be `T::BLCK_SIZE` long.
pub(s... | candle/candle-core/src/quantized/utils.rs/0 | {
"file_path": "candle/candle-core/src/quantized/utils.rs",
"repo_id": "candle",
"token_count": 5775
} | 38 |
<jupyter_start><jupyter_text>Weaviate Vector Store If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-vector-stores-weaviate
!pip install llama-index<jupyter_output><empty_output><jupyter_text>Creating a Weaviate Client<jupyter_code>import os... | llama_index/docs/examples/vector_stores/WeaviateIndexDemo.ipynb/0 | {
"file_path": "llama_index/docs/examples/vector_stores/WeaviateIndexDemo.ipynb",
"repo_id": "llama_index",
"token_count": 1411
} | 1,150 |
# coding=utf-8
# Copyright 2019 The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | transformers/examples/research_projects/bertabs/configuration_bertabs.py/0 | {
"file_path": "transformers/examples/research_projects/bertabs/configuration_bertabs.py",
"repo_id": "transformers",
"token_count": 1345
} | 535 |
import asyncio
from typing import Any, Optional
from langchain_experimental.comprehend_moderation.base_moderation_exceptions import (
ModerationPromptSafetyError,
)
class ComprehendPromptSafety:
def __init__(
self,
client: Any,
callback: Optional[Any] = None,
unique_id: Option... | langchain/libs/experimental/langchain_experimental/comprehend_moderation/prompt_safety.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/comprehend_moderation/prompt_safety.py",
"repo_id": "langchain",
"token_count": 1352
} | 416 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-self-rag/llama_index/packs/self_rag/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-self-rag/llama_index/packs/self_rag/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,869 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.zep import ZepReader
def test_class():
names_of_base_classes = [b.__name__ for b in ZepReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-zep/tests/test_readers_zep.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-zep/tests/test_readers_zep.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,443 |
reviewers:
- LoveEachDay
- zwd1208
approvers:
- maintainers
| milvus/deployments/OWNERS/0 | {
"file_path": "milvus/deployments/OWNERS",
"repo_id": "milvus",
"token_count": 27
} | 1,707 |
"""Test MistralAI Embedding"""
from langchain_mistralai import MistralAIEmbeddings
def test_mistralai_embedding_documents() -> None:
"""Test MistralAI embeddings for documents."""
documents = ["foo bar", "test document"]
embedding = MistralAIEmbeddings()
output = embedding.embed_documents(documents)
... | langchain/libs/partners/mistralai/tests/integration_tests/test_embeddings.py/0 | {
"file_path": "langchain/libs/partners/mistralai/tests/integration_tests/test_embeddings.py",
"repo_id": "langchain",
"token_count": 616
} | 648 |
from langchain_core.chat_sessions import ChatSession
__all__ = ["ChatSession"]
| langchain/libs/langchain/langchain/schema/chat.py/0 | {
"file_path": "langchain/libs/langchain/langchain/schema/chat.py",
"repo_id": "langchain",
"token_count": 24
} | 547 |
use crate::benchmarks::{BenchDevice, BenchDeviceHandler};
use candle_core::{DType, Device, Tensor};
use criterion::{black_box, criterion_group, Criterion, Throughput};
use std::time::Instant;
fn run(a: &Tensor, b: &Tensor, c: &Tensor) {
a.where_cond(b, c).unwrap();
}
const fn create_cond_arr<const N: usize>() -> ... | candle/candle-core/benches/benchmarks/where_cond.rs/0 | {
"file_path": "candle/candle-core/benches/benchmarks/where_cond.rs",
"repo_id": "candle",
"token_count": 942
} | 28 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package datacoord
import (
datapb "github.com/milvus-io/milvus/internal/proto/datapb"
mock "github.com/stretchr/testify/mock"
)
// MockCompactionMeta is an autogenerated mock type for the CompactionMeta type
type MockCompactionMeta struct {
mock.Mock
}
type Mock... | milvus/internal/datacoord/mock_compaction_meta.go/0 | {
"file_path": "milvus/internal/datacoord/mock_compaction_meta.go",
"repo_id": "milvus",
"token_count": 3498
} | 1,964 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/time_series_transformer/test_modeling_time_series_transformer.py/0 | {
"file_path": "transformers/tests/models/time_series_transformer/test_modeling_time_series_transformer.py",
"repo_id": "transformers",
"token_count": 10424
} | 789 |
# DPO Trainer
TRL supports the DPO Trainer for training language models from preference data, as described in the paper [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://arxiv.org/abs/2305.18290) by Rafailov et al., 2023. For a full example have a look at [`examples/scripts/dpo.... | trl/docs/source/dpo_trainer.mdx/0 | {
"file_path": "trl/docs/source/dpo_trainer.mdx",
"repo_id": "trl",
"token_count": 3615
} | 777 |
<jupyter_start><jupyter_text>Knowledge Distillation For Fine-Tuning A GPT-3.5 Judge (Pairwise)There has been recent research that demonstrated GPT-4's ability to closely align to human judges when evaluating LLM generated texts (e.g., see [[1]](https://arxiv.org/abs/2306.05685), [[2]](https://arxiv.org/abs/2303.16634))... | llama_index/docs/examples/finetuning/llm_judge/pairwise/finetune_llm_judge.ipynb/0 | {
"file_path": "llama_index/docs/examples/finetuning/llm_judge/pairwise/finetune_llm_judge.ipynb",
"repo_id": "llama_index",
"token_count": 8724
} | 1,106 |
# 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/src/peft/tuners/lora/tp_layer.py/0 | {
"file_path": "peft/src/peft/tuners/lora/tp_layer.py",
"repo_id": "peft",
"token_count": 4109
} | 306 |
# 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... | accelerate/manim_animations/big_model_inference/stage_2.py/0 | {
"file_path": "accelerate/manim_animations/big_model_inference/stage_2.py",
"repo_id": "accelerate",
"token_count": 2354
} | 9 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/swin.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/swin.md",
"repo_id": "transformers",
"token_count": 1394
} | 502 |
@import "./highlight-js.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.btn {
@apply inline-flex flex-shrink-0 cursor-pointer select-none items-center justify-center whitespace-nowrap outline-none transition-all focus:ring disabled:cursor-default;
}
}
@layer utilities {
.sc... | chat-ui/src/styles/main.css/0 | {
"file_path": "chat-ui/src/styles/main.css",
"repo_id": "chat-ui",
"token_count": 189
} | 121 |
"""Test Momento chat message history functionality.
To run tests, set the environment variable MOMENTO_AUTH_TOKEN to a valid
Momento auth token. This can be obtained by signing up for a free
Momento account at https://gomomento.com/.
"""
import json
import uuid
from datetime import timedelta
from typing import Iterato... | langchain/libs/langchain/tests/integration_tests/memory/test_momento.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/memory/test_momento.py",
"repo_id": "langchain",
"token_count": 784
} | 625 |
package allocator
import "sort"
func makeClone(s []int64) []int64 {
clone := make([]int64, len(s))
copy(clone, s)
return clone
}
func NewAllocatorFromList(s []int64, useClone, deAsc bool) *AtomicAllocator {
initialized, delta := int64(defaultInitializedValue), int64(defaultDelta)
clone := s
if useClone {
clo... | milvus/cmd/tools/migration/allocator/allocator_from_list.go/0 | {
"file_path": "milvus/cmd/tools/migration/allocator/allocator_from_list.go",
"repo_id": "milvus",
"token_count": 246
} | 1,701 |
const { TestEnvironment } = require("jest-environment-node");
class AdjustedTestEnvironmentToSupportFloat32Array extends TestEnvironment {
constructor(config, context) {
// Make `instanceof Float32Array` return true in tests
// to avoid https://github.com/xenova/transformers.js/issues/57 and https://github.c... | langchainjs/langchain-core/jest.env.cjs/0 | {
"file_path": "langchainjs/langchain-core/jest.env.cjs",
"repo_id": "langchainjs",
"token_count": 147
} | 922 |
<jupyter_start><jupyter_text>Deplot Reader DemoIn this notebook we showcase the capabilities of our ImageTabularChartReader, which is powered by the DePlot model https://arxiv.org/abs/2212.10505.<jupyter_code>%pip install llama-index-readers-file
from llama_index.readers.file import ImageTabularChartReader
from llama_i... | llama_index/docs/examples/data_connectors/deplot/DeplotReader.ipynb/0 | {
"file_path": "llama_index/docs/examples/data_connectors/deplot/DeplotReader.ipynb",
"repo_id": "llama_index",
"token_count": 493
} | 1,112 |
---
sidebar_class_name: hidden
---
# LLM
An LLMChain is a simple chain that adds some functionality around language models. It is used widely throughout LangChain, including in other chains and agents.
An LLMChain consists of a PromptTemplate and a language model (either an LLM or chat model). It formats the prompt ... | langchainjs/docs/core_docs/docs/modules/chains/foundational/llm_chain.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/chains/foundational/llm_chain.mdx",
"repo_id": "langchainjs",
"token_count": 540
} | 759 |
"""Test elasticsearch_embeddings embeddings."""
import pytest
from langchain_community.embeddings.elasticsearch import ElasticsearchEmbeddings
@pytest.fixture
def model_id() -> str:
# Replace with your actual model_id
return "your_model_id"
def test_elasticsearch_embedding_documents(model_id: str) -> None... | langchain/libs/community/tests/integration_tests/embeddings/test_elasticsearch.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/embeddings/test_elasticsearch.py",
"repo_id": "langchain",
"token_count": 360
} | 328 |
from __future__ import annotations
import asyncio
import logging
import re
from typing import (
TYPE_CHECKING,
Callable,
Iterator,
List,
Optional,
Sequence,
Set,
Union,
)
import requests
from langchain_core.documents import Document
from langchain_core.utils.html import extract_sub_lin... | langchain/libs/community/langchain_community/document_loaders/recursive_url_loader.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/recursive_url_loader.py",
"repo_id": "langchain",
"token_count": 5470
} | 248 |
import {
AzureCosmosDBVectorStore,
AzureCosmosDBSimilarityType,
} from "@langchain/community/vectorstores/azure_cosmosdb";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { createStuffDocumentsChain } from "langchain/chains/combi... | langchainjs/examples/src/indexes/vector_stores/azure_cosmosdb/azure_cosmosdb.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/azure_cosmosdb/azure_cosmosdb.ts",
"repo_id": "langchainjs",
"token_count": 866
} | 825 |
# cohere-librarian
This template turns Cohere into a librarian.
It demonstrates the use of a router to switch between chains that can handle different things: a vector database with Cohere embeddings; a chat bot that has a prompt with some information about the library; and finally a RAG chatbot that has access to t... | langchain/templates/cohere-librarian/README.md/0 | {
"file_path": "langchain/templates/cohere-librarian/README.md",
"repo_id": "langchain",
"token_count": 682
} | 650 |
from langchain.tools.retriever import create_retriever_tool
__all__ = ["create_retriever_tool"]
| langchain/libs/langchain/langchain/agents/agent_toolkits/conversational_retrieval/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/conversational_retrieval/tool.py",
"repo_id": "langchain",
"token_count": 33
} | 437 |
// 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/querynodev2/services.go/0 | {
"file_path": "milvus/internal/querynodev2/services.go",
"repo_id": "milvus",
"token_count": 19530
} | 1,857 |
"""Shell tool."""
from langchain_community.tools.shell.tool import ShellTool
__all__ = ["ShellTool"]
| langchain/libs/community/langchain_community/tools/shell/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/shell/__init__.py",
"repo_id": "langchain",
"token_count": 32
} | 314 |
# coding=utf-8
# Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | transformers/src/transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py/0 | {
"file_path": "transformers/src/transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py",
"repo_id": "transformers",
"token_count": 5985
} | 694 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wikipedia/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,464 |
"""Init params."""
| llama_index/llama-index-legacy/llama_index/legacy/agent/runner/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/runner/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,487 |
# Conclusion
That's all for today. Congrats on finishing this Unit and the tutorial! ⭐️
Now that you've successfully trained your Doom agent, why not try deathmatch? Remember, that's a much more complex level than the one you've just trained, **but it's a nice experiment and I advise you to try it.**
If you do it, d... | deep-rl-class/units/en/unit8/conclusion-sf.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit8/conclusion-sf.mdx",
"repo_id": "deep-rl-class",
"token_count": 188
} | 171 |
from llama_index.readers.file.image_vision_llm.base import ImageVisionLLMReader
__all__ = ["ImageVisionLLMReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_vision_llm/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/image_vision_llm/__init__.py",
"repo_id": "llama_index",
"token_count": 39
} | 1,349 |
# LlamaIndex Vector_Stores Integration: Typesense
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-typesense/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-typesense/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,480 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/segcore/SegmentGrowingImpl.cpp/0 | {
"file_path": "milvus/internal/core/src/segcore/SegmentGrowingImpl.cpp",
"repo_id": "milvus",
"token_count": 16767
} | 1,737 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.