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

[BUG] 对话API调用,流式输出时最后一条打印not a valid UUID #192

Closed
rty813 opened this issue Apr 21, 2024 · 3 comments
Closed

Comments

@rty813
Copy link

rty813 commented Apr 21, 2024

联系方式

doufu@orca-tech.com.cn

MaxKB 版本

v1.0.4 (build at 2024-04-19T16:59, commit: 7c00122)

问题描述

调用对话API,当请求body中stream为true时,输出的最后一条消息中,携带一个错误信息。
若将stream改为false,则只会输出错误信息而不输出正确信息。

重现步骤

发起对话API请求

期待的正确结果

输出正确结果

相关日志输出

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "202", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "4", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "-", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "04", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "-", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "21", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": " ", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "08", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": ":", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "00", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": ":", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "00", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "", "is_end": false}

data: {"chat_id": "fb772c90-fff3-11ee-9db6-0242ac11000c", "id": "6092b22a-fff4-11ee-8467-0242ac11000c", "operate": true, "content": "\u5f02\u5e38['\u201capplication-623b8c7c0dad590b13f1f70c6514d33c\u201d is not a valid UUID.']", "is_end": true}

附加信息

stream为true时的输出:
image


stream为false时的输出:
image

@baixin513
Copy link
Contributor

感谢反馈,确认为 BUG,后期版本修复。

@496672097
Copy link

这个API咋用的。 好奇。 有说明没。

songofhawk pushed a commit to songofhawk/MaxKB that referenced this issue Apr 23, 2024
@jg0014
Copy link

jg0014 commented Apr 28, 2024

这个API咋用的。 好奇。 有说明没。

文档里讲API Key部分有

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

No branches or pull requests

4 participants