Skip to content

Commit

Permalink
bugfix for tool calling without passing specific PES
Browse files Browse the repository at this point in the history
  • Loading branch information
eavanvalkenburg committed Dec 6, 2024
1 parent 5c20525 commit c3922f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ async def get_chat_message_contents(
"""
# Create a copy of the settings to avoid modifying the original settings
settings = copy.deepcopy(settings)
# Later on, we already use the tools or equivalant settings, we cast here.

Check warning on line 102 in python/semantic_kernel/connectors/ai/chat_completion_client_base.py

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"equivalant" should be "equivalent".
if not isinstance(settings, self.get_prompt_execution_settings_class()):
settings = self.get_prompt_execution_settings_from_settings(settings)

if not self.SUPPORTS_FUNCTION_CALLING:
return await self._inner_get_chat_message_contents(chat_history, settings)
Expand Down Expand Up @@ -211,6 +214,9 @@ async def get_streaming_chat_message_contents(
"""
# Create a copy of the settings to avoid modifying the original settings
settings = copy.deepcopy(settings)
# Later on, we already use the tools or equivalant settings, we cast here.

Check warning on line 217 in python/semantic_kernel/connectors/ai/chat_completion_client_base.py

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"equivalant" should be "equivalent".
if not isinstance(settings, self.get_prompt_execution_settings_class()):
settings = self.get_prompt_execution_settings_from_settings(settings)

if not self.SUPPORTS_FUNCTION_CALLING:
async for streaming_chat_message_contents in self._inner_get_streaming_chat_message_contents(
Expand Down
2 changes: 1 addition & 1 deletion python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c3922f5

Please sign in to comment.