text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# 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/chinese_clip/test_modeling_chinese_clip.py/0 | {
"file_path": "transformers/tests/models/chinese_clip/test_modeling_chinese_clip.py",
"repo_id": "transformers",
"token_count": 12666
} | 706 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/yolos/image_processing_yolos.py/0 | {
"file_path": "transformers/src/transformers/models/yolos/image_processing_yolos.py",
"repo_id": "transformers",
"token_count": 26603
} | 774 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "vectorstores/zep",
});
export * from "@langchain/community/vectorstores/zep";
| langchainjs/langchain/src/vectorstores/zep.ts/0 | {
"file_path": "langchainjs/langchain/src/vectorstores/zep.ts",
"repo_id": "langchainjs",
"token_count": 72
} | 1,007 |
"""OpenAI chat wrapper."""
from __future__ import annotations
import logging
import os
import sys
from typing import (
TYPE_CHECKING,
Any,
AsyncIterator,
Callable,
Dict,
Iterator,
List,
Mapping,
Optional,
Sequence,
Tuple,
Type,
Union,
)
from langchain_core._api.depr... | langchain/libs/community/langchain_community/chat_models/openai.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_models/openai.py",
"repo_id": "langchain",
"token_count": 11713
} | 246 |
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "ES2018"
}
// Path aliases are handled... | chat-ui/tsconfig.json/0 | {
"file_path": "chat-ui/tsconfig.json",
"repo_id": "chat-ui",
"token_count": 197
} | 123 |
"""Configuration for sphinx."""
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ... | llama_index/docs/conf.py/0 | {
"file_path": "llama_index/docs/conf.py",
"repo_id": "llama_index",
"token_count": 2140
} | 1,168 |
---
sidebar_class_name: hidden
---
# LangSmith
[LangSmith](https://smith.langchain.com) helps you trace and evaluate your language model applications and intelligent agents to help you
move from prototype to production.
Check out the [interactive walkthrough](/docs/langsmith/walkthrough) to get started.
For more in... | langchain/docs/docs/langsmith/index.md/0 | {
"file_path": "langchain/docs/docs/langsmith/index.md",
"repo_id": "langchain",
"token_count": 462
} | 201 |
# 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/src/accelerate/utils/dataclasses.py/0 | {
"file_path": "accelerate/src/accelerate/utils/dataclasses.py",
"repo_id": "accelerate",
"token_count": 31242
} | 19 |
from llama_index.readers.obsidian.base import ObsidianReader
__all__ = ["ObsidianReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-obsidian/llama_index/readers/obsidian/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-obsidian/llama_index/readers/obsidian/__init__.py",
"repo_id": "llama_index",
"token_count": 29
} | 1,357 |
import re
import xml.etree.ElementTree as ET
from typing import Any, AsyncIterator, Dict, Iterator, List, Optional, Union
from langchain_core.messages import BaseMessage
from langchain_core.output_parsers.transform import BaseTransformOutputParser
from langchain_core.runnables.utils import AddableDict
XML_FORMAT_INST... | langchain/libs/core/langchain_core/output_parsers/xml.py/0 | {
"file_path": "langchain/libs/core/langchain_core/output_parsers/xml.py",
"repo_id": "langchain",
"token_count": 2898
} | 393 |
# Dual Path Network (DPN)
A **Dual Path Network (DPN)** is a convolutional neural network which presents a new topology of connection paths internally. The intuition is that [ResNets](https://paperswithcode.com/method/resnet) enables feature re-usage while DenseNet enables new feature exploration, and both are importa... | pytorch-image-models/hfdocs/source/models/dpn.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/dpn.mdx",
"repo_id": "pytorch-image-models",
"token_count": 3692
} | 360 |
from langchain_core._api import __all__
EXPECTED_ALL = [
"beta",
"deprecated",
"LangChainBetaWarning",
"LangChainDeprecationWarning",
"suppress_langchain_beta_warning",
"surface_langchain_beta_warnings",
"suppress_langchain_deprecation_warning",
"surface_langchain_deprecation_warnings",... | langchain/libs/core/tests/unit_tests/_api/test_imports.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/_api/test_imports.py",
"repo_id": "langchain",
"token_count": 191
} | 403 |
// 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/IndexConfigGenerator.cpp/0 | {
"file_path": "milvus/internal/core/src/segcore/IndexConfigGenerator.cpp",
"repo_id": "milvus",
"token_count": 1082
} | 1,655 |
from .parallel import parallel_backend, parallel_map, ParallelBackendConfig # noqa F401
| datasets/src/datasets/parallel/__init__.py/0 | {
"file_path": "datasets/src/datasets/parallel/__init__.py",
"repo_id": "datasets",
"token_count": 25
} | 137 |
import {
applyPatch,
type Operation as JSONPatchOperation,
} from "../utils/fast-json-patch/index.js";
import { BaseTracer, type Run } from "./base.js";
import {
BaseCallbackHandlerInput,
HandleLLMNewTokenCallbackFields,
} from "../callbacks/base.js";
import { IterableReadableStream } from "../utils/stream.js";... | langchainjs/langchain-core/src/tracers/log_stream.ts/0 | {
"file_path": "langchainjs/langchain-core/src/tracers/log_stream.ts",
"repo_id": "langchainjs",
"token_count": 6331
} | 934 |
import pytest
from langchain_core.documents import Document
from langchain.embeddings import FakeEmbeddings
from langchain.retrievers import KNNRetriever, TFIDFRetriever
from langchain.retrievers.bm25 import BM25Retriever
from langchain.retrievers.ensemble import EnsembleRetriever
@pytest.mark.requires("rank_bm25")
... | langchain/libs/langchain/tests/unit_tests/retrievers/test_ensemble.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/test_ensemble.py",
"repo_id": "langchain",
"token_count": 1093
} | 668 |
# Research projects that use TRL
Welcome to the research projects folder! Here you can find the scripts used for some research projects that used TRL and maintained by the developers and the community (LM de-toxification, Stack-Llama, etc.). Check out the READMEs in the subfolders for more information!
- [De-detoxify... | trl/examples/research_projects/README.md/0 | {
"file_path": "trl/examples/research_projects/README.md",
"repo_id": "trl",
"token_count": 189
} | 809 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/asr.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/asr.md",
"repo_id": "transformers",
"token_count": 9668
} | 507 |
"""Program utils."""
from typing import Any, List, Type
from llama_index.legacy.bridge.pydantic import BaseModel, Field, create_model
from llama_index.legacy.llms.llm import LLM
from llama_index.legacy.output_parsers.pydantic import PydanticOutputParser
from llama_index.legacy.prompts.base import PromptTemplate
from ... | llama_index/llama-index-legacy/llama_index/legacy/program/utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/program/utils.py",
"repo_id": "llama_index",
"token_count": 1518
} | 1,629 |
# AZLyrics
>[AZLyrics](https://www.azlyrics.com/) is a large, legal, every day growing collection of lyrics.
## Installation and Setup
There isn't any special setup for it.
## Document Loader
See a [usage example](/docs/integrations/document_loaders/azlyrics).
```python
from langchain_community.document_loaders ... | langchain/docs/docs/integrations/providers/azlyrics.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/azlyrics.mdx",
"repo_id": "langchain",
"token_count": 105
} | 140 |
# Tutorials
Below are links to tutorials and courses on LangChain. For written guides on common use cases for LangChain, check out the [use cases guides](/docs/use_cases).
⛓ icon marks a new addition [last update 2024-02-06]
---------------------
### [LangChain](https://en.wikipedia.org/wiki/LangChain) on Wikipedia... | langchain/docs/docs/additional_resources/tutorials.mdx/0 | {
"file_path": "langchain/docs/docs/additional_resources/tutorials.mdx",
"repo_id": "langchain",
"token_count": 4666
} | 85 |
---
sidebar_class_name: node-only
---
# File System Store
:::tip Compatibility
Only available on Node.js.
:::
This example demonstrates how to setup chat history storage using the `LocalFileStore` KV store integration.
## Usage
:::info
The path passed to the `.fromPath` must be a directory, not a file.
:::
The `L... | langchainjs/docs/core_docs/docs/integrations/stores/file_system.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/stores/file_system.mdx",
"repo_id": "langchainjs",
"token_count": 206
} | 736 |
# flake8: noqa: E501
"""Test SQL database wrapper."""
import pytest
import sqlalchemy as sa
from sqlalchemy import (
Column,
Integer,
MetaData,
Result,
String,
Table,
Text,
insert,
select,
)
from langchain_community.utilities.sql_database import SQLDatabase, truncate_word
metadata_... | langchain/libs/community/tests/unit_tests/test_sql_database.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/test_sql_database.py",
"repo_id": "langchain",
"token_count": 2605
} | 390 |
<jupyter_start><jupyter_text>Pinecone Hybrid Search>[Pinecone](https://docs.pinecone.io/docs/overview) is a vector database with broad functionality.This notebook goes over how to use a retriever that under the hood uses Pinecone and Hybrid Search.The logic of this retriever is taken from [this documentation](https://d... | langchain/docs/docs/integrations/retrievers/pinecone_hybrid_search.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/pinecone_hybrid_search.ipynb",
"repo_id": "langchain",
"token_count": 1304
} | 156 |
import re
from typing import Union
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain.agents.agent import AgentOutputParser
from langchain.agents.mrkl.prompt import FORMAT_INSTRUCTIONS
FINAL_ANSWER_ACTION = "Final Answer:"
MISSING_ACT... | langchain/libs/langchain/langchain/agents/output_parsers/react_single_input.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/output_parsers/react_single_input.py",
"repo_id": "langchain",
"token_count": 1423
} | 447 |
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: test-indexcoord-pod-failure
namespace: chaos-testing
spec:
selector:
namespaces:
- chaos-testing
labelSelectors:
app.kubernetes.io/instance: milvus-chaos
component: indexcoord
mode: fixed
value: "1"
action: pod-fail... | milvus/tests/python_client/chaos/chaos_objects/pod_failure/chaos_indexcoord_pod_failure.yaml/0 | {
"file_path": "milvus/tests/python_client/chaos/chaos_objects/pod_failure/chaos_indexcoord_pod_failure.yaml",
"repo_id": "milvus",
"token_count": 142
} | 2,109 |
"""Evaluator."""
import asyncio
from abc import abstractmethod
from typing import Any, Optional, Sequence
from llama_index.core.base.response.schema import Response
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType
class EvaluationRe... | llama_index/llama-index-core/llama_index/core/evaluation/base.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/evaluation/base.py",
"repo_id": "llama_index",
"token_count": 1527
} | 1,115 |
package planparserv2
import (
"sync"
"github.com/antlr/antlr4/runtime/Go/antlr"
antlrparser "github.com/milvus-io/milvus/internal/parser/planparserv2/generated"
)
var (
lexerPool = sync.Pool{
New: func() interface{} {
return antlrparser.NewPlanLexer(nil)
},
}
parserPool = sync.Pool{
New: func() inter... | milvus/internal/parser/planparserv2/pool.go/0 | {
"file_path": "milvus/internal/parser/planparserv2/pool.go",
"repo_id": "milvus",
"token_count": 519
} | 1,819 |
import { Serializable } from "@langchain/core/load/serializable";
/**
* Base class for all entity stores. All entity stores should extend this
* class.
*/
export abstract class BaseEntityStore extends Serializable {
abstract get(key: string, defaultValue?: string): Promise<string | undefined>;
abstract set(key... | langchainjs/langchain/src/memory/stores/entity/base.ts/0 | {
"file_path": "langchainjs/langchain/src/memory/stores/entity/base.ts",
"repo_id": "langchainjs",
"token_count": 133
} | 893 |
# 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/src/accelerate/tracking.py/0 | {
"file_path": "accelerate/src/accelerate/tracking.py",
"repo_id": "accelerate",
"token_count": 17052
} | 14 |
use candle_metal_kernels::{binary, call_binary_contiguous, call_binary_strided, Kernels};
use half::{bf16, f16};
use metal::objc::rc::autoreleasepool;
use metal::{Device, MTLResourceOptions};
use rand;
use std::any::type_name;
use std::time::Instant;
fn main() {
let device = Device::system_default().unwrap();
... | candle/candle-metal-kernels/tmp/binary.rs/0 | {
"file_path": "candle/candle-metal-kernels/tmp/binary.rs",
"repo_id": "candle",
"token_count": 3149
} | 55 |
from langgraph.prebuilt import chat_agent_executor
from langgraph.prebuilt.agent_executor import create_agent_executor
from langgraph.prebuilt.tool_executor import ToolExecutor, ToolInvocation
__all__ = [
"create_agent_executor",
"chat_agent_executor",
"ToolExecutor",
"ToolInvocation",
]
| langgraph/langgraph/prebuilt/__init__.py/0 | {
"file_path": "langgraph/langgraph/prebuilt/__init__.py",
"repo_id": "langgraph",
"token_count": 104
} | 1,054 |
// Copyright (C) 2019-2023 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/src/storage/prometheus_client.cpp/0 | {
"file_path": "milvus/internal/core/src/storage/prometheus_client.cpp",
"repo_id": "milvus",
"token_count": 3640
} | 1,760 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-shopify/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,369 |
from langchain_community.tools.office365.create_draft_message import (
CreateDraftMessageSchema,
O365CreateDraftMessage,
)
__all__ = ["CreateDraftMessageSchema", "O365CreateDraftMessage"]
| langchain/libs/langchain/langchain/tools/office365/create_draft_message.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/office365/create_draft_message.py",
"repo_id": "langchain",
"token_count": 61
} | 582 |
#!/usr/bin/env bash
export PYTHONPATH="../":"${PYTHONPATH}"
export BS=32
export GAS=1
python finetune.py \
--learning_rate=3e-5 \
--fp16 \
--gpus 1 \
--do_train \
--do_predict \
--val_check_interval 0.25 \
--n_val 500 \
--num_train_epochs 2 \
--freeze_encoder --freeze_embeds --data... | transformers/examples/research_projects/seq2seq-distillation/train_distilbart_cnn.sh/0 | {
"file_path": "transformers/examples/research_projects/seq2seq-distillation/train_distilbart_cnn.sh",
"repo_id": "transformers",
"token_count": 292
} | 576 |
from langchain_community.document_loaders.parsers.pdf import (
AmazonTextractPDFParser,
DocumentIntelligenceParser,
PDFMinerParser,
PDFPlumberParser,
PyMuPDFParser,
PyPDFium2Parser,
PyPDFParser,
extract_from_images_with_rapidocr,
)
__all__ = [
"extract_from_images_with_rapidocr",
... | langchain/libs/langchain/langchain/document_loaders/parsers/pdf.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/parsers/pdf.py",
"repo_id": "langchain",
"token_count": 205
} | 487 |
{
"name": "tokenizers-android-arm64",
"version": "0.13.4-rc1",
"os": [
"android"
],
"cpu": [
"arm64"
],
"main": "tokenizers.android-arm64.node",
"files": [
"tokenizers.android-arm64.node"
],
"description": "Tokenizers platform specific bindings",
"keywords": [
"napi-rs",
"NAPI"... | tokenizers/bindings/node/npm/android-arm64/package.json/0 | {
"file_path": "tokenizers/bindings/node/npm/android-arm64/package.json",
"repo_id": "tokenizers",
"token_count": 264
} | 395 |
// Inlined from https://github.com/flexdinesh/browser-or-node
declare global {
const Deno:
| {
version: {
deno: string;
};
}
| undefined;
}
export const isBrowser = () =>
typeof window !== "undefined" && typeof window.document !== "undefined";
export const isWebWorker = () ... | langchainjs/langchain-core/src/utils/env.ts/0 | {
"file_path": "langchainjs/langchain-core/src/utils/env.ts",
"repo_id": "langchainjs",
"token_count": 778
} | 844 |
<!--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/ja/main_classes/pipelines.md/0 | {
"file_path": "transformers/docs/source/ja/main_classes/pipelines.md",
"repo_id": "transformers",
"token_count": 6686
} | 515 |
import json
import os
from datetime import date
from pathlib import Path
from tabulate import DataRow, TableFormat, tabulate
hf_table_format = TableFormat(
lineabove=None,
linebelowheader=None,
linebetweenrows=None,
linebelow=None,
headerrow=DataRow("", "|", "|"),
datarow=DataRow("", "|", "|"... | accelerate/utils/log_reports.py/0 | {
"file_path": "accelerate/utils/log_reports.py",
"repo_id": "accelerate",
"token_count": 2890
} | 17 |
python_tests()
| llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-multidoc-autoretrieval/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,577 |
// 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/datanode/timetick_sender_test.go/0 | {
"file_path": "milvus/internal/datanode/timetick_sender_test.go",
"repo_id": "milvus",
"token_count": 1915
} | 1,810 |
# ChatGPT files
This example goes over how to load conversations.json from your ChatGPT data export folder. You can get your data export by email by going to: ChatGPT -> (Profile) - Settings -> Export data -> Confirm export -> Check email.
## Usage, extracting all logs
Example code:
```typescript
import { ChatGPTLo... | langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/chatgpt.mdx",
"repo_id": "langchainjs",
"token_count": 247
} | 725 |
from langchain.chains.query_constructor.ir import (
Comparator,
Comparison,
Operation,
Operator,
StructuredQuery,
)
from langchain.retrievers.self_query.opensearch import OpenSearchTranslator
DEFAULT_TRANSLATOR = OpenSearchTranslator()
def test_visit_comparison() -> None:
comp = Comparison(co... | langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_opensearch.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/retrievers/self_query/test_opensearch.py",
"repo_id": "langchain",
"token_count": 3510
} | 607 |
[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 = ["MyScaleReader", "escape_str", "format_list_to_string"]
contains_example = false
import_pa... | llama_index/llama-index-integrations/readers/llama-index-readers-myscale/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-myscale/pyproject.toml",
"repo_id": "llama_index",
"token_count": 662
} | 1,345 |
"""Sentence splitter."""
from dataclasses import dataclass
from typing import Callable, List, Optional, Tuple
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
from l... | llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/sentence.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/node_parser/text/sentence.py",
"repo_id": "llama_index",
"token_count": 5634
} | 1,581 |
<jupyter_start><jupyter_text>Neutrino AINeutrino lets you intelligently route queries to the best-suited LLM for the prompt, maximizing performance while optimizing for costs and latency.Check us out at: neutrinoapp.comDocs: docs.neutrinoapp.comCreate an API key: platform.neutrinoapp.com<jupyter_code>%pip install llama... | llama_index/docs/examples/llm/neutrino.ipynb/0 | {
"file_path": "llama_index/docs/examples/llm/neutrino.ipynb",
"repo_id": "llama_index",
"token_count": 867
} | 1,110 |
# coding=utf-8
# Copyright 2022 EleutherAI 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... | transformers/src/transformers/models/gpt_neox/configuration_gpt_neox.py/0 | {
"file_path": "transformers/src/transformers/models/gpt_neox/configuration_gpt_neox.py",
"repo_id": "transformers",
"token_count": 3539
} | 679 |
[package]
name = "candle-core"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
byteorder =... | candle/candle-core/Cargo.toml/0 | {
"file_path": "candle/candle-core/Cargo.toml",
"repo_id": "candle",
"token_count": 468
} | 27 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py",
"repo_id": "diffusers",
"token_count": 13113
} | 256 |
import type { EndpointParameters } from "./server/endpoints/endpoints";
import type { BackendModel } from "./server/models";
type buildPromptOptions = Pick<EndpointParameters, "messages" | "preprompt" | "continueMessage"> & {
model: BackendModel;
};
export async function buildPrompt({
messages,
model,
preprompt,
... | chat-ui/src/lib/buildPrompt.ts/0 | {
"file_path": "chat-ui/src/lib/buildPrompt.ts",
"repo_id": "chat-ui",
"token_count": 327
} | 90 |
from chat_bot_feedback.chain import chain
__all__ = ["chain"]
| langchain/templates/chat-bot-feedback/chat_bot_feedback/__init__.py/0 | {
"file_path": "langchain/templates/chat-bot-feedback/chat_bot_feedback/__init__.py",
"repo_id": "langchain",
"token_count": 21
} | 631 |
"""Integration test for Wolfram Alpha API Wrapper."""
from langchain_community.utilities.wolfram_alpha import WolframAlphaAPIWrapper
def test_call() -> None:
"""Test that call gives the correct answer."""
search = WolframAlphaAPIWrapper()
output = search.run("what is 2x+18=x+5?")
assert "x = -13" in o... | langchain/libs/community/tests/integration_tests/utilities/test_wolfram_alpha_api.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/utilities/test_wolfram_alpha_api.py",
"repo_id": "langchain",
"token_count": 107
} | 347 |
import asyncio
import json
import uuid
from typing import Any, Sequence
from langchain_core.documents import BaseDocumentTransformer, Document
from langchain_community.tools.nuclia.tool import NucliaUnderstandingAPI
class NucliaTextTransformer(BaseDocumentTransformer):
"""
The Nuclia Understanding API split... | langchain/libs/community/langchain_community/document_transformers/nuclia_text_transform.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_transformers/nuclia_text_transform.py",
"repo_id": "langchain",
"token_count": 652
} | 253 |
---
sidebar_class_name: node-only
---
import CodeBlock from "@theme/CodeBlock";
# HNSWLib
:::tip Compatibility
Only available on Node.js.
:::
HNSWLib is an in-memory vectorstore that can be saved to a file. It uses [HNSWLib](https://github.com/nmslib/hnswlib).
## Setup
:::caution
**On Windows**, you might need t... | langchainjs/docs/core_docs/docs/integrations/vectorstores/hnswlib.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/hnswlib.mdx",
"repo_id": "langchainjs",
"token_count": 519
} | 718 |
# 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/vit_mae/convert_vit_mae_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/vit_mae/convert_vit_mae_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3304
} | 671 |
from llama_index.readers.preprocess.base import PreprocessReader
__all__ = ["PreprocessReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-preprocess/llama_index/readers/preprocess/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-preprocess/llama_index/readers/preprocess/__init__.py",
"repo_id": "llama_index",
"token_count": 29
} | 1,418 |
import json
from llama_index.legacy.readers.jaguar import JaguarReader
from llama_index.legacy.schema import TextNode
from llama_index.legacy.vector_stores.jaguar import JaguarVectorStore
#############################################################################################
##
## This test uses JaguarVectorSt... | llama_index/llama-index-legacy/tests/readers/test_jaguar.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/readers/test_jaguar.py",
"repo_id": "llama_index",
"token_count": 2538
} | 1,756 |
<!--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/wav2vec2-conformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/wav2vec2-conformer.md",
"repo_id": "transformers",
"token_count": 990
} | 522 |
import { base } from "$app/paths";
import { PUBLIC_ORIGIN, PUBLIC_SHARE_PREFIX } from "$env/static/public";
export function getShareUrl(url: URL, shareId: string): string {
return `${PUBLIC_SHARE_PREFIX || `${PUBLIC_ORIGIN || url.origin}${base}`}/r/${shareId}`;
}
| chat-ui/src/lib/utils/getShareUrl.ts/0 | {
"file_path": "chat-ui/src/lib/utils/getShareUrl.ts",
"repo_id": "chat-ui",
"token_count": 99
} | 105 |
cd /d %~dp0
bin\milvus.exe run standalone | milvus/deployments/windows/run_milvus.bat/0 | {
"file_path": "milvus/deployments/windows/run_milvus.bat",
"repo_id": "milvus",
"token_count": 17
} | 1,765 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/auto/feature_extraction_auto.py/0 | {
"file_path": "transformers/src/transformers/models/auto/feature_extraction_auto.py",
"repo_id": "transformers",
"token_count": 7820
} | 602 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-rayyan/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-rayyan/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,449 |
# Advanced diffusion training examples
## Train Dreambooth LoRA with Stable Diffusion XL
> [!TIP]
> 💡 This example follows the techniques and recommended practices covered in the blog post: [LoRA training scripts of the world, unite!](https://huggingface.co/blog/sdxl_lora_advanced_script). Make sure to check it out b... | diffusers/examples/advanced_diffusion_training/README.md/0 | {
"file_path": "diffusers/examples/advanced_diffusion_training/README.md",
"repo_id": "diffusers",
"token_count": 3982
} | 196 |
import random
import threading
import time
import pytest
from base.collection_wrapper import ApiCollectionWrapper
from base.utility_wrapper import ApiUtilityWrapper
from common.common_type import CaseLabel, CheckTasks
from common.milvus_sys import MilvusSys
from customize.milvus_operator import MilvusOperator
from co... | milvus/tests/python_client/scale/test_query_node_scale.py/0 | {
"file_path": "milvus/tests/python_client/scale/test_query_node_scale.py",
"repo_id": "milvus",
"token_count": 7518
} | 2,005 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/proxy/msg_pack_test.go/0 | {
"file_path": "milvus/internal/proxy/msg_pack_test.go",
"repo_id": "milvus",
"token_count": 2948
} | 1,741 |
from llama_index.storage.index_store.mongodb.base import MongoIndexStore
__all__ = ["MongoIndexStore"]
| llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/llama_index/storage/index_store/mongodb/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/index_store/llama-index-storage-index-store-mongodb/llama_index/storage/index_store/mongodb/__init__.py",
"repo_id": "llama_index",
"token_count": 34
} | 1,600 |
# Using Vector Stores
LlamaIndex offers multiple integration points with vector stores / vector databases:
1. LlamaIndex can use a vector store itself as an index. Like any other index, this index can store documents and be used to answer queries.
2. LlamaIndex can load data from vector stores, similar to any other d... | llama_index/docs/community/integrations/vector_stores.md/0 | {
"file_path": "llama_index/docs/community/integrations/vector_stores.md",
"repo_id": "llama_index",
"token_count": 8842
} | 1,045 |
"""Integration test for Kay.ai API Wrapper."""
import pytest
from langchain_core.documents import Document
from langchain_community.retrievers import KayAiRetriever
@pytest.mark.requires("kay")
def test_kay_retriever() -> None:
retriever = KayAiRetriever.create(
dataset_id="company",
data_types=[... | langchain/libs/community/tests/integration_tests/retrievers/test_kay.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/retrievers/test_kay.py",
"repo_id": "langchain",
"token_count": 292
} | 377 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
mod model;
use model::{Multiples, YoloV8, YoloV8Pose};
use candle::{DType, Device, IndexOp, Result, Tensor};
use candle_nn::{Module, VarBuilder};
use candle_transformers::object_detection::{non_maximum_sup... | candle/candle-examples/examples/yolo-v8/main.rs/0 | {
"file_path": "candle/candle-examples/examples/yolo-v8/main.rs",
"repo_id": "candle",
"token_count": 7436
} | 47 |
package proxy
import (
"context"
"testing"
"github.com/cockroachdb/errors"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc"
"github.com/milvus-io/milvus/pkg/util/paramtable"
)
func TestInitHook(t *testing.T) {
paramtable.Get().Save(Params.ProxyCfg.SoPath.Key, "")
initHook()
assert.IsType(t, de... | milvus/internal/proxy/hook_interceptor_test.go/0 | {
"file_path": "milvus/internal/proxy/hook_interceptor_test.go",
"repo_id": "milvus",
"token_count": 1621
} | 1,815 |
import { InMemoryStore } from "langchain/storage/in_memory";
import { AIMessage, BaseMessage, HumanMessage } from "@langchain/core/messages";
// Instantiate the store using the `fromPath` method.
const store = new InMemoryStore<BaseMessage>();
/**
* Here you would define your LLM and chat chain, call
* the LLM and e... | langchainjs/examples/src/stores/in_memory_storage.ts/0 | {
"file_path": "langchainjs/examples/src/stores/in_memory_storage.ts",
"repo_id": "langchainjs",
"token_count": 589
} | 822 |
# flake8: noqa
from langchain.memory.prompt import (
ENTITY_EXTRACTION_PROMPT,
ENTITY_MEMORY_CONVERSATION_TEMPLATE,
ENTITY_SUMMARIZATION_PROMPT,
KNOWLEDGE_TRIPLE_EXTRACTION_PROMPT,
SUMMARY_PROMPT,
)
from langchain_core.prompts.prompt import PromptTemplate
DEFAULT_TEMPLATE = """The following is a fr... | langchain/libs/langchain/langchain/chains/conversation/prompt.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/conversation/prompt.py",
"repo_id": "langchain",
"token_count": 345
} | 479 |
"""Test LLM program."""
import json
from typing import Sequence
from unittest.mock import MagicMock
from llama_index.core.base.llms.types import (
CompletionResponse,
)
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.multi_modal_llms import MultiModalLLMMetadata
from llama_index.core.... | llama_index/llama-index-core/tests/program/test_multi_modal_llm_program.py/0 | {
"file_path": "llama_index/llama-index-core/tests/program/test_multi_modal_llm_program.py",
"repo_id": "llama_index",
"token_count": 568
} | 1,197 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py",
"repo_id": "diffusers",
"token_count": 7179
} | 239 |
from langchain_core.outputs.chat_generation import ChatGeneration, ChatGenerationChunk
from langchain_core.outputs.chat_result import ChatResult
from langchain_core.outputs.generation import Generation, GenerationChunk
from langchain_core.outputs.llm_result import LLMResult
from langchain_core.outputs.run_info import R... | langchain/libs/core/langchain_core/outputs/__init__.py/0 | {
"file_path": "langchain/libs/core/langchain_core/outputs/__init__.py",
"repo_id": "langchain",
"token_count": 162
} | 394 |
from docutils import nodes
import sphinx
from sphinx.locale import _
from conf import rust_version
logger = sphinx.util.logging.getLogger(__name__)
class RustRef:
def __call__(self, name, rawtext, text, lineno, inliner, options={}, content=[]):
doctype = name.split("_")[1]
parts = text.split(":... | tokenizers/docs/source/_ext/rust_doc.py/0 | {
"file_path": "tokenizers/docs/source/_ext/rust_doc.py",
"repo_id": "tokenizers",
"token_count": 1221
} | 457 |
<!--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... | peft/docs/source/task_guides/prompt_based_methods.md/0 | {
"file_path": "peft/docs/source/task_guides/prompt_based_methods.md",
"repo_id": "peft",
"token_count": 4608
} | 338 |
import inspect
from typing import List, Optional, Union
import PIL.Image
import torch
from torch.nn import functional as F
from transformers import (
CLIPImageProcessor,
CLIPTextModelWithProjection,
CLIPTokenizer,
CLIPVisionModelWithProjection,
)
from diffusers import (
DiffusionPipeline,
Imag... | diffusers/examples/community/unclip_image_interpolation.py/0 | {
"file_path": "diffusers/examples/community/unclip_image_interpolation.py",
"repo_id": "diffusers",
"token_count": 10177
} | 204 |
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
import type { ToolInterface } from "@langchain/core/tools";
import { Toolkit } from "@langchain/community/agents/toolkits/base";
import {
JsonGetValueTool,
JsonListKeysTool,
JsonSpec,
} from "../../../tools/json.js";
import { ... | langchainjs/langchain/src/agents/toolkits/json/json.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/toolkits/json/json.ts",
"repo_id": "langchainjs",
"token_count": 797
} | 884 |
# coding=utf-8
# Copyright 2021 The Facebook, Inc. and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | transformers/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py/0 | {
"file_path": "transformers/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py",
"repo_id": "transformers",
"token_count": 32333
} | 612 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/tools/llama-index-tools-notion/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-notion/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,626 |
use crate::tokenizer::{Decoder, Result};
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Clone, Debug, Serialize)]
/// Allows decoding Original BPE by joining all the tokens and then replacing
/// the suffix used to identify end-of-words by whitespaces
#[serde(tag = "type")]
#[non_exhaustive]
pub struct BP... | tokenizers/tokenizers/src/decoders/bpe.rs/0 | {
"file_path": "tokenizers/tokenizers/src/decoders/bpe.rs",
"repo_id": "tokenizers",
"token_count": 419
} | 474 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/unets/unet_2d_condition_flax.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_2d_condition_flax.py",
"repo_id": "diffusers",
"token_count": 9816
} | 234 |
# LlamaIndex CLI
## Installation
```sh
pip install llama-index-cli
```
## Usage
```sh
llamaindex -h
usage: llamaindex [-h] {rag,download-llamapack,download-llamadataset,upgrade,upgrade-file,new-package} ...
LlamaIndex CLI tool.
options:
-h, --help show this help message and exit
commands:
{rag,do... | llama_index/llama-index-cli/README.md/0 | {
"file_path": "llama_index/llama-index-cli/README.md",
"repo_id": "llama_index",
"token_count": 333
} | 1,157 |
import argparse
import sys
sys.path.append(".")
from base_classes import ImageToImageBenchmark, TurboImageToImageBenchmark # noqa: E402
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--ckpt",
type=str,
default="runwayml/stable-diffusion-v1-5",
... | diffusers/benchmarks/benchmark_sd_img.py/0 | {
"file_path": "diffusers/benchmarks/benchmark_sd_img.py",
"repo_id": "diffusers",
"token_count": 415
} | 187 |
.tokenized-text {
width:100%;
padding:2rem;
max-height: 400px;
overflow-y: auto;
box-sizing:border-box;
line-height:4rem; /* Lots of space between lines */
font-family: "Roboto Light", "Ubuntu Light", "Ubuntu", monospace;
box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
background-color: rgb... | tokenizers/bindings/python/py_src/tokenizers/tools/visualizer-styles.css/0 | {
"file_path": "tokenizers/bindings/python/py_src/tokenizers/tools/visualizer-styles.css",
"repo_id": "tokenizers",
"token_count": 1806
} | 448 |
<jupyter_start> | langchain/docs/docs/use_cases/chatbots/index.ipynb/0 | {
"file_path": "langchain/docs/docs/use_cases/chatbots/index.ipynb",
"repo_id": "langchain",
"token_count": 8
} | 211 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | transformers/examples/pytorch/audio-classification/run_audio_classification.py/0 | {
"file_path": "transformers/examples/pytorch/audio-classification/run_audio_classification.py",
"repo_id": "transformers",
"token_count": 7223
} | 547 |
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.qdrant import QdrantVectorStore
def test_class():
names_of_base_classes = [b.__name__ for b in QdrantVectorStore.__mro__]
assert BasePydanticVectorStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/tests/test_vector_stores_qdrant.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/tests/test_vector_stores_qdrant.py",
"repo_id": "llama_index",
"token_count": 103
} | 1,496 |
import os
from enum import Enum
from functools import lru_cache
from langchain.pydantic_v1 import BaseModel, Field
from langchain.tools.retriever import create_retriever_tool
from langchain_community.agent_toolkits.connery import ConneryToolkit
from langchain_community.retrievers import (
KayAiRetriever,
PubMe... | opengpts/backend/app/tools.py/0 | {
"file_path": "opengpts/backend/app/tools.py",
"repo_id": "opengpts",
"token_count": 2120
} | 1,986 |
#!/usr/bin/env python
# coding=utf-8
# 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-... | transformers/examples/flax/vision/run_image_classification.py/0 | {
"file_path": "transformers/examples/flax/vision/run_image_classification.py",
"repo_id": "transformers",
"token_count": 9739
} | 521 |
//! This comes from the Rust libcore and is duplicated here because it is not exported
//! (cf <https://github.com/rust-lang/rust/blob/25091ed9b7739e12466fb2490baa1e8a2815121c/src/libcore/iter/adapters/mod.rs#L2664>)
//! We are now using the version from <https://stackoverflow.com/questions/44544323/how-to-unzip-a-sequ... | tokenizers/tokenizers/src/utils/iter.rs/0 | {
"file_path": "tokenizers/tokenizers/src/utils/iter.rs",
"repo_id": "tokenizers",
"token_count": 1339
} | 486 |
<!--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/benchmarks.md/0 | {
"file_path": "transformers/docs/source/en/benchmarks.md",
"repo_id": "transformers",
"token_count": 7132
} | 495 |
python_sources()
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/llama_index/embeddings/llm_rails/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/llama_index/embeddings/llm_rails/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,368 |
package indexcgowrapper
import (
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/storage"
)
const (
keyRawArr = "key_raw_arr"
)
type Dataset struct {
DType schemapb.DataType
Data map[string]interface{}
}
func GenFloatVecDataset(vectors []float32) *Dataset {
return... | milvus/internal/util/indexcgowrapper/dataset.go/0 | {
"file_path": "milvus/internal/util/indexcgowrapper/dataset.go",
"repo_id": "milvus",
"token_count": 1209
} | 1,873 |
# LlamaIndex Vector_Stores Integration: Qdrant
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/README.md",
"repo_id": "llama_index",
"token_count": 14
} | 1,534 |
-- CreateTable
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE "Document" (
"id" TEXT NOT NULL,
"content" TEXT NOT NULL,
"namespace" TEXT DEFAULT 'default',
"vector" vector,
CONSTRAINT "Document_pkey" PRIMARY KEY ("id")
);
| langchainjs/examples/src/indexes/vector_stores/prisma_vectorstore/prisma/migrations/00_init/migration.sql/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/prisma_vectorstore/prisma/migrations/00_init/migration.sql",
"repo_id": "langchainjs",
"token_count": 93
} | 852 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { error } from "@sveltejs/kit";
import { authCondition } from "$lib/server/auth";
import { UrlDependency } from "$lib/types/UrlDependency";
import { convertLegacyConversation } from "$lib/utils/tree/convertLegacyConversation.... | chat-ui/src/routes/conversation/[id]/+page.server.ts/0 | {
"file_path": "chat-ui/src/routes/conversation/[id]/+page.server.ts",
"repo_id": "chat-ui",
"token_count": 678
} | 117 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.