a separate key for historical messages. If the input key points
to a string, it will be treated as a HumanMessage in history.
Must return as output one of:
1. A string which can be treated as an AIMessage
2. A BaseMessage or sequence of BaseMessages
3. A dict with a key for a BaseMessage or sequence of BaseMessages
get_session_history – Function that returns a new BaseChatMessageHistory.
This function should either take a single positional argument
session_id of type string and return a corresponding
chat message history instance.
.. code-block:: python
def get_session_history(session_id: str,
*,
user_id: Optional[str]=None
) -> BaseChatMessageHistory:…
Or it should take keyword arguments that match the keys of
session_history_config_specs and return a corresponding
chat message history instance.
def get_session_history(
    *,
    user_id: str,
    thread_id: str,
) -> BaseChatMessageHistory:
    ...
input_messages_key – Must be specified if the base runnable accepts a dict
as input.
output_messages_key – Must be specified if the base runnable returns a dict
as output.
history_messages_key – Must be specified if the base runnable accepts a dict
as input and expects a separate key for historical messages.
history_factory_config – Configure fields that should be passed to the
chat history factory. See ConfigurableFieldSpec for more details.
Specifying these allows you to pass multiple config keys
into the get_session_history factory.
**kwargs – Arbitrary additional kwargs to pass to parent class
RunnableBindingBase init.
param bound: Runnable[Input, Output] [Required]¶
The underlying runnable that this runnable delegates to.
param config: RunnableConfig [Optional]¶
The config to bind to the underlying runnable.