text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
from langchain_community.vectorstores import LanceDB
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
def test_lancedb() -> None:
import lancedb
embeddings = FakeEmbeddings()
db = lancedb.connect("/tmp/lancedb")
texts = ["text 1", "text 2", "item 3"]
vectors = embed... | langchain/libs/community/tests/integration_tests/vectorstores/test_lancedb.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/vectorstores/test_lancedb.py",
"repo_id": "langchain",
"token_count": 585
} | 376 |
<jupyter_start><jupyter_text>🧨 Stable Diffusion in JAX / Flax ! 🤗 Hugging Face [Diffusers](https://github.com/huggingface/diffusers) supports Flax since version `0.5.1`! This allows for super fast inference on Google TPUs, such as those available in Colab, Kaggle or Google Cloud Platform.This notebook shows how to ru... | notebooks/diffusers/stable_diffusion_jax_how_to.ipynb/0 | {
"file_path": "notebooks/diffusers/stable_diffusion_jax_how_to.ipynb",
"repo_id": "notebooks",
"token_count": 3380
} | 307 |
import { ResponsiveScatterPlot } from "@nivo/scatterplot";
const SummaryChart = ({
chartData,
}: {
chartData: {
id: string;
data: {
x: number;
y: number;
}[];
}[];
}) => {
return (
<ResponsiveScatterPlot
data={chartData}
margin={{ top: 60, right: 140, bottom: 70, left: 9... | auto-evaluator/nextjs/components/SummaryChart.tsx/0 | {
"file_path": "auto-evaluator/nextjs/components/SummaryChart.tsx",
"repo_id": "auto-evaluator",
"token_count": 816
} | 1 |
import { test } from "@jest/globals";
import { Document } from "@langchain/core/documents";
import { OpenAIEmbeddings, OpenAI } from "@langchain/openai";
import { AttributeInfo } from "../../../schema/query_constructor.js";
import { SelfQueryRetriever } from "../index.js";
import { FunctionalTranslator } from "../funct... | langchainjs/langchain/src/retrievers/self_query/tests/memory_self_query.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/self_query/tests/memory_self_query.int.test.ts",
"repo_id": "langchainjs",
"token_count": 4303
} | 918 |
<!--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/deformable_detr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/deformable_detr.md",
"repo_id": "transformers",
"token_count": 1014
} | 473 |
<script lang="ts">
import CarbonStopFilledAlt from "~icons/carbon/stop-filled-alt";
export let classNames = "";
</script>
<button
type="button"
on:click
class="btn flex h-8 rounded-lg border bg-white px-3 py-1 shadow-sm transition-all hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:hover:bg-gray-600... | chat-ui/src/lib/components/StopGeneratingBtn.svelte/0 | {
"file_path": "chat-ui/src/lib/components/StopGeneratingBtn.svelte",
"repo_id": "chat-ui",
"token_count": 170
} | 87 |
from langchain_community.tools.azure_cognitive_services.text_analytics_health import (
AzureCogsTextAnalyticsHealthTool,
)
__all__ = ["AzureCogsTextAnalyticsHealthTool"]
| langchain/libs/langchain/langchain/tools/azure_cognitive_services/text_analytics_health.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/azure_cognitive_services/text_analytics_health.py",
"repo_id": "langchain",
"token_count": 57
} | 551 |
use crate::tokenizer::{NormalizedString, Normalizer, Result};
use serde::{Deserialize, Serialize};
use unicode_categories::UnicodeCategories;
/// Checks whether a character is whitespace
fn is_whitespace(c: char) -> bool {
// These are technically control characters but we count them as whitespace
match c {
... | tokenizers/tokenizers/src/normalizers/bert.rs/0 | {
"file_path": "tokenizers/tokenizers/src/normalizers/bert.rs",
"repo_id": "tokenizers",
"token_count": 1856
} | 459 |
<jupyter_start><jupyter_text>Conversation Summary Buffer`ConversationSummaryBufferMemory` combines the two ideas. It keeps a buffer of recent interactions in memory, but rather than just completely flushing old interactions it compiles them into a summary and uses both. It uses token length rather than number of intera... | langchain/docs/docs/modules/memory/types/summary_buffer.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/memory/types/summary_buffer.ipynb",
"repo_id": "langchain",
"token_count": 930
} | 203 |
# Trafilatura Website Loader
This loader is a web scraper that fetches the text from static websites using the `trafilatura` Python package.
## Usage
To use this loader, you need to pass in an array of URLs.
```python
from llama_index import download_loader
TrafilaturaWebReader = download_loader("TrafilaturaWebRea... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/trafilatura_web/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/trafilatura_web/README.md",
"repo_id": "llama_index",
"token_count": 627
} | 1,447 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/image_classification.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/image_classification.md",
"repo_id": "transformers",
"token_count": 11866
} | 556 |
<jupyter_start><jupyter_text>Hugging FaceLet's load the Hugging Face Embedding class.<jupyter_code>%pip install --upgrade --quiet langchain sentence_transformers
from langchain_community.embeddings import HuggingFaceEmbeddings
embeddings = HuggingFaceEmbeddings()
text = "This is a test document."
query_result = embedd... | langchain/docs/docs/integrations/text_embedding/huggingfacehub.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/huggingfacehub.ipynb",
"repo_id": "langchain",
"token_count": 472
} | 163 |
""" Mixup and Cutmix
Papers:
mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (https://arxiv.org/abs/1905.04899)
Code Reference:
CutMix: https://github.com/clovaai/CutMix-PyTorch
Hacked together by / Co... | pytorch-image-models/timm/data/mixup.py/0 | {
"file_path": "pytorch-image-models/timm/data/mixup.py",
"repo_id": "pytorch-image-models",
"token_count": 7225
} | 327 |
import argparse
import glob
import logging
import os
import time
from argparse import Namespace
import numpy as np
import torch
from lightning_base import BaseTransformer, add_generic_args, generic_train
from torch.utils.data import DataLoader, TensorDataset
from transformers import glue_compute_metrics as compute_me... | transformers/examples/legacy/pytorch-lightning/run_glue.py/0 | {
"file_path": "transformers/examples/legacy/pytorch-lightning/run_glue.py",
"repo_id": "transformers",
"token_count": 3476
} | 515 |
FROM adoptopenjdk:11-jdk-hotspot
# Prepare environment
ENV PULSAR_HOME=/pulsar
ENV PATH=$PULSAR_HOME/bin:$PATH
RUN groupadd --system --gid=9999 pulsar && useradd --system --home-dir $PULSAR_HOME --uid=9999 --gid=pulsar pulsar
WORKDIR $PULSAR_HOME
ARG PULSAR_VERSION
ENV PULSAR_VERSION 2.8.2
# Install Pulsar
RUN set -ex... | milvus/build/docker/pulsar/Dockerfile/0 | {
"file_path": "milvus/build/docker/pulsar/Dockerfile",
"repo_id": "milvus",
"token_count": 377
} | 1,705 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/t5v1.1.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/t5v1.1.md",
"repo_id": "transformers",
"token_count": 967
} | 465 |
//go:build ignore
package main
import (
. "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/operand"
. "github.com/mmcloughlin/avo/reg"
)
var unroll = 4
// inspired by the avo example https://github.com/mmcloughlin/avo
// avo is a tool to generate go assembly
func main() {
TEXT("IP", NOSPLIT, "fu... | milvus/pkg/util/distance/asm/ip.go/0 | {
"file_path": "milvus/pkg/util/distance/asm/ip.go",
"repo_id": "milvus",
"token_count": 876
} | 1,930 |
Retriever Query Engine
=======================
.. automodule:: llama_index.core.query_engine.retriever_query_engine
:members:
:inherited-members:
| llama_index/docs/api_reference/query/query_engines/retriever_query_engine.rst/0 | {
"file_path": "llama_index/docs/api_reference/query/query_engines/retriever_query_engine.rst",
"repo_id": "llama_index",
"token_count": 51
} | 1,114 |
---
sidebar_position: 2
---
# Memory types
There are many different types of memory.
Each has their own parameters, their own return types, and is useful in different scenarios.
Please see their individual page for more detail on each one.
| langchain/docs/docs/modules/memory/types/index.mdx/0 | {
"file_path": "langchain/docs/docs/modules/memory/types/index.mdx",
"repo_id": "langchain",
"token_count": 57
} | 209 |
<jupyter_start><jupyter_text>OpenLM[OpenLM](https://github.com/r2d4/openlm) is a zero-dependency OpenAI-compatible LLM provider that can call different inference endpoints directly via HTTP. It implements the OpenAI Completion class so that it can be used as a drop-in replacement for the OpenAI API. This changeset util... | langchain/docs/docs/integrations/llms/openlm.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/openlm.ipynb",
"repo_id": "langchain",
"token_count": 697
} | 125 |
"""Chain that interprets a prompt and executes python code to do math."""
from __future__ import annotations
import math
import re
import warnings
from typing import Any, Dict, List, Optional
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
)
from langchain_c... | langchain/libs/langchain/langchain/chains/llm_math/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/llm_math/base.py",
"repo_id": "langchain",
"token_count": 3015
} | 506 |
import json
import os
from langchain_community.chat_message_histories import MongoDBChatMessageHistory
from langchain_core.messages import message_to_dict
from langchain.memory import ConversationBufferMemory
# Replace these with your mongodb connection string
connection_string = os.environ.get("MONGODB_CONNECTION_S... | langchain/libs/langchain/tests/integration_tests/memory/test_mongodb.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/memory/test_mongodb.py",
"repo_id": "langchain",
"token_count": 417
} | 616 |
/* eslint-disable no-process-env */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { jest, test, expect } from "@jest/globals";
import { setTimeout } from "timers/promises";
import { SearchIndexClient, AzureKeyCredential } from "@azure/search-documents";
import { OpenAIEmbeddings } from "@langchai... | langchainjs/libs/langchain-community/src/vectorstores/tests/azure_aisearch.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/azure_aisearch.int.test.ts",
"repo_id": "langchainjs",
"token_count": 5396
} | 1,025 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py",
"repo_id": "diffusers",
"token_count": 12420
} | 270 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/pkg/util/timerecord/time_recorder.go/0 | {
"file_path": "milvus/pkg/util/timerecord/time_recorder.go",
"repo_id": "milvus",
"token_count": 1388
} | 1,916 |
# 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/configuration_yolos.py/0 | {
"file_path": "transformers/src/transformers/models/yolos/configuration_yolos.py",
"repo_id": "transformers",
"token_count": 3014
} | 696 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 4807
} | 622 |
# End-to-End Evaluation
End-to-End evaluation should be the guiding signal for your RAG application - will my pipeline generate the right responses given the data sources and a set of queries?
While it helps initially to individually inspect queries and responses, as you deal with more failure and corner cases, it ma... | llama_index/docs/optimizing/evaluation/e2e_evaluation.md/0 | {
"file_path": "llama_index/docs/optimizing/evaluation/e2e_evaluation.md",
"repo_id": "llama_index",
"token_count": 849
} | 1,101 |
import CodeBlock from "@theme/CodeBlock";
# AutoGPT
:::info
Original Repo: https://github.com/Significant-Gravitas/Auto-GPT
:::
AutoGPT is a custom agent that uses long-term memory along with a prompt designed for independent work (ie. without asking user input) to perform tasks.
## Isomorphic Example
import Isomo... | langchainjs/docs/core_docs/docs/use_cases/autonomous_agents/auto_gpt.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/autonomous_agents/auto_gpt.mdx",
"repo_id": "langchainjs",
"token_count": 326
} | 822 |
# Optimization
This page contains the API reference documentation for learning rate optimizers included in `timm`.
## Optimizers
### Factory functions
[[autodoc]] timm.optim.optim_factory.create_optimizer
[[autodoc]] timm.optim.optim_factory.create_optimizer_v2
### Optimizer Classes
[[autodoc]] timm.optim.adabeli... | pytorch-image-models/hfdocs/source/reference/optimizers.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/reference/optimizers.mdx",
"repo_id": "pytorch-image-models",
"token_count": 333
} | 358 |
package aliyun
import (
"github.com/aliyun/credentials-go/credentials" // >= v1.2.6
"github.com/cockroachdb/errors"
"github.com/minio/minio-go/v7"
minioCred "github.com/minio/minio-go/v7/pkg/credentials"
"github.com/milvus-io/milvus/pkg/log"
)
const (
OSSAddressFeatureString = "aliyuncs.com"
OSSDefaultAddress... | milvus/internal/storage/aliyun/aliyun.go/0 | {
"file_path": "milvus/internal/storage/aliyun/aliyun.go",
"repo_id": "milvus",
"token_count": 1167
} | 1,783 |
<jupyter_start><jupyter_text>Automated Metadata Extraction for Better Retrieval + SynthesisIn this tutorial, we show you how to perform automated metadata extraction for better retrieval results.We use two extractors: a QuestionAnsweredExtractor which generates question/answer pairs from a piece of text, and also a Sum... | llama_index/docs/examples/metadata_extraction/MetadataExtraction_LLMSurvey.ipynb/0 | {
"file_path": "llama_index/docs/examples/metadata_extraction/MetadataExtraction_LLMSurvey.ipynb",
"repo_id": "llama_index",
"token_count": 2677
} | 1,199 |
# Playgrounds Tool Specs
## playgrounds_subgraph_connector
Playgrounds API is a service provided by [Playgrounds Analytics](https://playgrounds.network) to streamline interfacing with decentralized subgraphs (indexed blockchain datasets).
The `PlaygroundsSubgraphConnector` is a tool designed for LLM agents to seamle... | llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-playgrounds/README.md",
"repo_id": "llama_index",
"token_count": 2013
} | 1,628 |
"""Node PostProcessor module."""
from llama_index.legacy.postprocessor.cohere_rerank import CohereRerank
from llama_index.legacy.postprocessor.flag_embedding_reranker import (
FlagEmbeddingReranker,
)
from llama_index.legacy.postprocessor.llm_rerank import LLMRerank
from llama_index.legacy.postprocessor.longllmlin... | llama_index/llama-index-legacy/llama_index/legacy/postprocessor/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/postprocessor/__init__.py",
"repo_id": "llama_index",
"token_count": 639
} | 1,588 |
import { SonixSpeechRecognitionService } from "sonix-speech-recognition";
import { SpeechToTextRequest } from "sonix-speech-recognition/lib/types.js";
import { Document } from "@langchain/core/documents";
import { BaseDocumentLoader } from "../base.js";
/**
* A class that represents a document loader for transcribing... | langchainjs/langchain/src/document_loaders/web/sonix_audio.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/web/sonix_audio.ts",
"repo_id": "langchainjs",
"token_count": 647
} | 913 |
# 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/tests/test_state_checkpointing.py/0 | {
"file_path": "accelerate/tests/test_state_checkpointing.py",
"repo_id": "accelerate",
"token_count": 8893
} | 25 |
import time
from collections import namedtuple
from pathlib import Path
from typing import List
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
try:
from faker import Faker
fake = Faker()
except Exception:
fake = None
MAX_RETRIES = 10
SEC_EDGAR_RATE_LIMIT_S... | llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/utils.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/utils.py",
"repo_id": "llama_index",
"token_count": 3139
} | 1,427 |
from llama_index.readers.arango_db.base import SimpleArangoDBReader
__all__ = ["SimpleArangoDBReader"]
| llama_index/llama-index-integrations/readers/llama-index-readers-arango-db/llama_index/readers/arango_db/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-arango-db/llama_index/readers/arango_db/__init__.py",
"repo_id": "llama_index",
"token_count": 35
} | 1,332 |
## Requirements
In order to generate the documentation, it is necessary to have a Python environment with the
following:
```python
pip install sphinx sphinx_rtd_theme setuptools_rust
```
It is also necessary to have the `tokenizers` library in this same environment, for Sphinx to
generate all the API Reference and li... | tokenizers/docs/README.md/0 | {
"file_path": "tokenizers/docs/README.md",
"repo_id": "tokenizers",
"token_count": 266
} | 428 |
<jupyter_start><jupyter_text>Local LLMHere, we'll use a server that's serving a local LLM.**Attention** This is OK for prototyping / dev usage, but should not be used for production cases when there might be concurrent requests from different users. As of the time of writing, Ollama is designed for single user and cann... | langserve/examples/local_llm/client.ipynb/0 | {
"file_path": "langserve/examples/local_llm/client.ipynb",
"repo_id": "langserve",
"token_count": 1126
} | 1,011 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/utils/check_repo.py/0 | {
"file_path": "diffusers/utils/check_repo.py",
"repo_id": "diffusers",
"token_count": 12370
} | 301 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-macrometa-gdn/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-macrometa-gdn/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,420 |
# LlamaIndex Kvstore Integration: Firestore Kvstore
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/README.md",
"repo_id": "llama_index",
"token_count": 15
} | 1,423 |
# LlamaIndex Tools Integration: Exa
This tool connects to [Exa](https://exa.ai/) to easily enable
your agent to search and get HTML content from the Internet.
To begin, you need to obtain an API key on the [Exa developer dashboard](https://dashboard.exa.ai).
## Usage
This tool has more a extensive example usage doc... | llama_index/llama-index-integrations/tools/llama-index-tools-exa/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-exa/README.md",
"repo_id": "llama_index",
"token_count": 437
} | 1,511 |
# LlamaIndex Postprocessor Integration: Flag Embedding Reranker
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-flag-embedding-reranker/README.md",
"repo_id": "llama_index",
"token_count": 17
} | 1,295 |
package dbmodel
type Notification struct {
ID int64 `gorm:"id;primaryKey;autoIncrement"`
CollectionID string `gorm:"collection_id"`
Type string `gorm:"notification_type"`
Status string `gorm:"status"`
}
const (
NotificationTypeCreateCollection = "create_collection"
NotificationTypeDelet... | chroma/go/coordinator/internal/metastore/db/dbmodel/notification.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/db/dbmodel/notification.go",
"repo_id": "chroma",
"token_count": 234
} | 48 |
from typing import Any, Dict, List, Optional
from langchain.callbacks.manager import CallbackManagerForChainRun
from langchain.chains.base import Chain
from langchain_experimental.comprehend_moderation.base_moderation import BaseModeration
from langchain_experimental.comprehend_moderation.base_moderation_callbacks im... | langchain/libs/experimental/langchain_experimental/comprehend_moderation/amazon_comprehend_moderation.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/comprehend_moderation/amazon_comprehend_moderation.py",
"repo_id": "langchain",
"token_count": 2628
} | 444 |
<jupyter_start><jupyter_text>Hierarchical Agent TeamsIn our previous example ([Agent Supervisor](./agent_supervisor.ipynb)), we introduced the concept of a single supervisor node to route work between different worker nodes.But what if the job for a single worker becomes too complex? What if the number of workers becom... | langgraph/examples/multi_agent/hierarchical_agent_teams.ipynb/0 | {
"file_path": "langgraph/examples/multi_agent/hierarchical_agent_teams.ipynb",
"repo_id": "langgraph",
"token_count": 7602
} | 1,034 |
from typing import Iterable, List
from langchain_community.document_loaders.blob_loaders import FileSystemBlobLoader
from langchain_community.document_loaders.blob_loaders.schema import Blob, BlobLoader
class YoutubeAudioLoader(BlobLoader):
"""Load YouTube urls as audio file(s)."""
def __init__(self, urls:... | langchain/libs/community/langchain_community/document_loaders/blob_loaders/youtube_audio.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/blob_loaders/youtube_audio.py",
"repo_id": "langchain",
"token_count": 765
} | 243 |
from langchain_community.utilities.bing_search import BingSearchAPIWrapper
__all__ = ["BingSearchAPIWrapper"]
| langchain/libs/langchain/langchain/utilities/bing_search.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/bing_search.py",
"repo_id": "langchain",
"token_count": 33
} | 570 |
python_tests(
name="tests",
skip_tests=True,
)
| llama_index/llama-index-legacy/tests/question_gen/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/tests/question_gen/BUILD",
"repo_id": "llama_index",
"token_count": 25
} | 1,755 |
{
"name": "examples",
"version": "0.0.0",
"private": true,
"description": "Langchain examples",
"main": "./dist/index.js",
"type": "module",
"files": [
"dist/"
],
"scripts": {
"build": "tsc --declaration --outDir dist/",
"start": "tsx --experimental-wasm-modules -r dotenv/config src/index.... | langchainjs/examples/package.json/0 | {
"file_path": "langchainjs/examples/package.json",
"repo_id": "langchainjs",
"token_count": 1798
} | 788 |
insert_search_performance:
collections:
-
milvus:
db_config.primary_path: /test/milvus/distribued/sift_10w_128_l2_flat
cache_config.cpu_cache_capacity: 8GB
engine_config.use_blas_threshold: 0
server:
cpus: 64
collection_name: sift_10m_128_l2
ni_per: 50000
... | milvus/tests/benchmark/milvus_benchmark/suites/2_insert_search_sift10m_2048.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/2_insert_search_sift10m_2048.yaml",
"repo_id": "milvus",
"token_count": 1246
} | 1,949 |
# Airbyte Typeform Loader
The Airbyte Typeform Loader allows you to access different Typeform objects.
## Installation
- Install llama_hub: `pip install llama_hub`
- Install the typeform source: `pip install airbyte-source-typeform`
## Usage
Here's an example usage of the AirbyteTypeformReader.
```python
from lla... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-typeform/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-typeform/README.md",
"repo_id": "llama_index",
"token_count": 905
} | 1,401 |
python_tests()
| llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-anthropic/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,275 |
// 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/storage/minio_object_storage_test.go/0 | {
"file_path": "milvus/internal/storage/minio_object_storage_test.go",
"repo_id": "milvus",
"token_count": 2911
} | 1,929 |
# ruff: noqa
__all__ = [
"Audio",
"Array2D",
"Array3D",
"Array4D",
"Array5D",
"ClassLabel",
"Features",
"Sequence",
"Value",
"Image",
"Translation",
"TranslationVariableLanguages",
]
from .audio import Audio
from .features import Array2D, Array3D, Array4D, Array5D, Class... | datasets/src/datasets/features/__init__.py/0 | {
"file_path": "datasets/src/datasets/features/__init__.py",
"repo_id": "datasets",
"token_count": 165
} | 136 |
# 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/examples/loftq_finetuning/train_gsm8k_llama.py/0 | {
"file_path": "peft/examples/loftq_finetuning/train_gsm8k_llama.py",
"repo_id": "peft",
"token_count": 14574
} | 318 |
use candle_core::{
bail,
quantized::{self, GgmlDType},
test_device,
test_utils::to_vec2_round,
Device, Module, Result, Tensor,
};
use quantized::{k_quants, GgmlType};
use rand::prelude::*;
const GGML_TEST_SIZE: usize = 32 * 128;
const GGML_MAX_QUANTIZATION_TOTAL_ERROR: f32 = 0.002;
const GGML_MAX_... | candle/candle-core/tests/quantized_tests.rs/0 | {
"file_path": "candle/candle-core/tests/quantized_tests.rs",
"repo_id": "candle",
"token_count": 18700
} | 32 |
{
"input_variables": ["foo"]
} | langchain/libs/core/tests/unit_tests/data/prompts/prompt_missing_args.json/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/data/prompts/prompt_missing_args.json",
"repo_id": "langchain",
"token_count": 14
} | 443 |
# 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_xl/test_stable_diffusion_xl_inpaint.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py",
"repo_id": "diffusers",
"token_count": 15653
} | 276 |
# Pandas AI Loader
This loader is a light wrapper around the `PandasAI` Python package.
See here: https://github.com/gventuri/pandas-ai.
You can directly get the result of `pandasai.run` command, or
you can choose to load in `Document` objects via `load_data`.
## Usage
```python
from llama_index import download_lo... | llama_index/llama-index-integrations/readers/llama-index-readers-pandas-ai/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pandas-ai/README.md",
"repo_id": "llama_index",
"token_count": 895
} | 1,398 |
from langchain_community.tools.multion.update_session import (
MultionUpdateSession,
UpdateSessionSchema,
)
__all__ = ["UpdateSessionSchema", "MultionUpdateSession"]
| langchain/libs/langchain/langchain/tools/multion/update_session.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/multion/update_session.py",
"repo_id": "langchain",
"token_count": 55
} | 561 |
{
"extends": "@tsconfig/recommended",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"lib": [
"ES2021",
"ES2022.Object",
"DOM"
],
"target": "ES2021",
},
"include": [
"src/**/*"
]
}
| langchainjs/environment_tests/test-exports-bun/tsconfig.json/0 | {
"file_path": "langchainjs/environment_tests/test-exports-bun/tsconfig.json",
"repo_id": "langchainjs",
"token_count": 128
} | 773 |
<!--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/ja/tokenizer_summary.md/0 | {
"file_path": "transformers/docs/source/ja/tokenizer_summary.md",
"repo_id": "transformers",
"token_count": 9811
} | 502 |
from langchain_community.document_loaders.blockchain import (
BlockchainDocumentLoader,
BlockchainType,
)
__all__ = ["BlockchainType", "BlockchainDocumentLoader"]
| langchain/libs/langchain/langchain/document_loaders/blockchain.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/blockchain.py",
"repo_id": "langchain",
"token_count": 50
} | 477 |
// 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/segments/bloom_filter_set.go/0 | {
"file_path": "milvus/internal/querynodev2/segments/bloom_filter_set.go",
"repo_id": "milvus",
"token_count": 1098
} | 1,909 |
# coding=utf-8
# Copyright 2024 The Qwen team, Alibaba Group 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/... | transformers/src/transformers/models/qwen2/tokenization_qwen2_fast.py/0 | {
"file_path": "transformers/src/transformers/models/qwen2/tokenization_qwen2_fast.py",
"repo_id": "transformers",
"token_count": 2243
} | 648 |
{
"_type": "few_shot",
"input_variables": ["adjective"],
"prefix": "Write antonyms for the following words.",
"example_prompt": {
"_type": "prompt",
"input_variables": ["input", "output"],
"template": "Input: {input}\nOutput: {output}"
},
"examples": [
{"input": "... | langchain/libs/core/tests/unit_tests/examples/few_shot_prompt_examples_in.json/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/examples/few_shot_prompt_examples_in.json",
"repo_id": "langchain",
"token_count": 200
} | 436 |
# LlamaIndex Llms Integration: Openrouter
| llama_index/llama-index-integrations/llms/llama-index-llms-openrouter/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-openrouter/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,235 |
use std::collections::{hash_map::DefaultHasher, HashMap};
use std::hash::{Hash, Hasher};
use numpy::{npyffi, PyArray1};
use pyo3::class::basic::CompareOp;
use pyo3::exceptions;
use pyo3::intern;
use pyo3::prelude::*;
use pyo3::types::*;
use tk::models::bpe::BPE;
use tk::tokenizer::{
Model, PaddingDirection, Paddin... | tokenizers/bindings/python/src/tokenizer.rs/0 | {
"file_path": "tokenizers/bindings/python/src/tokenizer.rs",
"repo_id": "tokenizers",
"token_count": 26008
} | 425 |
# Model arguments
model_name_or_path: alignment-handbook/mistral-7b-sft-constitutional-ai
torch_dtype: null
# Data training arguments
# For definitions, see: src/h4/training/config.py
dataset_mixer:
HuggingFaceH4/ultrafeedback_binarized: 1.0
HuggingFaceH4/cai-conversation-harmless: 1.0
dataset_splits:
- train_pref... | alignment-handbook/recipes/constitutional-ai/dpo/config_anthropic.yaml/0 | {
"file_path": "alignment-handbook/recipes/constitutional-ai/dpo/config_anthropic.yaml",
"repo_id": "alignment-handbook",
"token_count": 373
} | 27 |
// 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_indexing.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_indexing.cpp",
"repo_id": "milvus",
"token_count": 18538
} | 1,756 |
import {
type BaseCallbackConfig,
CallbackManager,
ensureHandler,
} from "../callbacks/manager.js";
export const DEFAULT_RECURSION_LIMIT = 25;
export interface RunnableConfig extends BaseCallbackConfig {
/**
* Runtime values for attributes previously made configurable on this Runnable,
* or sub-Runnable... | langchainjs/langchain-core/src/runnables/config.ts/0 | {
"file_path": "langchainjs/langchain-core/src/runnables/config.ts",
"repo_id": "langchainjs",
"token_count": 2418
} | 865 |
from typing import Any, List
from langchain_core.documents import Document
from langchain_community.document_loaders.web_base import WebBaseLoader
class HNLoader(WebBaseLoader):
"""Load `Hacker News` data.
It loads data from either main page results or the comments page."""
def load(self) -> List[Docu... | langchain/libs/community/langchain_community/document_loaders/hn.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/hn.py",
"repo_id": "langchain",
"token_count": 963
} | 233 |
"""AINetwork toolkit."""
| langchain/libs/community/langchain_community/agent_toolkits/ainetwork/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/ainetwork/__init__.py",
"repo_id": "langchain",
"token_count": 9
} | 226 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 17934,
"logprob": null,
"text": "Pour"
},
{
"id": 49833,
"logprob": -10.5625,
"text": " dég"
},
{
"id"... | text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m/test_bloom_560m.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m/test_bloom_560m.json",
"repo_id": "text-generation-inference",
"token_count": 1544
} | 418 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-wordpress/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-wordpress/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,576 |
# flake8: noqa
"""Test sentence_transformer embeddings."""
from langchain_community.embeddings.sentence_transformer import (
SentenceTransformerEmbeddings,
)
from langchain_community.vectorstores import Chroma
def test_sentence_transformer_embedding_documents() -> None:
"""Test sentence_transformer embedding... | langchain/libs/community/tests/integration_tests/embeddings/test_sentence_transformer.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/embeddings/test_sentence_transformer.py",
"repo_id": "langchain",
"token_count": 486
} | 330 |
<jupyter_start><jupyter_text>Meta-PromptThis is a LangChain implementation of [Meta-Prompt](https://noahgoodman.substack.com/p/meta-prompt-a-simple-self-improving), by [Noah Goodman](https://cocolab.stanford.edu/ndg), for building self-improving agents.The key idea behind Meta-Prompt is to prompt the agent to reflect o... | langchain/cookbook/meta_prompt.ipynb/0 | {
"file_path": "langchain/cookbook/meta_prompt.ipynb",
"repo_id": "langchain",
"token_count": 2178
} | 73 |
# coding=utf-8
# Copyright 2022 The Fairseq Authors 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/... | transformers/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py",
"repo_id": "transformers",
"token_count": 40665
} | 751 |
package meta
import (
"github.com/blang/semver/v4"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
type (
UniqueID = typeutil.UniqueID
Timestamp = typeutil.Timestamp
)
type Meta struct {
SourceVersion semver.Version
Version semver.Version
Meta210 *All210
Meta220 *All220
}
| milvus/cmd/tools/migration/meta/meta.go/0 | {
"file_path": "milvus/cmd/tools/migration/meta/meta.go",
"repo_id": "milvus",
"token_count": 119
} | 1,757 |
/* eslint-disable no-process-env */
/* eslint-disable import/no-extraneous-dependencies */
import { test } from "@jest/globals";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { AnalyticDBVectorStore } from "../analyticdb.js";
const connectionOptions... | langchainjs/libs/langchain-community/src/vectorstores/tests/analyticdb.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/analyticdb.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1946
} | 1,084 |
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocktso
import (
time "time"
mock "github.com/stretchr/testify/mock"
)
// Allocator is an autogenerated mock type for the Allocator type
type Allocator struct {
mock.Mock
}
type Allocator_Expecter struct {
mock *mock.Mock
}
func (_m *Allocator) EXPECT... | milvus/internal/tso/mocks/allocator.go/0 | {
"file_path": "milvus/internal/tso/mocks/allocator.go",
"repo_id": "milvus",
"token_count": 2901
} | 2,069 |
package dbmodel
import (
"time"
"github.com/chroma/chroma-coordinator/internal/types"
)
type Collection struct {
ID string `gorm:"id;primaryKey"`
Name *string `gorm:"name;unique"`
Topic *string `gorm:"topic"`
Dimension *int32 `gorm:"dimension"`
DatabaseID ... | chroma/go/coordinator/internal/metastore/db/dbmodel/collection.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/db/dbmodel/collection.go",
"repo_id": "chroma",
"token_count": 498
} | 50 |
# A string used to distinguish different Supabase projects on the same host. Defaults to the working
# directory name when running `supabase init`.
project_id = "langchain-template-supabase"
[api]
# Port to use for the API URL.
port = 50321
# Schemas to expose in your API. Tables, views and stored procedures in this s... | langchain-template-supabase/supabase/config.toml/0 | {
"file_path": "langchain-template-supabase/supabase/config.toml",
"repo_id": "langchain-template-supabase",
"token_count": 815
} | 74 |
<jupyter_start><jupyter_text>Azure Cognitive Search>[Azure Cognitive Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search) (formerly known as `Azure Search`) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, ... | langchain/docs/docs/integrations/retrievers/azure_cognitive_search.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/retrievers/azure_cognitive_search.ipynb",
"repo_id": "langchain",
"token_count": 672
} | 163 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/using-diffusers/reproducibility.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/reproducibility.md",
"repo_id": "diffusers",
"token_count": 6163
} | 197 |
"""Utilities for formatting strings."""
from string import Formatter
from typing import Any, List, Mapping, Sequence
class StrictFormatter(Formatter):
"""Formatter that checks for extra keys."""
def vformat(
self, format_string: str, args: Sequence, kwargs: Mapping[str, Any]
) -> str:
"""... | langchain/libs/core/langchain_core/utils/formatting.py/0 | {
"file_path": "langchain/libs/core/langchain_core/utils/formatting.py",
"repo_id": "langchain",
"token_count": 343
} | 400 |
from langchain_community.document_loaders.onedrive import OneDriveLoader
__all__ = ["OneDriveLoader"]
| langchain/libs/langchain/langchain/document_loaders/onedrive.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/onedrive.py",
"repo_id": "langchain",
"token_count": 29
} | 489 |
"""Test dataset generation."""
from llama_index.core.evaluation.dataset_generation import DatasetGenerator
from llama_index.core.prompts.base import PromptTemplate
from llama_index.core.prompts.prompt_type import PromptType
from llama_index.core.schema import TextNode
from llama_index.core.service_context import Servi... | llama_index/llama-index-core/tests/evaluation/test_dataset_generation.py/0 | {
"file_path": "llama_index/llama-index-core/tests/evaluation/test_dataset_generation.py",
"repo_id": "llama_index",
"token_count": 570
} | 1,227 |
---
hide_table_of_contents: true
sidebar_class_name: hidden
---
import CodeBlock from "@theme/CodeBlock";
import Example from "@examples/chat/memory.ts";
# Using Buffer Memory with Chat Models
This example covers how to use chat-specific memory classes with chat models.
The key thing to notice is that setting `retur... | langchainjs/docs/core_docs/docs/modules/memory/types/buffer_memory_chat.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/memory/types/buffer_memory_chat.mdx",
"repo_id": "langchainjs",
"token_count": 187
} | 735 |
from typing import Dict, List, Set, cast
from chromadb.types import EmbeddingRecord, Operation, SeqId, Vector
class Batch:
"""Used to model the set of changes as an atomic operation"""
_ids_to_records: Dict[str, EmbeddingRecord]
_deleted_ids: Set[str]
_written_ids: Set[str]
_upsert_add_ids: Set[... | chroma/chromadb/segment/impl/vector/batch.py/0 | {
"file_path": "chroma/chromadb/segment/impl/vector/batch.py",
"repo_id": "chroma",
"token_count": 1917
} | 20 |
from langchain_community.agent_toolkits.powerbi.chat_base import create_pbi_chat_agent
__all__ = ["create_pbi_chat_agent"]
| langchain/libs/langchain/langchain/agents/agent_toolkits/powerbi/chat_base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/powerbi/chat_base.py",
"repo_id": "langchain",
"token_count": 44
} | 468 |
from langchain_community.tools.google_search.tool import (
GoogleSearchResults,
GoogleSearchRun,
)
__all__ = ["GoogleSearchRun", "GoogleSearchResults"]
| langchain/libs/langchain/langchain/tools/google_search/tool.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/google_search/tool.py",
"repo_id": "langchain",
"token_count": 50
} | 578 |
# coding=utf-8
# Copyright 2021 The Fairseq Authors 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/... | transformers/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py/0 | {
"file_path": "transformers/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py",
"repo_id": "transformers",
"token_count": 36855
} | 704 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/src/transformers/models/gpt_neo/configuration_gpt_neo.py/0 | {
"file_path": "transformers/src/transformers/models/gpt_neo/configuration_gpt_neo.py",
"repo_id": "transformers",
"token_count": 4837
} | 641 |
import { z } from "zod";
import { ChatOpenAI } from "@langchain/openai";
import { createStructuredOutputChainFromZod } from "langchain/chains/openai_functions";
import {
ChatPromptTemplate,
SystemMessagePromptTemplate,
HumanMessagePromptTemplate,
} from "@langchain/core/prompts";
const zodSchema = z.object({
n... | langchainjs/examples/src/chains/openai_functions_structured_generate.ts/0 | {
"file_path": "langchainjs/examples/src/chains/openai_functions_structured_generate.ts",
"repo_id": "langchainjs",
"token_count": 724
} | 821 |
---
sidebar_class_name: node-only
---
# MongoDB Atlas
:::tip Compatibility
Only available on Node.js.
:::
LangChain.js supports MongoDB Atlas as a vector store, and supports both standard similarity search and maximal marginal relevance search,
which takes a combination of documents are most similar to the inputs, t... | langchainjs/docs/core_docs/docs/integrations/vectorstores/mongodb_atlas.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/mongodb_atlas.mdx",
"repo_id": "langchainjs",
"token_count": 852
} | 744 |
insert_performance:
collections:
-
server:
db_config.primary_path: /test/milvus/db_data_8/shards_sift_1m_128_128_l2_insert
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 1
gpu_resource_config.enable: false
gpu_resource_config.search_resou... | milvus/tests/benchmark/milvus_benchmark/suites/shards_insert_performance.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/shards_insert_performance.yaml",
"repo_id": "milvus",
"token_count": 265
} | 2,155 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.