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]: [Local Message] 异常,Json解析异常 #2007

Open
InRaysee opened this issue Oct 14, 2024 · 0 comments
Open

[Bug]: [Local Message] 异常,Json解析异常 #2007

InRaysee opened this issue Oct 14, 2024 · 0 comments

Comments

@InRaysee
Copy link

Installation Method | 安装方法与平台

Docker-Compose(Linux)

Version | 版本

Latest | 最新版

OS | 操作系统

Docker

Describe the bug | 简述

使用“学术语料润色”时报错,显示“[Local Message] 异常”,具体表现应该为Json解析异常。如下:

[Local Message] 异常

Traceback (most recent call last):
File "./request_llms/bridge_chatgpt.py", line 339, in predict
if ('data: [DONE]' in chunk_decoded) or (len(chunkjson['choices'][0]["delta"]) == 0):
KeyError: 'delta'

data: {"choices":[{"content_filter_offsets":{"check_offset":3656,"start_offset":3656,"end_offset":4651},"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":null,"index":0}],"created":0,"id":"","model":"","object":""}data: {"choices":[{"delta":{"content":" solve"},"finish_reason":null,"index":0,"logprobs":null}],"created":1728877146,"id":"chatcmpl-AI6DCuO6n6kLm5NgOPcVUOTmce7XA","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_67802d9a6d"}data: {"choices":[{"delta":{"content":" it"},"finish_reason":null,"index":0,"logprobs":null}],"created":1728877146,"id":"chatcmpl-AI6DCuO6n6kLm5NgOPcVUOTmce7XA","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_67802d9a6d"}data: {"choices":[{"delta":{"content":" as"},"finish_reason":null,"index":0,"logprobs":null}],

...

"created":1728877146,"id":"chatcmpl-AI6DCuO6n6kLm5NgOPcVUOTmce7XA","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_67802d9a6d"}data: {"choices":[{"content_filter_offsets":{"check_offset":8258,"start_offset":8168,"end_offset":8588},"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":null,"index":0}],"created":0,"id":"","model":"","object":""}data: [DONE]

Screen Shot | 有帮助的截图

截屏2024-10-14 11 43 25

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

No response

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

No branches or pull requests

1 participant