Thank you for taking time to contribute this pull request! You might have already read the [contributor guide][1], but as a reminder, please make sure to:
- Sign the contributor license agreement
- Rebase your changes on the latest
main
branch and squash your commits - Add/Update unit tests as needed
- Run a build and make sure all tests pass prior to submission
Comment From: liugddx
I am using a commercial LLM, which is based on the openai interface specification, but the difference is that its function call is slightly different. Its tool_calls is an object not an array. https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html#_3-%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E
{
"code" : 0,
"message" : "Success",
"sid" : "xxx",
"choices" : [ {
"message" : {
"role" : "assistant",
"content" : "",
"tool_calls" : {
"type" : "function",
"function" : {
"arguments" : "{\"ride\":\"Space Mountain\"}",
"name" : "getWaitTime"
}
}
},
"index" : 0
} ],
"usage" : {
"prompt_tokens" : 10,
"completion_tokens" : 0,
"total_tokens" : 10
}
}
Comment From: liugddx
@tzolov PTAL
Comment From: markpollack
looks more like a tweak to be more broadly compatable but not related to fault tolerance. Change seems like it won't cause any side effects, so i'll merge after tests run green.
Comment From: markpollack
merged in f92450279148cfe9988b5224c3bb00da55dcbfb7