Open samelhousseini opened 1 month ago
@samelhousseini what are the settings you are using?
Hi @Eduard van @.***>,
I believe you meant the execution settings? Please find below.
self.execution_settings = AzureChatPromptExecutionSettings(tool_choice="auto")
self.execution_settings.function_choice_behavior = FunctionChoiceBehavior.Auto()
Many thanks
Samer
From: Eduard van Valkenburg @.> Sent: Monday, September 16, 2024 6:11 PM To: microsoft/semantic-kernel @.> Cc: Mention @.>; Author @.> Subject: Re: [microsoft/semantic-kernel] Python: Bug: The 'get_chat_message_contents' returns with a tool_calls message without calling the plugin's function(s) (intermittently) (Issue #8712)
@samelhousseinihttps://github.com/samelhousseini what are the settings you are using?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/semantic-kernel/issues/8712#issuecomment-2353041719 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZ2RAUXNZ3WJHMNQB7ODC3TZW3RJXBFKMF2HI4TJMJ2XIZLTS2BKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVI2TEMBVGAYTIMJVHCSG4YLNMWUWQYLTL5WGCYTFNSBKK5TBNR2WLKRVGI4DSNJTHEYTCOFENZQW2ZNJNBQXGX3MMFRGK3ECUV3GC3DVMWVDOMBWGM4DMMZYGU4KI3TBNVS2S2DBONPWYYLCMVWKY43VMJVGKY3UL52HS4DFVREXG43VMVBW63LNMVXHJJTUN5YGSY3TSWBKI5DZOBS2U4TFOBXXG2LUN5ZHTJLWMFWHKZNJGYYDOMRYHEYTQNMCUR2HS4DFUVUXG43VMWSXMYLMOVS2UMRVGI2DOOJSGE2DDAVEOR4XAZNFNRQWEZLMUV3GC3DVMWVDKMRQGUYDCNBRGU4IFJDUPFYGLJLMMFRGK3FFOZQWY5LFVI2TEOBZGUZTSMJRHCBKI5DZOBS2K3DBMJSWZJLWMFWHKZNKG4YDMMZYGYZTQNJYU52HE2LHM5SXFJTDOJSWC5DF. You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Describe the bug This is an intermittent problem and hard to reproduce with exact steps.
To Reproduce Steps to reproduce the behavior: The "chat_completion.get_chat_message_contents" function call sometimes just returns with a tool_calls message but without calling the plugin's functions described in the tool_calls. The chat history indicates that the last message added is a "tool_calls" but no function result message is added afterwards.
Expected behavior Since there's a tool calls, the expected behavior is that the function call workflow proceeds as expected with a function call and a function result, but then all I get is a tool_calls message from "chat_completion.get_chat_message_contents"
When inspecting the results above, the get_chat_message_contents is returning without calling the plugin's functions:
Screenshots Screenshot below showing that the call to get_chat_message_contents just returned with an empty string, because the ChatMessageContent is a function call "tool_calls".
And that the call to the filter did not happen.
Platform
Update:
The following block of code is a temp fix of this problem: