docs[patch]: Add conceptual guide links to integration index pages (#25387)

This commit is contained in:
Jacob Lee 2024-08-14 07:14:24 -07:00 committed by GitHub
parent 493e474063
commit ddd7919f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 8 deletions

View File

@ -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/).

View File

@ -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";
<CategoryTable category="llms" />

View File

@ -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.
<CategoryTable category="text_embedding" />
## All embedding models

View File

@ -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.
<CategoryTable category="vectorstores" />
## All Vectorstores

View File

@ -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/).