core.history.conversation
Manage API-facing message history for provider SDK calls.
Manage API-facing message history for provider SDK calls.
- class ConversationHistory[source]
Bases:
objectAPI-facing message history for provider SDK calls.
Unlike
PermanentHistory, turns here carry no timestamps and the history is intended to be cleared (e.g. when starting a new conversation context). Theget_turns()output is structured for direct injection into provider message APIs.- add_turn_assistant(content)[source]
Append an assistant turn to the history.
- Parameters:
content (str) – The assistant’s response text.
- Return type:
None
Classes
- class ConversationHistory[source]
Bases:
objectAPI-facing message history for provider SDK calls.
Unlike
PermanentHistory, turns here carry no timestamps and the history is intended to be cleared (e.g. when starting a new conversation context). Theget_turns()output is structured for direct injection into provider message APIs.- add_turn_assistant(content)[source]
Append an assistant turn to the history.
- Parameters:
content (str) – The assistant’s response text.
- Return type:
None