Skip to content
Open
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ async def get_chat_message_contents(
Returns:
A list of chat message contents representing the response(s) from the LLM.
"""
from semantic_kernel.connectors.ai.function_calling_utils import (
merge_function_results,
)
from semantic_kernel.connectors.ai.function_calling_utils import merge_function_results

# Create a copy of the settings to avoid modifying the original settings
settings = copy.deepcopy(settings)
Expand Down Expand Up @@ -210,9 +208,7 @@ async def get_streaming_chat_message_contents(
Yields:
A stream representing the response(s) from the LLM.
"""
from semantic_kernel.connectors.ai.function_calling_utils import (
merge_streaming_function_results,
)
from semantic_kernel.connectors.ai.function_calling_utils import merge_streaming_function_results

# Create a copy of the settings to avoid modifying the original settings
settings = copy.deepcopy(settings)
Expand Down Expand Up @@ -316,6 +312,13 @@ async def get_streaming_chat_message_contents(

if any(result.terminate for result in results if result is not None):
break
else:
# Do a final call, without function calling when the max has been reached.
self._reset_function_choice_settings(settings)
async for streaming_chat_message_contents in self._inner_get_streaming_chat_message_contents(
chat_history, settings
):
yield streaming_chat_message_contents

async def get_streaming_chat_message_content(
self,
Expand Down
Loading