🔨 fix(ToolCall): Check output string type before performing .toLowerCase()#4324
Conversation
…e performing .toLowerCase()
|
Are you sure that your custom endpoint is even being used? looking at the code, it should actually fail, and maybe another configured endpoint is being used Or is this fix exclusively for use with Assistants, not Agents? |
|
This fix is only tested on Assistants and not agents. Also, I created a fresh assistant and added only 1 endpoint for the sake of test. My endpoint is a local one so I added logging to make sure it is being accessed and yes, it is being accessed and the function is running to the end. |
.toLowerCase()
Thanks for letting me know and for your contribution! |
Pull Request Template
Summary
Fixes issue #4303: This PR adds a type check for
outputbefore calling.toLowerCase()to ensure it is a string. This prevents potential runtime errors whenoutputisundefinedor not a string.Change Type
Please delete any irrelevant options.
Testing
Create an assistant action, and let the assistant call it. It used to throw errors and break the UI, now it works perfectly.
Test Configuration:
Checklist
Please delete any irrelevant options.