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] 使用MiniMax的大模型回答一半时报错,问题必现 #4054

Closed
ibootz opened this issue Sep 21, 2024 · 10 comments · Fixed by #4088
Closed

[Bug] 使用MiniMax的大模型回答一半时报错,问题必现 #4054

ibootz opened this issue Sep 21, 2024 · 10 comments · Fixed by #4088
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@ibootz
Copy link

ibootz commented Sep 21, 2024

📦 部署环境

Docker

📌 软件版本

v1.19.15

💻 系统环境

Windows

🌐 浏览器

Edge

🐛 问题描述

每次使用minMax的大模型进行问答时,总是流式回答到一大半之后突然报错。报错信息如下:

{
  "message": "chat response streaming chunk parse error, please contact your API Provider to fix it.",
  "context": {
    "error": {
      "message": "Cannot read properties of undefined (reading '0')",
      "name": "TypeError"
    },
    "chunk": {
      "raw": "�如果您需要进一步的帮助来理解如何使用这些资源,请告诉我,我会尽力提供指导。\",\"role\":\"assistant\",\"name\":\"MM智能助理\",\"audio_content\":\"\"}}],\"created\":1726905773,\"model\":\"abab6.5s-chat\",\"object\":\"chat.completion\",\"usage\":{\"total_tokens\":1268,\"total_characters\":0},\"input_sensitive\":false,\"output_sensitive\":false,\"input_sensitive_type\":0,\"output_sensitive_type\":0,\"output_sensitive_int\":0,\"base_resp\":{\"status_code\":0,\"status_msg\":\"Invalid parameters detected, json: unknown field \\\"frequency_penalty\\\"\"}}\n\n"
    }
  }
}

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@ibootz ibootz added the 🐛 Bug Something isn't working | 缺陷 label Sep 21, 2024
@lobehubbot
Copy link
Member

👀 @ibootz

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@C-L-STARK
Copy link
Contributor

minMax的官网也好像有点儿问题。长文本输出一半就中断了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There also seems to be some issues with minMax’s official website. Long text output is interrupted halfway through.

@ibootz
Copy link
Author

ibootz commented Sep 21, 2024

看这个报错提示,似乎是他们不支持frequency_penalty这个参数导致的(官方api文档中也确实没有这个参数);
但是本身所有响应文本流都返回了,base_resp.msg_status的状态也是0,代表整个响应实际上应该没有问题;
他们只在最后一个响应流json体中的base_resp.status_msg里提示了这个情况,lobechat能否忽略这种case,将文本正常渲染出来

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Looking at this error message, it seems that they do not support the frequency_penalty parameter (there is indeed no such parameter in the official API document);
However, all response text streams are returned, and the status of base_resp.msg_status is also 0, which means that there should be no problem with the entire response;
They only prompted this situation in base_resp.status_msg in the last response stream json body. Can lobechat ignore this case and render the text normally?

@ibootz
Copy link
Author

ibootz commented Sep 21, 2024

附上最后一条消息流:

{
	"id": "xxxxxxx",
	"choices": [
		{
			"finish_reason": "stop",
			"index": 0,
			"message": {
				"content": "xxxxxxx",
				"role": "assistant",
				"name": "MM智能助理",
				"audio_content": ""
			}
		}
	],
	"created": 1726927429,
	"model": "abab6.5s-chat",
	"object": "chat.completion",
	"usage": {
		"total_tokens": 451,
		"total_characters": 0
	},
	"input_sensitive": false,
	"output_sensitive": false,
	"input_sensitive_type": 0,
	"output_sensitive_type": 0,
	"output_sensitive_int": 0,
	"base_resp": {
		"status_code": 0,
		"status_msg": "Invalid parameters detected, json: unknown field \"frequency_penalty\""
	}
}

@arvinxx
Copy link
Contributor

arvinxx commented Sep 23, 2024

可以。 @sxjeru 要不要来看下这个

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Can. @sxjeru Do you want to take a look at this?

@lobehubbot
Copy link
Member

@ibootz

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 1.19.33 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants