Open huouer opened 3 hours ago
"message":"messages: Unexpected role "system"
从日志来看 似乎是官方不支持system这个角色,你可以尝试修改prompt将system角色一栏删除掉再试
试过了,仍然不行。
https://github.com/ZGGSONG/STranslate/releases/download/0.01/claude_fix.zip
我的号被封了,适配的时候使用的是第三方的服务商,可能他那边做兼容了,刚按官方文档更新了一下,你再试试
成功了!多谢。
成功了!多谢。
你可以先用 这个版本相较于上个正式版没改啥 加了点小功能 回头再发正式版本
另外,Claude应该是支持角色“System”的。一旦在prompt删除了system角色,如何加回?现在似乎只能加“user”和“assistant
Describe the bug Cloude服务无法通过连通验证 Where is the bug
To Reproduce Steps to reproduce the behavior:
Go to '翻译服务'
Click on '+'加入Claude
加入刚刚在https://console.anthropic.com/settings/keys申请的APIkey
Click on "连通验证“
See error
Expected behavior 可以验证通过,并使用Claude
Screenshots
Where did you get STranslate?
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Log 2024-10-11 13:18:26.249 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"messages: Unexpected role \"system\". The Messages API accepts a top-level
system
parameter, not \"system\" as an input message role."}}2024-10-11 16:43:52.864 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: Field required"}} 2024-10-11 16:44:06.058 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: Field required"}} 2024-10-11 16:44:24.234 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: Field required"}} 2024-10-11 16:44:24.235 [ERR] [Claude(504b4649-7073-4903-8493-86b7cf140c50)] 翻译出错, 请求API: https://api.anthropic.com, 异常信息: Bad Request max_tokens: Field required 2024-10-11 16:46:27.438 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: Field required"}} 2024-10-11 16:46:39.418 [ERR] (Claude)(504b4649-7073-4903-8493-86b7cf140c50) raw content: {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: Field required"}} 2024-10-11 16:46:39.418 [ERR] [Claude(504b4649-7073-4903-8493-86b7cf140c50)] 翻译出错, 请求API: https://api.anthropic.com, 异常信息: Bad Request max_tokens: Field required