From ddd7919f6a46959e887c8bba719155001b56f0d0 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Wed, 14 Aug 2024 07:14:24 -0700 Subject: [PATCH] docs[patch]: Add conceptual guide links to integration index pages (#25387) --- docs/docs/integrations/chat/index.mdx | 2 ++ docs/docs/integrations/llms/index.mdx | 16 ++++++++-------- docs/docs/integrations/text_embedding/index.mdx | 4 ++++ docs/docs/integrations/vectorstores/index.mdx | 2 ++ docs/scripts/tool_feat_table.py | 4 ++++ 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/docs/integrations/chat/index.mdx b/docs/docs/integrations/chat/index.mdx index c30c33207a5..5ccb0fa13ff 100644 --- a/docs/docs/integrations/chat/index.mdx +++ b/docs/docs/integrations/chat/index.mdx @@ -6,6 +6,8 @@ keywords: [compatibility] # Chat models +[Chat models](/docs/concepts/#chat-models) are language models that use a sequence of [messages](/docs/concepts/#messages) as inputs and return messages as outputs (as opposed to using plain text). These are generally newer models. + :::info If you'd like to write your own chat model, see [this how-to](/docs/how_to/custom_chat_model/). diff --git a/docs/docs/integrations/llms/index.mdx b/docs/docs/integrations/llms/index.mdx index 3d8869f235f..973b09c360f 100644 --- a/docs/docs/integrations/llms/index.mdx +++ b/docs/docs/integrations/llms/index.mdx @@ -6,6 +6,14 @@ keywords: [compatibility] # LLMs +:::caution +You are currently on a page documenting the use of [text completion models](/docs/concepts/#llms). Many of the latest and most popular models are [chat completion models](/docs/concepts/#chat-models). + +Unless you are specifically using more advanced prompting techniques, you are probably looking for [this page instead](/docs/integrations/chat/). +::: + +[LLMs](docs/concepts/#llms) are language models that take a string as input and return a string as output. + :::info If you'd like to write your own LLM, see [this how-to](/docs/how_to/custom_llm/). @@ -13,14 +21,6 @@ If you'd like to contribute an integration, see [Contributing integrations](/doc ::: -## Features (natively supported) -All LLMs implement the Runnable interface, which comes with default implementations of all methods, ie. `ainvoke`, `batch`, `abatch`, `stream`, `astream`. This gives all LLMs basic support for async, streaming and batch, which by default is implemented as below: -- *Async* support defaults to calling the respective sync method in asyncio's default thread pool executor. This lets other async functions in your application make progress while the LLM is being executed, by moving this call to a background thread. -- *Streaming* support defaults to returning an `Iterator` (or `AsyncIterator` in the case of async streaming) of a single value, the final result returned by the underlying LLM provider. This obviously doesn't give you token-by-token streaming, which requires native support from the LLM provider, but ensures your code that expects an iterator of tokens can work for any of our LLM integrations. -- *Batch* support defaults to calling the underlying LLM in parallel for each input by making use of a thread pool executor (in the sync batch case) or `asyncio.gather` (in the async batch case). The concurrency can be controlled with the `max_concurrency` key in `RunnableConfig`. - -Each LLM integration can optionally provide native implementations for async, streaming or batch, which, for providers that support it, can be more efficient. The table shows, for each integration, which features have been implemented with native support. - import { CategoryTable, IndexTable } from "@theme/FeatureTables"; diff --git a/docs/docs/integrations/text_embedding/index.mdx b/docs/docs/integrations/text_embedding/index.mdx index 2b10fd3605b..5e4fd4908f7 100644 --- a/docs/docs/integrations/text_embedding/index.mdx +++ b/docs/docs/integrations/text_embedding/index.mdx @@ -7,6 +7,10 @@ sidebar_class_name: hidden import { CategoryTable, IndexTable } from "@theme/FeatureTables"; +[Embedding models](/docs/concepts#embedding-models) create a vector representation of a piece of text. + +This page documents integrations with various model providers that allow you to use embeddings in LangChain. + ## All embedding models diff --git a/docs/docs/integrations/vectorstores/index.mdx b/docs/docs/integrations/vectorstores/index.mdx index 02622072a55..cc4d33418de 100644 --- a/docs/docs/integrations/vectorstores/index.mdx +++ b/docs/docs/integrations/vectorstores/index.mdx @@ -7,6 +7,8 @@ sidebar_class_name: hidden import { CategoryTable, IndexTable } from "@theme/FeatureTables"; +A [vector store](/docs/concepts/#vector-stores) stores [embedded](/docs/concepts/#embedding-models) data and performs similarity search. + ## All Vectorstores diff --git a/docs/scripts/tool_feat_table.py b/docs/scripts/tool_feat_table.py index a6a5876f7d6..5072e30b36e 100644 --- a/docs/scripts/tool_feat_table.py +++ b/docs/scripts/tool_feat_table.py @@ -173,6 +173,10 @@ custom_edit_url: # Tools +[Tools](/docs/concepts/#tools) are utilities designed to be called by a model: their inputs are designed to be generated by models, and their outputs are designed to be passed back to models. + +A [toolkit](/docs/concepts#toolkits) is a collection of tools meant to be used together. + :::info If you'd like to write your own tool, see [this how-to](/docs/how_to/custom_tools/).