docs: added community modules descriptions (#17827)

API Reference: Several `community` modules (like
[adapter](https://api.python.langchain.com/en/latest/community_api_reference.html#module-langchain_community.adapters)
module) are missing descriptions. It happens when langchain was split to
the core, langchain and community packages.
- Copied module descriptions from other packages
- Fixed several descriptions to the consistent format.
This commit is contained in:
Leonid Ganeline 2024-02-21 16:18:36 -08:00 committed by GitHub
parent 5019951a5d
commit ed0b7c3b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 64 additions and 25 deletions

View File

@ -0,0 +1,8 @@
"""**Adapters** are used to adapt LangChain models to other APIs.
LangChain integrates with many model providers.
While LangChain has its own message and model APIs,
LangChain has also made it as easy as
possible to explore other models by exposing an **adapter** to adapt LangChain
models to the other APIs, as to the OpenAI API.
"""

View File

@ -1,17 +1,5 @@
"""Agent toolkits contain integrations with various resources and services.
LangChain has a large ecosystem of integrations with various external resources
like local and remote file systems, APIs and databases.
These integrations allow developers to create versatile applications that combine the
power of LLMs with the ability to access, interact with and manipulate external
resources.
When developing an application, developers should inspect the capabilities and
permissions of the tools that underlie the given agent toolkit, and determine
whether permissions of the given toolkit are appropriate for the application.
See [Security](https://python.langchain.com/docs/security) for more information.
"""**Toolkits** are sets of tools that can be used to interact with
various services and APIs.
"""
from langchain_community.agent_toolkits.ainetwork.toolkit import AINetworkToolkit
from langchain_community.agent_toolkits.amadeus.toolkit import AmadeusToolkit

View File

@ -1,3 +1,20 @@
"""**Chat message history** stores a history of the message interactions in a chat.
**Class hierarchy:**
.. code-block::
BaseChatMessageHistory --> <name>ChatMessageHistory # Examples: FileChatMessageHistory, PostgresChatMessageHistory
**Main helpers:**
.. code-block::
AIMessage, HumanMessage, BaseMessage
""" # noqa: E501
from langchain_community.chat_message_histories.astradb import (
AstraDBChatMessageHistory,
)

View File

@ -1,4 +1,11 @@
"""Logic for selecting examples to include in prompts."""
"""**Example selector** implements logic for selecting examples to include them
in prompts.
This allows us to select examples that are most relevant to the input.
There could be multiple strategies for selecting examples. For example, one could
select examples based on the similarity of the input to the examples. Another
strategy could be to select examples based on the diversity of the examples.
"""
from langchain_community.example_selectors.ngram_overlap import (
NGramOverlapExampleSelector,
ngram_overlap_score,

View File

@ -0,0 +1,13 @@
"""**Index** is used to avoid writing duplicated content
into the vectostore and to avoid over-writing content if it's unchanged.
Indexes also :
* Create knowledge graphs from data.
* Support indexing workflows from LangChain data loaders to vectorstores.
Importantly, Index keeps on working even if the content being written is derived
via a set of transformations from some source content (e.g., indexing children
documents that were derived from parent documents by chunking.)
"""

View File

@ -1,10 +1,18 @@
"""Implementations of key-value stores and storage helpers.
"""**Storage** is an implementation of key-value store.
Module provides implementations of various key-value stores that conform
Storage module provides implementations of various key-value stores that conform
to a simple key-value interface.
The primary goal of these storages is to support implementation of caching.
"""
The primary goal of these storages is to support caching.
**Class hierarchy:**
.. code-block::
BaseStore --> <name>Store # Examples: MongoDBStore, RedisStore
""" # noqa: E501
from langchain_community.storage.astradb import (
AstraDBByteStore,

View File

@ -1,15 +1,13 @@
"""Code to support various indexing workflows.
"""**Index** is used to avoid writing duplicated content
into the vectostore and to avoid over-writing content if it's unchanged.
Provides code to:
Indexes also :
* Create knowledge graphs from data.
* Support indexing workflows from LangChain data loaders to vectorstores.
For indexing workflows, this code is used to avoid writing duplicated content
into the vectostore and to avoid over-writing content if it's unchanged.
Importantly, this keeps on working even if the content being written is derived
Importantly, Index keeps on working even if the content being written is derived
via a set of transformations from some source content (e.g., indexing children
documents that were derived from parent documents by chunking.)
"""