diff --git a/libs/community/langchain_community/adapters/__init__.py b/libs/community/langchain_community/adapters/__init__.py index e69de29bb2d..3834e1853e4 100644 --- a/libs/community/langchain_community/adapters/__init__.py +++ b/libs/community/langchain_community/adapters/__init__.py @@ -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. +""" diff --git a/libs/community/langchain_community/agent_toolkits/__init__.py b/libs/community/langchain_community/agent_toolkits/__init__.py index bbb3820cb3f..5b65dcf8b88 100644 --- a/libs/community/langchain_community/agent_toolkits/__init__.py +++ b/libs/community/langchain_community/agent_toolkits/__init__.py @@ -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 diff --git a/libs/community/langchain_community/chat_message_histories/__init__.py b/libs/community/langchain_community/chat_message_histories/__init__.py index 8803810c1bb..592fcc649e9 100644 --- a/libs/community/langchain_community/chat_message_histories/__init__.py +++ b/libs/community/langchain_community/chat_message_histories/__init__.py @@ -1,3 +1,20 @@ +"""**Chat message history** stores a history of the message interactions in a chat. + + +**Class hierarchy:** + +.. code-block:: + + BaseChatMessageHistory --> ChatMessageHistory # Examples: FileChatMessageHistory, PostgresChatMessageHistory + +**Main helpers:** + +.. code-block:: + + AIMessage, HumanMessage, BaseMessage + +""" # noqa: E501 + from langchain_community.chat_message_histories.astradb import ( AstraDBChatMessageHistory, ) diff --git a/libs/community/langchain_community/example_selectors/__init__.py b/libs/community/langchain_community/example_selectors/__init__.py index 70654d689b4..3210172e09d 100644 --- a/libs/community/langchain_community/example_selectors/__init__.py +++ b/libs/community/langchain_community/example_selectors/__init__.py @@ -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, diff --git a/libs/community/langchain_community/indexes/__init__.py b/libs/community/langchain_community/indexes/__init__.py index e69de29bb2d..2810a098997 100644 --- a/libs/community/langchain_community/indexes/__init__.py +++ b/libs/community/langchain_community/indexes/__init__.py @@ -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.) +""" diff --git a/libs/community/langchain_community/storage/__init__.py b/libs/community/langchain_community/storage/__init__.py index ffb95cab1d1..d68605348f4 100644 --- a/libs/community/langchain_community/storage/__init__.py +++ b/libs/community/langchain_community/storage/__init__.py @@ -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 --> Store # Examples: MongoDBStore, RedisStore + +""" # noqa: E501 from langchain_community.storage.astradb import ( AstraDBByteStore, diff --git a/libs/langchain/langchain/indexes/__init__.py b/libs/langchain/langchain/indexes/__init__.py index 84b1ad156be..02e766b02b3 100644 --- a/libs/langchain/langchain/indexes/__init__.py +++ b/libs/langchain/langchain/indexes/__init__.py @@ -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.) """