Open hchoi8782 opened 1 month ago
The real issue here is that the model is potentially sending back a function name that doesn't fit our plugin/function name regex criteria:
Error code: 400 - {\'error\': {\'message\': "Invalid \'messages[47].toolcalls[0].function.name\': string does not match pattern. Expected a string that matches the pattern \'^[a-zA-Z0-9-]+$\'.", \'type\': \'invalid_request_error\', \'param\': \'messages[47].tool_calls[0].function.name\', \'code\': \'invalid_value\'}}'))
We should look at the function name we get and if we get one that fails the regex, we should tell the model how the function name should be formed (similar to how we tell the model the JSON args are invalid).
Describe the bug When running plug-ins w/ the FunctionCallingStepwisePlanner, many of the tool calls results in an invalid JSON error. After repeated invalid JSON errors, it fails w/ Error 400
To Reproduce Here's the plan "ask" (the {{$...}} are replaced by my code at runtime: Complete the following tasks for each of the following SNR investigation data .csv files one by one: {{$INVESTIGATION_DATA_PATHS}}
Expected behavior There are several plug-ins that do the steps requested. The plug-ins should be called w/ the appropriate parameters.
Screenshots
INFO:semantic_kernel.kernel:Received invalid arguments for function core_prompts-generate_filename_from_content: Function Call arguments are not valid JSON.. Trying tool call again.
Platform
Additional context Add any other context about the problem here.