text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
import os from langchain.retrievers import AmazonKendraRetriever from langchain_community.llms.bedrock import Bedrock from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate from langchain_core.pydantic_v1 import BaseModel from langchain_core.runnables import Run...
langchain/templates/rag-aws-kendra/rag_aws_kendra/chain.py/0
{ "file_path": "langchain/templates/rag-aws-kendra/rag_aws_kendra/chain.py", "repo_id": "langchain", "token_count": 518 }
651
// 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/SegmentSealedImpl.h/0
{ "file_path": "milvus/internal/core/src/segcore/SegmentSealedImpl.h", "repo_id": "milvus", "token_count": 4007 }
1,766
{ "embedding_dict": {}, "text_id_to_ref_doc_id": {}, "metadata_dict": {} }
llama_index/llama-index-legacy/storage/default__vector_store.json/0
{ "file_path": "llama_index/llama-index-legacy/storage/default__vector_store.json", "repo_id": "llama_index", "token_count": 32 }
1,614
_type: prompt input_variables: ["adjective"] partial_variables: content: dogs template: Tell me a {adjective} joke about {content}.
langchain/libs/core/tests/unit_tests/examples/simple_prompt.yaml/0
{ "file_path": "langchain/libs/core/tests/unit_tests/examples/simple_prompt.yaml", "repo_id": "langchain", "token_count": 54 }
404
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js"; /* #__PURE__ */ logVersion010MigrationWarning({ oldEntrypointName: "chat_models/portkey", }); export * from "@langchain/community/chat_models/portkey";
langchainjs/langchain/src/chat_models/portkey.ts/0
{ "file_path": "langchainjs/langchain/src/chat_models/portkey.ts", "repo_id": "langchainjs", "token_count": 74 }
900
import os from pathlib import Path import pypdfium2 as pdfium from langchain_community.vectorstores import Chroma from langchain_experimental.open_clip import OpenCLIPEmbeddings def get_images_from_pdf(pdf_path, img_dump_path): """ Extract images from each page of a PDF document and save as JPEG files. ...
langchain/templates/rag-gemini-multi-modal/ingest.py/0
{ "file_path": "langchain/templates/rag-gemini-multi-modal/ingest.py", "repo_id": "langchain", "token_count": 764 }
655
# 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/controlnet/pipeline_controlnet_inpaint.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py", "repo_id": "diffusers", "token_count": 36217 }
239
"""Load Documents from a set of persistent Steamship Files.""" from typing import List, Optional from llama_index.legacy.readers.base import BaseReader from llama_index.legacy.schema import Document class SteamshipFileReader(BaseReader): """Reads persistent Steamship Files and converts them to Documents. A...
llama_index/llama-index-legacy/llama_index/legacy/readers/steamship/file_reader.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/steamship/file_reader.py", "repo_id": "llama_index", "token_count": 1527 }
1,637
# RealFill [RealFill](https://arxiv.org/abs/2309.16668) is a method to personalize text2image inpainting models like stable diffusion inpainting given just a few(1~5) images of a scene. The `train_realfill.py` script shows how to implement the training procedure for stable diffusion inpainting. ## Running locally wi...
diffusers/examples/research_projects/realfill/README.md/0
{ "file_path": "diffusers/examples/research_projects/realfill/README.md", "repo_id": "diffusers", "token_count": 1321 }
213
<jupyter_start><jupyter_text>Datadog Logs>[Datadog](https://www.datadoghq.com/) is a monitoring and analytics platform for cloud-scale applications.This loader fetches the logs from your applications in Datadog using the `datadog_api_client` Python package. You must initialize the loader with your `Datadog API key` and...
langchain/docs/docs/integrations/document_loaders/datadog_logs.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/datadog_logs.ipynb", "repo_id": "langchain", "token_count": 309 }
108
<jupyter_start><jupyter_text>Google BigQuery>[Google BigQuery](https://cloud.google.com/bigquery) is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data.`BigQuery` is a part of the `Google Cloud Platform`.Load a `BigQuery` query with one document per row.<jupyter...
langchain/docs/docs/integrations/document_loaders/google_bigquery.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/google_bigquery.ipynb", "repo_id": "langchain", "token_count": 1289 }
99
import { OpenAI } from "@langchain/openai"; // To enable streaming, we pass in `streaming: true` to the LLM constructor. // Additionally, we pass in a handler for the `handleLLMNewToken` event. const chat = new OpenAI({ streaming: true, callbacks: [ { handleLLMNewToken(token: string) { process.st...
langchainjs/examples/src/models/llm/llm_streaming_stdout.ts/0
{ "file_path": "langchainjs/examples/src/models/llm/llm_streaming_stdout.ts", "repo_id": "langchainjs", "token_count": 324 }
831
package dbmodel import ( "context" _ "ariga.io/atlas-provider-gorm/gormschema" ) //go:generate mockery --name=IMetaDomain type IMetaDomain interface { DatabaseDb(ctx context.Context) IDatabaseDb TenantDb(ctx context.Context) ITenantDb CollectionDb(ctx context.Context) ICollectionDb CollectionMetadataDb(ctx con...
chroma/go/coordinator/internal/metastore/db/dbmodel/common.go/0
{ "file_path": "chroma/go/coordinator/internal/metastore/db/dbmodel/common.go", "repo_id": "chroma", "token_count": 213 }
46
from typing import Optional from .. import Features, NamedSplit from ..packaged_modules.text.text import Text from ..utils.typing import NestedDataStructureLike, PathLike from .abc import AbstractDatasetReader class TextDatasetReader(AbstractDatasetReader): def __init__( self, path_or_paths: Nest...
datasets/src/datasets/io/text.py/0
{ "file_path": "datasets/src/datasets/io/text.py", "repo_id": "datasets", "token_count": 998 }
142
<div style="text-align: center"> <img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/trl_banner_dark.png"> </div> # TRL - Transformer Reinforcement Learning TRL is a full stack library where we provide a set of tools to train transformer language models with Reinforcement...
trl/docs/source/index.mdx/0
{ "file_path": "trl/docs/source/index.mdx", "repo_id": "trl", "token_count": 1414 }
877
export interface OpenAIEndpointConfig { azureOpenAIApiDeploymentName?: string; azureOpenAIApiInstanceName?: string; azureOpenAIApiKey?: string; azureOpenAIBasePath?: string; baseURL?: string | null; } /** * This function generates an endpoint URL for (Azure) OpenAI * based on the configuration parameters p...
langchainjs/libs/langchain-openai/src/utils/azure.ts/0
{ "file_path": "langchainjs/libs/langchain-openai/src/utils/azure.ts", "repo_id": "langchainjs", "token_count": 857 }
1,106
import itertools from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional, Union import pandas as pd import pyarrow as pa import datasets import datasets.config from datasets.features.features import require_storage_cast from datasets.table import table_cast from datasets.utils.py_util...
datasets/src/datasets/packaged_modules/csv/csv.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/csv/csv.py", "repo_id": "datasets", "token_count": 3790 }
146
[project] name = 'candle-nn' requires-python = '>=3.7' authors = [ {name = 'The Candle Team'}, ] dynamic = [ 'description', 'license', 'readme', ] [project.urls] Homepage = 'https://github.com/huggingface/candle' Source = 'https://github.com/huggingface/candle' [build-system] requires = ["maturin>=1....
candle/candle-pyo3/pyproject.toml/0
{ "file_path": "candle/candle-pyo3/pyproject.toml", "repo_id": "candle", "token_count": 285 }
74
"""Test CerebriumAI llm""" from langchain_core.pydantic_v1 import SecretStr from pytest import CaptureFixture, MonkeyPatch from langchain_community.llms.cerebriumai import CerebriumAI def test_api_key_is_secret_string() -> None: llm = CerebriumAI(cerebriumai_api_key="test-cerebriumai-api-key") assert isinst...
langchain/libs/community/tests/unit_tests/llms/test_cerebriumai.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/llms/test_cerebriumai.py", "repo_id": "langchain", "token_count": 437 }
408
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js"; /* #__PURE__ */ logVersion010MigrationWarning({ oldEntrypointName: "vectorstores/chroma", }); export * from "@langchain/community/vectorstores/chroma";
langchainjs/langchain/src/vectorstores/chroma.ts/0
{ "file_path": "langchainjs/langchain/src/vectorstores/chroma.ts", "repo_id": "langchainjs", "token_count": 72 }
949
--- sidebar_label: Mistral AI --- # Mistral AI The `MistralAIEmbeddings` class uses the Mistral AI API to generate embeddings for a given text. ## Setup In order to use the Mistral API you'll need an API key. You can sign up for a Mistral account and create an API key [here](https://console.mistral.ai/). You'll fi...
langchainjs/docs/core_docs/docs/integrations/text_embedding/mistralai.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/text_embedding/mistralai.mdx", "repo_id": "langchainjs", "token_count": 259 }
724
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>OpenGPTs</title> <link rel="stylesheet" href="https://rsms.me/inter/inter.css"> </head> <body> <div id="root"></div> <script type="module" src="/...
opengpts/frontend/index.html/0
{ "file_path": "opengpts/frontend/index.html", "repo_id": "opengpts", "token_count": 154 }
2,058
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
transformers/tests/models/tapas/test_modeling_tapas.py/0
{ "file_path": "transformers/tests/models/tapas/test_modeling_tapas.py", "repo_id": "transformers", "token_count": 22253 }
738
{ "openapi": "3.0.0", "info": { "title": "QuickChart API", "version": "1.0.0", "description": "An API to generate charts and QR codes using QuickChart services." }, "servers": [ { "url": "https://quickchart.io" } ], "paths": { "/chart": { "get": { ...
langchain/libs/community/tests/unit_tests/examples/test_specs/quickchart/apispec.json/0
{ "file_path": "langchain/libs/community/tests/unit_tests/examples/test_specs/quickchart/apispec.json", "repo_id": "langchain", "token_count": 6864 }
383
"""Test DeepSparse wrapper.""" from langchain_community.llms import DeepSparse def test_deepsparse_call() -> None: """Test valid call to DeepSparse.""" config = {"max_generated_tokens": 5, "use_deepsparse_cache": False} llm = DeepSparse( model="zoo:nlg/text_generation/codegen_mono-350m/pytorch/hu...
langchain/libs/community/tests/integration_tests/llms/test_deepsparse.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/llms/test_deepsparse.py", "repo_id": "langchain", "token_count": 207 }
340
from typing import Any from unittest.mock import patch import pytest from llama_index.legacy.core.response.schema import Response from llama_index.legacy.query_engine.cogniswitch_query_engine import ( CogniswitchQueryEngine, ) @pytest.fixture() def query_engine() -> CogniswitchQueryEngine: return Cogniswitch...
llama_index/llama-index-legacy/tests/query_engine/test_cogniswitch_query_engine.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/query_engine/test_cogniswitch_query_engine.py", "repo_id": "llama_index", "token_count": 411 }
1,544
# coding=utf-8 # Copyright 2022 Microsoft Research, 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/lice...
transformers/src/transformers/models/resnet/configuration_resnet.py/0
{ "file_path": "transformers/src/transformers/models/resnet/configuration_resnet.py", "repo_id": "transformers", "token_count": 2286 }
724
# Confident AI ![Confident - Unit Testing for LLMs](https://github.com/confident-ai/deepeval) >[DeepEval](https://confident-ai.com) package for unit testing LLMs. > Using Confident, everyone can build robust language models through faster iterations > using both unit testing and integration testing. We provide suppor...
langchain/docs/docs/integrations/providers/confident.mdx/0
{ "file_path": "langchain/docs/docs/integrations/providers/confident.mdx", "repo_id": "langchain", "token_count": 181 }
143
import torch import torch.distributed from transformers import AutoConfig, AutoTokenizer from typing import Optional, List, Tuple from text_generation_server.models import CausalLM from text_generation_server.models.custom_modeling.phi_modeling import ( PhiConfig, PhiForCausalLM, ) from text_generation_server...
text-generation-inference/server/text_generation_server/models/phi.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/phi.py", "repo_id": "text-generation-inference", "token_count": 961 }
418
# supabase-template ## Get started 0. Make sure you have [Docker](https://www.docker.com/) installed and running 1. Clone this repo 2. Install dependencies, including the Supabase CLI ```bash yarn ``` **Note**: If you install the Supabase CLI using a different method you have to make sure you are on version 1.49.4...
langchain-template-supabase/README.md/0
{ "file_path": "langchain-template-supabase/README.md", "repo_id": "langchain-template-supabase", "token_count": 503 }
69
package proxy import ( "context" "fmt" "strconv" "github.com/cockroachdb/errors" "github.com/golang/protobuf/proto" "go.opentelemetry.io/otel" "go.uber.org/zap" "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" "github.com/milvus-io/milvus/internal/parser/planparserv2" "github.com/milvus-io/milvus/pkg...
milvus/internal/proxy/search_util.go/0
{ "file_path": "milvus/internal/proxy/search_util.go", "repo_id": "milvus", "token_count": 2053 }
1,821
# coding=utf-8 # Copyright 2020-present, AllenAI Authors, University of Illinois Urbana-Champaign, # Intel Nervana Systems and the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
transformers/examples/research_projects/movement-pruning/emmental/modules/binarizer.py/0
{ "file_path": "transformers/examples/research_projects/movement-pruning/emmental/modules/binarizer.py", "repo_id": "transformers", "token_count": 2366 }
538
from typing import Optional, Type from langchain_core.callbacks import CallbackManagerForToolRun from langchain_core.pydantic_v1 import BaseModel, Field from langchain_core.tools import BaseTool from langchain_community.tools.file_management.utils import ( INVALID_PATH_TEMPLATE, BaseFileToolMixin, FileVal...
langchain/libs/community/langchain_community/tools/file_management/read.py/0
{ "file_path": "langchain/libs/community/langchain_community/tools/file_management/read.py", "repo_id": "langchain", "token_count": 545 }
289
"""Document summary index.""" from llama_index.legacy.indices.document_summary.base import ( DocumentSummaryIndex, GPTDocumentSummaryIndex, ) from llama_index.legacy.indices.document_summary.retrievers import ( DocumentSummaryIndexEmbeddingRetriever, DocumentSummaryIndexLLMRetriever, DocumentSummar...
llama_index/llama-index-legacy/llama_index/legacy/indices/document_summary/__init__.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/document_summary/__init__.py", "repo_id": "llama_index", "token_count": 186 }
1,560
import enum import uuid from datetime import timedelta from typing import Any, Dict, List, Optional from llama_index.legacy.constants import DEFAULT_EMBEDDING_DIM from llama_index.legacy.schema import BaseNode, MetadataMode, TextNode from llama_index.legacy.vector_stores.types import ( MetadataFilters, VectorS...
llama_index/llama-index-legacy/llama_index/legacy/vector_stores/timescalevector.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/vector_stores/timescalevector.py", "repo_id": "llama_index", "token_count": 4371 }
1,726
# 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/kandinsky/pipeline_kandinsky_prior.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py", "repo_id": "diffusers", "token_count": 10623 }
257
# ECA-ResNet An **ECA ResNet** is a variant on a [ResNet](https://paperswithcode.com/method/resnet) that utilises an [Efficient Channel Attention module](https://paperswithcode.com/method/efficient-channel-attention). Efficient Channel Attention is an architectural unit based on [squeeze-and-excitation blocks](https:/...
pytorch-image-models/docs/models/ecaresnet.md/0
{ "file_path": "pytorch-image-models/docs/models/ecaresnet.md", "repo_id": "pytorch-image-models", "token_count": 3638 }
367
import usearch from "usearch"; import * as uuid from "uuid"; import type { EmbeddingsInterface } from "@langchain/core/embeddings"; import { SaveableVectorStore } from "@langchain/core/vectorstores"; import { Document } from "@langchain/core/documents"; import { SynchronousInMemoryDocstore } from "../stores/doc/in_memo...
langchainjs/libs/langchain-community/src/vectorstores/usearch.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/vectorstores/usearch.ts", "repo_id": "langchainjs", "token_count": 2633 }
1,012
<!-- 著作権 2023 The HuggingFace Team。全著作権所有。 Apache License、Version 2.0(以下「ライセンス」と呼びます)に基づくライセンスで、 ライセンスに従わない限り、このファイルを使用できません。 ライセンスのコピーは以下から入手できます: http://www.apache.org/licenses/LICENSE-2.0 適用法に従うか、書面による同意がある限り、ライセンスの下でソフトウェアは配布されます。 ライセンスに基づく特定の言語での条件を確認するか、ライセンスを参照してください。 このファイルはMarkdown形式ですが、doc-builder(MDXに類似した...
transformers/docs/source/ja/autoclass_tutorial.md/0
{ "file_path": "transformers/docs/source/ja/autoclass_tutorial.md", "repo_id": "transformers", "token_count": 3579 }
476
python_tests()
llama_index/llama-index-integrations/tools/llama-index-tools-yelp/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-yelp/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,643
// Code generated by mockery v2.32.4. DO NOT EDIT. package mocks import ( context "context" commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" clientv3 "go.etcd.io/etcd/client/v3" federpb "github.com/milvus-io/milvus-proto/go-api/v2/federpb" internalpb "github.com/milvus-io/milvus/internal/proto/...
milvus/internal/mocks/mock_proxy.go/0
{ "file_path": "milvus/internal/mocks/mock_proxy.go", "repo_id": "milvus", "token_count": 78207 }
1,802
import { logVersion010MigrationWarning } from "../../../util/entrypoint_deprecation.js"; /* #__PURE__ */ logVersion010MigrationWarning({ oldEntrypointName: "agents/toolkits/connery", }); export * from "@langchain/community/agents/toolkits/connery";
langchainjs/langchain/src/agents/toolkits/connery/index.ts/0
{ "file_path": "langchainjs/langchain/src/agents/toolkits/connery/index.ts", "repo_id": "langchainjs", "token_count": 80 }
855
poetry_requirements( name="poetry", )
llama_index/llama-index-integrations/embeddings/llama-index-embeddings-openai/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-openai/BUILD", "repo_id": "llama_index", "token_count": 18 }
1,237
// 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/distributed/proxy/client/client_test.go/0
{ "file_path": "milvus/internal/distributed/proxy/client/client_test.go", "repo_id": "milvus", "token_count": 5761 }
1,708
# coding=utf-8 # Copyright 2021 The EleutherAI and HuggingFace Teams. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
transformers/src/transformers/models/gptj/configuration_gptj.py/0
{ "file_path": "transformers/src/transformers/models/gptj/configuration_gptj.py", "repo_id": "transformers", "token_count": 3773 }
642
poetry_requirements( name="poetry", ) python_requirements( name="reqs", )
llama_index/llama-index-integrations/readers/llama-index-readers-asana/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-asana/BUILD", "repo_id": "llama_index", "token_count": 36 }
1,291
"""Load prompts.""" import json import logging from pathlib import Path from typing import Callable, Dict, Union import yaml from langchain_core.output_parsers.string import StrOutputParser from langchain_core.prompts.base import BasePromptTemplate from langchain_core.prompts.chat import ChatPromptTemplate from langc...
langchain/libs/core/langchain_core/prompts/loading.py/0
{ "file_path": "langchain/libs/core/langchain_core/prompts/loading.py", "repo_id": "langchain", "token_count": 2483 }
394
"""Mock utils.""" import re from typing import List, Optional, Set from llama_index.legacy.indices.keyword_table.utils import ( simple_extract_keywords, ) def mock_tokenizer(text: str) -> List[str]: """Mock tokenizer.""" tokens = re.split(r"[ \n]", text) # split by space or newline result = [] ...
llama_index/llama-index-legacy/tests/mock_utils/mock_utils.py/0
{ "file_path": "llama_index/llama-index-legacy/tests/mock_utils/mock_utils.py", "repo_id": "llama_index", "token_count": 310 }
1,562
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/training/text2image.md/0
{ "file_path": "diffusers/docs/source/en/training/text2image.md", "repo_id": "diffusers", "token_count": 4032 }
196
from llama_index.readers.chatgpt_plugin.base import ChatGPTRetrievalPluginReader __all__ = ["ChatGPTRetrievalPluginReader"]
llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/llama_index/readers/chatgpt_plugin/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-chatgpt-plugin/llama_index/readers/chatgpt_plugin/__init__.py", "repo_id": "llama_index", "token_count": 42 }
1,474
# HRNet **HRNet**, or **High-Resolution Net**, is a general purpose convolutional neural network for tasks like semantic segmentation, object detection and image classification. It is able to maintain high resolution representations through the whole process. We start from a high-resolution convolution stream, gradual...
pytorch-image-models/docs/models/.templates/models/hrnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/hrnet.md", "repo_id": "pytorch-image-models", "token_count": 4240 }
344
# coding=utf-8 # Copyright 2018 Salesforce and 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 a...
transformers/tests/models/phobert/test_tokenization_phobert.py/0
{ "file_path": "transformers/tests/models/phobert/test_tokenization_phobert.py", "repo_id": "transformers", "token_count": 1168 }
745
import logging from typing import List from llama_index.core.readers.base import BaseReader from llama_index.core.schema import Document logger = logging.getLogger(__file__) class UnstructuredURLLoader(BaseReader): """Loader that uses unstructured to load HTML files.""" def __init__( self, urls: Li...
llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/unstructured_web/base.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/unstructured_web/base.py", "repo_id": "llama_index", "token_count": 1030 }
1,471
import torch import grpc from google.rpc import status_pb2, code_pb2 from grpc_status import rpc_status from grpc_interceptor.server import AsyncServerInterceptor from loguru import logger from typing import Callable, Any class ExceptionInterceptor(AsyncServerInterceptor): async def intercept( self, ...
text-generation-inference/server/text_generation_server/interceptor.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/interceptor.py", "repo_id": "text-generation-inference", "token_count": 449 }
442
<jupyter_start><jupyter_text>Joint QA Summary Query Engine If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-llms-openai !pip install llama-index import nest_asyncio nest_asyncio.apply() import logging import sys logging.basicConfig(stream...
llama_index/docs/examples/query_engine/JointQASummary.ipynb/0
{ "file_path": "llama_index/docs/examples/query_engine/JointQASummary.ipynb", "repo_id": "llama_index", "token_count": 831 }
1,207
# docstyle-ignore INSTALL_CONTENT = """ # Diffusers installation ! pip install diffusers transformers datasets accelerate # To install from source instead of the last release, comment the command above and uncomment the following one. # ! pip install git+https://github.com/huggingface/diffusers.git """ notebook_first_...
diffusers/docs/source/_config.py/0
{ "file_path": "diffusers/docs/source/_config.py", "repo_id": "diffusers", "token_count": 102 }
173
// File from https://github.com/mlpen/YOSO/blob/main/encoders/backbones/efficient_attentions/yoso/yoso_v1/cuda/fast_lsh_cumulation_cuda.cu #include "fast_lsh_cumulation_cuda.h" #include "common_cuda_device.h" #include "common_cuda.h" #include "common.h" #include <stdio.h> //////////////////////////////////////////////...
transformers/src/transformers/kernels/yoso/fast_lsh_cumulation_cuda.cu/0
{ "file_path": "transformers/src/transformers/kernels/yoso/fast_lsh_cumulation_cuda.cu", "repo_id": "transformers", "token_count": 14407 }
577
import { describe, expect, jest, test } from "@jest/globals"; import { Document } from "@langchain/core/documents"; import { FakeEmbeddings } from "@langchain/core/utils/testing"; import { MemoryVectorStore } from "../../vectorstores/memory.js"; import { BUFFER_IDX, LAST_ACCESSED_AT_KEY, TimeWeightedVectorStoreRe...
langchainjs/langchain/src/retrievers/tests/time_weighted.test.ts/0
{ "file_path": "langchainjs/langchain/src/retrievers/tests/time_weighted.test.ts", "repo_id": "langchainjs", "token_count": 4730 }
920
<p align="center"> <br> <img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/> <br> <p> <p align="center"> <a href="https://badge.fury.io/py/tokenizers"> <img alt="Build" src="https://badge.fury.io/py/tokenizers.svg"> </a> <a href="https://github.c...
tokenizers/bindings/python/README.md/0
{ "file_path": "tokenizers/bindings/python/README.md", "repo_id": "tokenizers", "token_count": 1621 }
401
from __future__ import annotations from typing import TYPE_CHECKING, Tuple from langchain.chains.query_constructor.ir import ( Comparator, Comparison, Operation, Operator, StructuredQuery, Visitor, ) if TYPE_CHECKING: from qdrant_client.http import models as rest class QdrantTranslator(...
langchain/libs/langchain/langchain/retrievers/self_query/qdrant.py/0
{ "file_path": "langchain/libs/langchain/langchain/retrievers/self_query/qdrant.py", "repo_id": "langchain", "token_count": 1398 }
536
/****************************************************************************** * Copyright (c) 2023, Tri Dao. ******************************************************************************/ #pragma once #include <cute/algorithm/copy.hpp> #include <cutlass/cutlass.h> #include <cutlass/array.h> #include <cutlass/nu...
candle/candle-flash-attn/kernels/flash_fwd_kernel.h/0
{ "file_path": "candle/candle-flash-attn/kernels/flash_fwd_kernel.h", "repo_id": "candle", "token_count": 16384 }
53
from llama_index.readers.file.tabular.base import CSVReader, PandasCSVReader __all__ = ["CSVReader", "PandasCSVReader"]
llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/tabular/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/tabular/__init__.py", "repo_id": "llama_index", "token_count": 43 }
1,352
from dataclasses import dataclass from typing import List, Optional, Union import numpy as np import PIL.Image from ...utils import BaseOutput @dataclass class IFPipelineOutput(BaseOutput): """ Args: Output class for Stable Diffusion pipelines. images (`List[PIL.Image.Image]` or `np.ndarray`) ...
diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py", "repo_id": "diffusers", "token_count": 409 }
246
<!--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/bit.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bit.md", "repo_id": "transformers", "token_count": 1005 }
478
# Copyright 2024 The InstructPix2Pix Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py", "repo_id": "diffusers", "token_count": 18757 }
257
--- sidebar_label: Mistral AI --- import CodeBlock from "@theme/CodeBlock"; # ChatMistralAI [Mistral AI](https://mistral.ai/) is a research organization and hosting platform for LLMs. They're most known for their family of 7B models ([`mistral7b` // `mistral-tiny`](https://mistral.ai/news/announcing-mistral-7b/), [`...
langchainjs/docs/core_docs/docs/integrations/chat/mistral.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/chat/mistral.mdx", "repo_id": "langchainjs", "token_count": 734 }
723
import os from dataclasses import dataclass from pathlib import Path from typing import Dict, Optional, Union import fsspec from llama_index.core.constants import ( DOC_STORE_KEY, GRAPH_STORE_KEY, INDEX_STORE_KEY, VECTOR_STORE_KEY, ) from llama_index.core.graph_stores.simple import ( DEFAULT_PERSIS...
llama_index/llama-index-core/llama_index/core/storage/storage_context.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/storage/storage_context.py", "repo_id": "llama_index", "token_count": 3989 }
1,180
# Additional Readings [[additional-readings]] These are **optional readings** if you want to go deeper. ## PPO Explained - [Towards Delivering a Coherent Self-Contained Explanation of Proximal Policy Optimization by Daniel Bick](https://fse.studenttheses.ub.rug.nl/25709/1/mAI_2021_BickD.pdf) - [What is the way to un...
deep-rl-class/units/en/unit8/additional-readings.mdx/0
{ "file_path": "deep-rl-class/units/en/unit8/additional-readings.mdx", "repo_id": "deep-rl-class", "token_count": 418 }
174
{ "name": "create-wasm-app", "version": "0.1.0", "description": "create an app to consume rust-generated wasm packages", "main": "index.js", "bin": { "create-wasm-app": ".bin/create-wasm-app.js" }, "scripts": { "build": "webpack --config webpack.config.js", "start": "...
tokenizers/tokenizers/examples/unstable_wasm/www/package.json/0
{ "file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/package.json", "repo_id": "tokenizers", "token_count": 516 }
416
"""test Databricks LLM""" import pickle from typing import Any, Dict from pytest import MonkeyPatch from langchain_community.llms.databricks import Databricks class MockDatabricksServingEndpointClient: def __init__( self, host: str, api_token: str, endpoint_name: str, dat...
langchain/libs/community/tests/unit_tests/llms/test_databricks.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/llms/test_databricks.py", "repo_id": "langchain", "token_count": 550 }
401
"""Wrapper around Konko AI's Completion API.""" import logging import warnings from typing import Any, Dict, List, Optional from langchain_core.callbacks import ( AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun, ) from langchain_core.language_models.llms import LLM from langchain_core.pydantic_v1 impor...
langchain/libs/community/langchain_community/llms/konko.py/0
{ "file_path": "langchain/libs/community/langchain_community/llms/konko.py", "repo_id": "langchain", "token_count": 2804 }
278
/// MIT License // // Copyright (c) 2020 hatoo // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merg...
text-generation-inference/benchmark/src/utils.rs/0
{ "file_path": "text-generation-inference/benchmark/src/utils.rs", "repo_id": "text-generation-inference", "token_count": 600 }
393
// Code generated by mockery v2.32.4. DO NOT EDIT. package mqwrapper import mock "github.com/stretchr/testify/mock" // MockMessageID is an autogenerated mock type for the MessageID type type MockMessageID struct { mock.Mock } type MockMessageID_Expecter struct { mock *mock.Mock } func (_m *MockMessageID) EXPECT(...
milvus/pkg/mq/msgstream/mqwrapper/mock_id.go/0
{ "file_path": "milvus/pkg/mq/msgstream/mqwrapper/mock_id.go", "repo_id": "milvus", "token_count": 2351 }
1,825
// Code generated by mockery v2.16.0. DO NOT EDIT. package server import mock "github.com/stretchr/testify/mock" // MockRocksMQ is an autogenerated mock type for the RocksMQ type type MockRocksMQ struct { mock.Mock } type MockRocksMQ_Expecter struct { mock *mock.Mock } func (_m *MockRocksMQ) EXPECT() *MockRocksM...
milvus/internal/mq/mqimpl/rocksmq/server/mock_rocksmq.go/0
{ "file_path": "milvus/internal/mq/mqimpl/rocksmq/server/mock_rocksmq.go", "repo_id": "milvus", "token_count": 6674 }
1,815
from llama_index.core.tools.tool_spec.base import BaseToolSpec from llama_index.tools.waii import WaiiToolSpec def test_class(): names_of_base_classes = [b.__name__ for b in WaiiToolSpec.__mro__] assert BaseToolSpec.__name__ in names_of_base_classes
llama_index/llama-index-integrations/tools/llama-index-tools-waii/tests/test_tools_waii.py/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-waii/tests/test_tools_waii.py", "repo_id": "llama_index", "token_count": 94 }
1,502
import argparse import io import requests import torch import yaml from diffusers import AutoencoderKL from diffusers.pipelines.stable_diffusion.convert_from_ckpt import ( assign_to_checkpoint, conv_attn_to_linear, create_vae_diffusers_config, renew_vae_attention_paths, renew_vae_resnet_paths, ) ...
diffusers/scripts/convert_vae_pt_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_vae_pt_to_diffusers.py", "repo_id": "diffusers", "token_count": 3153 }
219
--- sidebar_position: 2 --- # Text embedding models :::info Head to [Integrations](/docs/integrations/text_embedding) for documentation on built-in integrations with text embedding providers. ::: The Embeddings class is a class designed for interfacing with text embedding models. There are lots of embedding model pr...
langchainjs/docs/core_docs/docs/modules/data_connection/text_embedding/index.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/text_embedding/index.mdx", "repo_id": "langchainjs", "token_count": 3377 }
812
# Copyright 2024 NVIDIA and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
diffusers/src/diffusers/schedulers/deprecated/scheduling_karras_ve.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_karras_ve.py", "repo_id": "diffusers", "token_count": 4089 }
238
"""Unit tests to verify function of the Riva ASR implementation.""" from typing import TYPE_CHECKING, Any, Generator from unittest.mock import patch import pytest from langchain_community.utilities.nvidia_riva import ( AudioStream, RivaASR, RivaAudioEncoding, ) if TYPE_CHECKING: import riva.client ...
langchain/libs/community/tests/unit_tests/utilities/test_nvidia_riva_asr.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/utilities/test_nvidia_riva_asr.py", "repo_id": "langchain", "token_count": 2151 }
416
import * as fs from "node:fs/promises"; import { mkdtempSync } from "node:fs"; import { join } from "node:path"; import { BaseFileStore } from "./base.js"; /** * Specific implementation of the `BaseFileStore` class for Node.js. * Provides methods to read and write files in a specific base path. */ export class Nod...
langchainjs/langchain/src/stores/file/node.ts/0
{ "file_path": "langchainjs/langchain/src/stores/file/node.ts", "repo_id": "langchainjs", "token_count": 367 }
952
import os from dataclasses import dataclass, field from io import BytesIO from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Union import numpy as np import pyarrow as pa from .. import config from ..download.download_config import DownloadConfig from ..download.streaming_download_manager import xopen, ...
datasets/src/datasets/features/audio.py/0
{ "file_path": "datasets/src/datasets/features/audio.py", "repo_id": "datasets", "token_count": 5335 }
140
"""ChatGPT Plugiun Tool.""" from typing import List, Optional import requests from llama_index.core.schema import Document from llama_index.core.tools.tool_spec.base import BaseToolSpec from llama_index.tools.openapi.base import OpenAPIToolSpec class ChatGPTPluginToolSpec(BaseToolSpec): """ChatGPT Plugin Tool. ...
llama_index/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/llama_index/tools/chatgpt_plugin/base.py/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/llama_index/tools/chatgpt_plugin/base.py", "repo_id": "llama_index", "token_count": 929 }
1,434
from __future__ import annotations from typing import Iterator, List import requests from langchain_core.documents import Document from langchain_community.document_loaders.base import BaseLoader class ToMarkdownLoader(BaseLoader): """Load `HTML` using `2markdown API`.""" def __init__(self, url: str, api_...
langchain/libs/community/langchain_community/document_loaders/tomarkdown.py/0
{ "file_path": "langchain/libs/community/langchain_community/document_loaders/tomarkdown.py", "repo_id": "langchain", "token_count": 391 }
261
# Select by similarity This object selects examples based on similarity to the inputs. It does this by finding the examples with the embeddings that have the greatest cosine similarity with the inputs. import CodeBlock from "@theme/CodeBlock"; import ExampleSimilarity from "@examples/prompts/semantic_similarity_examp...
langchainjs/docs/core_docs/docs/modules/model_io/prompts/example_selector_types/similarity.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/model_io/prompts/example_selector_types/similarity.mdx", "repo_id": "langchainjs", "token_count": 651 }
772
<jupyter_start><jupyter_text>Benchmarking RAG Pipelines With A `LabelledRagDatatset`The `LabelledRagDataset` is meant to be used for evaluating any given RAG pipeline, for which there could be several configurations (i.e. choosing the `LLM`, values for the `similarity_top_k`, `chunk_size`, and others). We've likened th...
llama_index/docs/examples/llama_dataset/labelled-rag-datasets.ipynb/0
{ "file_path": "llama_index/docs/examples/llama_dataset/labelled-rag-datasets.ipynb", "repo_id": "llama_index", "token_count": 1675 }
1,106
from typing import Any from llama_index.legacy.callbacks.base_handler import BaseCallbackHandler def argilla_callback_handler(**kwargs: Any) -> BaseCallbackHandler: try: # lazy import from argilla_llama_index import ArgillaCallbackHandler except ImportError: raise ImportError("Please ...
llama_index/llama-index-legacy/llama_index/legacy/callbacks/argilla_callback.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/callbacks/argilla_callback.py", "repo_id": "llama_index", "token_count": 132 }
1,548
import { BaseChatModel, type BaseChatModelParams, } from "@langchain/core/language_models/chat_models"; import { AIMessage, type BaseMessage, ChatMessage, } from "@langchain/core/messages"; import { type ChatResult } from "@langchain/core/outputs"; import { type CallbackManagerForLLMRun } from "@langchain/cor...
langchainjs/libs/langchain-community/src/chat_models/alibaba_tongyi.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/chat_models/alibaba_tongyi.ts", "repo_id": "langchainjs", "token_count": 5271 }
991
from langchain.schema.document import __all__ EXPECTED_ALL = ["BaseDocumentTransformer", "Document"] def test_all_imports() -> None: assert set(__all__) == set(EXPECTED_ALL)
langchain/libs/langchain/tests/unit_tests/schema/test_document.py/0
{ "file_path": "langchain/libs/langchain/tests/unit_tests/schema/test_document.py", "repo_id": "langchain", "token_count": 63 }
616
import { expect, test } from "@jest/globals"; import { Voy as VoyOriginClient } from "voy-search"; import { OpenAIEmbeddings } from "@langchain/openai"; import { Document } from "@langchain/core/documents"; import { VoyVectorStore } from "../voy.js"; const client = new VoyOriginClient(); test("it can create index usi...
langchainjs/libs/langchain-community/src/vectorstores/tests/voy.int.test.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/voy.int.test.ts", "repo_id": "langchainjs", "token_count": 517 }
1,090
<!--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...
peft/docs/source/developer_guides/contributing.md/0
{ "file_path": "peft/docs/source/developer_guides/contributing.md", "repo_id": "peft", "token_count": 1564 }
336
# The Pyramid environment The goal in this environment is to train our agent to **get the gold brick on the top of the Pyramid. To do that, it needs to press a button to spawn a Pyramid, navigate to the Pyramid, knock it over, and move to the gold brick at the top**. <img src="https://huggingface.co/datasets/huggingf...
deep-rl-class/units/en/unit5/pyramids.mdx/0
{ "file_path": "deep-rl-class/units/en/unit5/pyramids.mdx", "repo_id": "deep-rl-class", "token_count": 645 }
161
from typing import Optional from llama_index.core.storage.docstore.keyval_docstore import KVDocumentStore from llama_index.core.storage.docstore.types import DEFAULT_BATCH_SIZE from llama_index.storage.kvstore.postgres import PostgresKVStore class PostgresDocumentStore(KVDocumentStore): """Mongo Document (Node) ...
llama_index/llama-index-integrations/storage/docstore/llama-index-storage-docstore-postgres/llama_index/storage/docstore/postgres/base.py/0
{ "file_path": "llama_index/llama-index-integrations/storage/docstore/llama-index-storage-docstore-postgres/llama_index/storage/docstore/postgres/base.py", "repo_id": "llama_index", "token_count": 1136 }
1,551
# LangChain Agents with LangSmith [![Open In GitHub](https://img.shields.io/badge/GitHub-View%20source-green.svg)](https://github.com/langchain-ai/langsmith-cookbook/tree/main/./feedback-examples/streamlit-agent/README.md) This streamlit walkthrough shows how to instrument a LangChain agent with tracing and feedback...
langsmith-cookbook/feedback-examples/streamlit-agent/README.md/0
{ "file_path": "langsmith-cookbook/feedback-examples/streamlit-agent/README.md", "repo_id": "langsmith-cookbook", "token_count": 476 }
1,010
python_sources()
llama_index/llama-index-integrations/tools/llama-index-tools-bing-search/llama_index/tools/bing_search/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-bing-search/llama_index/tools/bing_search/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,433
python_sources()
llama_index/llama-index-legacy/llama_index/legacy/agent/BUILD/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,551
<!--- 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 ...
transformers/examples/pytorch/token-classification/README.md/0
{ "file_path": "transformers/examples/pytorch/token-classification/README.md", "repo_id": "transformers", "token_count": 1430 }
555
package writebuffer import ( "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" "github.com/milvus-io/milvus-proto/go-api/v2/msgpb" "github.com/milvus-io/milvus/internal/datanode/metacache" "github.com/milvus-io/milvus/internal/datanode/syncmgr" "github.com/milvus-io/milvus/internal/storage" "github.com/milv...
milvus/internal/datanode/writebuffer/bf_write_buffer.go/0
{ "file_path": "milvus/internal/datanode/writebuffer/bf_write_buffer.go", "repo_id": "milvus", "token_count": 1450 }
1,783
import { ChatCohere } from "@langchain/cohere"; import { HumanMessage } from "@langchain/core/messages"; const model = new ChatCohere({ apiKey: process.env.COHERE_API_KEY, // Default model: "command", // Default }); const response = await model.invoke( [new HumanMessage("How tall are the largest pengiuns?")], ...
langchainjs/examples/src/models/chat/cohere/connectors.ts/0
{ "file_path": "langchainjs/examples/src/models/chat/cohere/connectors.ts", "repo_id": "langchainjs", "token_count": 3308 }
820
package types import ( "math" "github.com/google/uuid" ) type Timestamp = int64 const MaxTimestamp = Timestamp(math.MaxInt64) type UniqueID uuid.UUID func NewUniqueID() UniqueID { return UniqueID(uuid.New()) } func (id UniqueID) String() string { return uuid.UUID(id).String() } func MustParse(s string) Uniq...
chroma/go/coordinator/internal/types/types.go/0
{ "file_path": "chroma/go/coordinator/internal/types/types.go", "repo_id": "chroma", "token_count": 380 }
51
python_tests()
llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,610