Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix sparkdesk function call #1544

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

shijilin0116
Copy link
Contributor

修复了讯飞星火的函数调用功能。
调用Spark Pro/Max 的 Function call ,只会返回普通对话形式的回答,而不是 function call格式的的回答。
原因是在请求体中多包了一层json,导致星火不能正确解析请求体中的 function call 的相关参数。
现在修正了请求体的格式,能够按预期回答。

close #1543 #1524 #1493 #1457

我已确认该 PR 已自测通过,以 openai 标准格式的同一个 req 调用星火,智谱和openai 的 function call 类型对话,均能正常返回function call格式的相同的 resp。相关截图如下:

image image image

@freedomkk-qfeng
Copy link

爆赞!
实测这个pr确实fix了星火的问题,现在星火终于可以用 function call 了。

期待尽快合入下个 release ~

@songquanpeng songquanpeng changed the title fix: fix SparkDesk Function Call (修复 Spark Pro/Max函数调用只会返回普通对话回答而不是Function Call回答的问题 fix: fix sparkdesk function call Jun 20, 2024
@songquanpeng songquanpeng merged commit ff196b7 into songquanpeng:main Jun 20, 2024
@songquanpeng
Copy link
Owner

Thx~

@c121914yu
Copy link
Collaborator

#1570 你好,我试了试,确实可以拿到fc参数,但是无法使用fc结果继续请求回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants