mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 07:35:18 +00:00
docs: Add docstrings for CassandraChatMessageHistory class and package namespace function. (#24222)
- Modified docstring for CassandraChatMessageHistory in libs/community/langchain_community/chat_message_history/cassandra.py. - Added docstring for _package_namespace function in docs/api_reference/create_api_rst.py --------- Co-authored-by: ashvin <ashvin.anilkumar@qburst.com> Co-authored-by: Erick Friis <erick@langchain.dev> Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
parent
8788a34bfa
commit
2cd77a53a3
@ -471,6 +471,14 @@ def _build_rst_file(package_name: str = "langchain") -> None:
|
||||
|
||||
|
||||
def _package_namespace(package_name: str) -> str:
|
||||
"""Returns the package name used.
|
||||
|
||||
Args:
|
||||
package_name: Can be either "langchain" or "core" or "experimental".
|
||||
|
||||
Returns:
|
||||
modified package_name: Can be either "langchain" or "langchain_{package_name}"
|
||||
"""
|
||||
return (
|
||||
package_name
|
||||
if package_name == "langchain"
|
||||
|
@ -31,6 +31,8 @@ def _rows_to_messages(rows: Iterable[RowType]) -> List[BaseMessage]:
|
||||
|
||||
|
||||
class CassandraChatMessageHistory(BaseChatMessageHistory):
|
||||
"""Chat message history that is backed by Cassandra."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
session_id: str,
|
||||
@ -41,7 +43,8 @@ class CassandraChatMessageHistory(BaseChatMessageHistory):
|
||||
*,
|
||||
setup_mode: SetupMode = SetupMode.SYNC,
|
||||
) -> None:
|
||||
"""Chat message history that stores history in Cassandra.
|
||||
"""
|
||||
Initialize a new instance of CassandraChatMessageHistory.
|
||||
|
||||
Args:
|
||||
session_id: arbitrary key that is used to store the messages
|
||||
|
Loading…
Reference in New Issue
Block a user