Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions python/semantic_kernel/utils/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@
from semantic_kernel.contents.chat_message_content import ChatMessageContent


def store_results(chat_history: ChatHistory, results: list["ChatMessageContent"]):
"""Stores specific results in the context and chat prompt."""
def store_results(
chat_history: ChatHistory,
results: list["ChatMessageContent"]) -> ChatHistory:
"""Stores specific results in the context and chat prompt.

Args:
chat_history(ChatHistory): The current chat history instance.
results(list["ChatMessageContent"]): Messages to be stored in the history.

Returns:
ChatHistory: Updated chat history containing the new messages.
"""
for message in results:
chat_history.add_message(message=message)
return chat_history
Loading