配置第三方OPENAI模型服务,工作流请求会报错,Agent里面正常
按照文档配置claude模型后,使用了第三方url和api key,这个配置能正常在其他客户端使用,也能在coze页面显示出模型,在Agent里面能正常问答,但是放在工作流里面的大模型节点测试,会报错如下:
错误:"Workflow execution failure: expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'"
@magic-chen Agent怎么配置的第三方的 url key 和model 我这边配置后一直404
@magic-chen
你的大模型节点的配置界辛苦截图看下
要用#强制使用URL
我也遇到同样的情况,加了两个大模型,一个deepseek,一个智谱。
deepseek工作流和agent都正常.
但是智谱在工作流会报错,agent正常。然后我经过debug之后发现eino最终传给智谱API的message.content是个空字符串,目前没找到是什么原因导致的。
{"role": "user", "content": ""}
错误如下:
我的智谱配置如下:
id: 2001
name: GLM-4.5
icon_uri: default_icon/zai.png
icon_url: ""
description:
zh: GML 模型简介
en: Multi-modal, 320ms, 88.7% MMLU, excels in education, customer support, health, and entertainment.
default_parameters:
- name: temperature
label:
zh: 生成随机性
en: Temperature
desc:
zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。'
en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.'
type: float
min: "0"
max: "1"
default_val:
balance: "0.8"
creative: "1"
default_val: "1.0"
precise: "0.3"
precision: 1
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: max_tokens
label:
zh: 最大回复长度
en: Response max length
desc:
zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。
en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters.
type: int
min: "1"
max: "4096"
default_val:
default_val: "4096"
options: []
style:
widget: slider
label:
zh: 输入及输出设置
en: Input and output settings
- name: top_p
label:
zh: Top P
en: Top P
desc:
zh: '- **Top p 为累计概率**: 模型在生成输出时会从概率最高的词汇开始选择,直到这些词汇的总概率累积达到Top p 值。这样可以限制模型只选择这些高概率的词汇,从而控制输出内容的多样性。建议不要与“生成随机性”同时调整。'
en: '**Top P**:\n\n- An alternative to sampling with temperature, where only tokens within the top p probability mass are considered. For example, 0.1 means only the top 10% probability mass tokens are considered.\n- We recommend altering this or temperature, but not both.'
type: float
min: "0"
max: "1"
default_val:
default_val: "0.7"
precision: 2
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: frequency_penalty
label:
zh: 重复语句惩罚
en: Frequency penalty
desc:
zh: '- **frequency penalty**: 当该值为正时,会阻止模型频繁使用相同的词汇和短语,从而增加输出内容的多样性。'
en: '**Frequency Penalty**: When positive, it discourages the model from repeating the same words and phrases, thereby increasing the diversity of the output.'
type: float
min: "-2"
max: "2"
default_val:
default_val: "0"
precision: 2
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: presence_penalty
label:
zh: 重复主题惩罚
en: Presence penalty
desc:
zh: '- **presence penalty**: 当该值为正时,会阻止模型频繁讨论相同的主题,从而增加输出内容的多样性'
en: '**Presence Penalty**: When positive, it prevents the model from discussing the same topics repeatedly, thereby increasing the diversity of the output.'
type: float
min: "-2"
max: "2"
default_val:
default_val: "0"
precision: 2
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: response_format
label:
zh: 输出格式
en: Response format
desc:
zh: '- **文本**: 使用普通文本格式回复\n- **Markdown**: 将引导模型使用Markdown格式输出回复\n- **JSON**: 将引导模型使用JSON格式输出'
en: '**Response Format**:\n\n- **Text**: Replies in plain text format\n- **Markdown**: Uses Markdown format for replies\n- **JSON**: Uses JSON format for replies'
type: int
min: ""
max: ""
default_val:
default_val: "0"
options:
- label: Text
value: "0"
- label: Markdown
value: "1"
- label: JSON
value: "2"
style:
widget: radio_buttons
label:
zh: 输入及输出设置
en: Input and output settings
meta:
name: GLM-4.5
protocol: openai
capability:
function_call: true
input_modal:
- text
- image
input_tokens: 128000
json_mode: false
max_tokens: 128000
output_modal:
- text
output_tokens: 16384
prefix_caching: false
reasoning: false
prefill_response: false
conn_config:
base_url: "https://open.bigmodel.cn/api/paas/v4/"
api_key: "xxxxxxxxxxx"
timeout: 0s
model: "glm-4.5-air"
temperature: 0.9
frequency_penalty: 0
presence_penalty: 0
max_tokens: 4096
top_p: 0.7
top_k: 0
stop: []
openai:
by_azure: false
api_version: ""
response_format:
type: text
claude: null
ark: null
deepseek: null
qwen: null
gemini: null
custom: {}
status: 0
我也遇到同样的情况,加了两个大模型,一个deepseek,一个智谱。
deepseek工作流和agent都正常.
但是智谱在工作流会报错,agent正常。然后我经过debug之后发现eino最终传给智谱API的
message.content是个空字符串,目前没找到是什么原因导致的。{"role": "user", "content": ""}错误如下:
我的智谱配置如下:
id: 2001 name: GLM-4.5 icon_uri: default_icon/zai.png icon_url: "" description: zh: GML 模型简介 en: Multi-modal, 320ms, 88.7% MMLU, excels in education, customer support, health, and entertainment. default_parameters: - name: temperature label: zh: 生成随机性 en: Temperature desc: zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。' en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.' type: float min: "0" max: "1" default_val: balance: "0.8" creative: "1" default_val: "1.0" precise: "0.3" precision: 1 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: max_tokens label: zh: 最大回复长度 en: Response max length desc: zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。 en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters. type: int min: "1" max: "4096" default_val: default_val: "4096" options: [] style: widget: slider label: zh: 输入及输出设置 en: Input and output settings - name: top_p label: zh: Top P en: Top P desc: zh: '- **Top p 为累计概率**: 模型在生成输出时会从概率最高的词汇开始选择,直到这些词汇的总概率累积达到Top p 值。这样可以限制模型只选择这些高概率的词汇,从而控制输出内容的多样性。建议不要与“生成随机性”同时调整。' en: '**Top P**:\n\n- An alternative to sampling with temperature, where only tokens within the top p probability mass are considered. For example, 0.1 means only the top 10% probability mass tokens are considered.\n- We recommend altering this or temperature, but not both.' type: float min: "0" max: "1" default_val: default_val: "0.7" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: frequency_penalty label: zh: 重复语句惩罚 en: Frequency penalty desc: zh: '- **frequency penalty**: 当该值为正时,会阻止模型频繁使用相同的词汇和短语,从而增加输出内容的多样性。' en: '**Frequency Penalty**: When positive, it discourages the model from repeating the same words and phrases, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: presence_penalty label: zh: 重复主题惩罚 en: Presence penalty desc: zh: '- **presence penalty**: 当该值为正时,会阻止模型频繁讨论相同的主题,从而增加输出内容的多样性' en: '**Presence Penalty**: When positive, it prevents the model from discussing the same topics repeatedly, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: response_format label: zh: 输出格式 en: Response format desc: zh: '- **文本**: 使用普通文本格式回复\n- **Markdown**: 将引导模型使用Markdown格式输出回复\n- **JSON**: 将引导模型使用JSON格式输出' en: '**Response Format**:\n\n- **Text**: Replies in plain text format\n- **Markdown**: Uses Markdown format for replies\n- **JSON**: Uses JSON format for replies' type: int min: "" max: "" default_val: default_val: "0" options: - label: Text value: "0" - label: Markdown value: "1" - label: JSON value: "2" style: widget: radio_buttons label: zh: 输入及输出设置 en: Input and output settings meta: name: GLM-4.5 protocol: openai capability: function_call: true input_modal: - text - image input_tokens: 128000 json_mode: false max_tokens: 128000 output_modal: - text output_tokens: 16384 prefix_caching: false reasoning: false prefill_response: false conn_config: base_url: "https://open.bigmodel.cn/api/paas/v4/" api_key: "xxxxxxxxxxx" timeout: 0s model: "glm-4.5-air" temperature: 0.9 frequency_penalty: 0 presence_penalty: 0 max_tokens: 4096 top_p: 0.7 top_k: 0 stop: [] openai: by_azure: false api_version: "" response_format: type: text claude: null ark: null deepseek: null qwen: null gemini: null custom: {} status: 0
应该是因为没有把节点的输入放到“系统提示词”或者“用户提示词”里面
按照文档配置claude模型后,使用了第三方url和api key,这个配置能正常在其他客户端使用,也能在coze页面显示出模型,在Agent里面能正常问答,但是放在工作流里面的大模型节点测试,会报错如下:
错误:"Workflow execution failure: expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'"
![]()
看下有没有把节点的输入放到“系统提示词”或者“用户提示词”里面
大模型节点是否将input 用户输入,放到 用户提示词中
大模型节点是否将input 用户输入,放到 用户提示词中
放到用户提示词,的确可以了。但此处让人疑惑的是,deepseek不需要手动填入用户提示词也可以正常调用
大模型节点是否将input 用户输入,放到 用户提示词中
放到用户提示词,的确可以了。但此处让人疑惑的是,deepseek不需要手动填入用户提示词也可以正常调用
有的模型允许空输入,有的不允许
按照文档配置claude模型后,使用了第三方url和api key,这个配置能正常在其他客户端使用,也能在coze页面显示出模型,在Agent里面能正常问答,但是放在工作流里面的大模型节点测试,会报错如下: 错误:"Workflow execution failure: expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'"
看下有没有把节点的输入放到“系统提示词”或者“用户提示词”里面
我有测试过把提示词 只放系统提示词,或者只放用户提示词,或者都放,还是一样的错误,我这个提示一看就是请求第三方服务模型的期望输出和实际输出不一致导致的。
@magic-chen Agent怎么配置的第三方的 url key 和model 我这边配置后一直404
到这里 https://github.com/coze-dev/coze-studio/wiki/3.-Model-configuration
你的大模型节点的配置界辛苦截图看下
按照文档配置claude模型后,使用了第三方url和api key,这个配置能正常在其他客户端使用,也能在coze页面显示出模型,在Agent里面能正常问答,但是放在工作流里面的大模型节点测试,会报错如下: 错误:"Workflow execution failure: expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'"
看下有没有把节点的输入放到“系统提示词”或者“用户提示词”里面
我有测试过把提示词 只放系统提示词,或者只放用户提示词,或者都放,还是一样的错误,我这个提示一看就是请求第三方服务模型的期望输出和实际输出不一致导致的。
claude 模式是哪个平台提供的?
我也遇到同样的情况,加了两个大模型,一个deepseek,一个智谱。
deepseek工作流和agent都正常.
但是智谱在工作流会报错,agent正常。然后我经过debug之后发现eino最终传给智谱API的
message.content是个空字符串,目前没找到是什么原因导致的。{"role": "user", "content": ""}错误如下:
我的智谱配置如下:
id: 2001 name: GLM-4.5 icon_uri: default_icon/zai.png icon_url: "" description: zh: GML 模型简介 en: Multi-modal, 320ms, 88.7% MMLU, excels in education, customer support, health, and entertainment. default_parameters: - name: temperature label: zh: 生成随机性 en: Temperature desc: zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。' en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.' type: float min: "0" max: "1" default_val: balance: "0.8" creative: "1" default_val: "1.0" precise: "0.3" precision: 1 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: max_tokens label: zh: 最大回复长度 en: Response max length desc: zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。 en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters. type: int min: "1" max: "4096" default_val: default_val: "4096" options: [] style: widget: slider label: zh: 输入及输出设置 en: Input and output settings - name: top_p label: zh: Top P en: Top P desc: zh: '- **Top p 为累计概率**: 模型在生成输出时会从概率最高的词汇开始选择,直到这些词汇的总概率累积达到Top p 值。这样可以限制模型只选择这些高概率的词汇,从而控制输出内容的多样性。建议不要与“生成随机性”同时调整。' en: '**Top P**:\n\n- An alternative to sampling with temperature, where only tokens within the top p probability mass are considered. For example, 0.1 means only the top 10% probability mass tokens are considered.\n- We recommend altering this or temperature, but not both.' type: float min: "0" max: "1" default_val: default_val: "0.7" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: frequency_penalty label: zh: 重复语句惩罚 en: Frequency penalty desc: zh: '- **frequency penalty**: 当该值为正时,会阻止模型频繁使用相同的词汇和短语,从而增加输出内容的多样性。' en: '**Frequency Penalty**: When positive, it discourages the model from repeating the same words and phrases, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: presence_penalty label: zh: 重复主题惩罚 en: Presence penalty desc: zh: '- **presence penalty**: 当该值为正时,会阻止模型频繁讨论相同的主题,从而增加输出内容的多样性' en: '**Presence Penalty**: When positive, it prevents the model from discussing the same topics repeatedly, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: response_format label: zh: 输出格式 en: Response format desc: zh: '- **文本**: 使用普通文本格式回复\n- **Markdown**: 将引导模型使用Markdown格式输出回复\n- **JSON**: 将引导模型使用JSON格式输出' en: '**Response Format**:\n\n- **Text**: Replies in plain text format\n- **Markdown**: Uses Markdown format for replies\n- **JSON**: Uses JSON format for replies' type: int min: "" max: "" default_val: default_val: "0" options: - label: Text value: "0" - label: Markdown value: "1" - label: JSON value: "2" style: widget: radio_buttons label: zh: 输入及输出设置 en: Input and output settings meta: name: GLM-4.5 protocol: openai capability: function_call: true input_modal: - text - image input_tokens: 128000 json_mode: false max_tokens: 128000 output_modal: - text output_tokens: 16384 prefix_caching: false reasoning: false prefill_response: false conn_config: base_url: "https://open.bigmodel.cn/api/paas/v4/" api_key: "xxxxxxxxxxx" timeout: 0s model: "glm-4.5-air" temperature: 0.9 frequency_penalty: 0 presence_penalty: 0 max_tokens: 4096 top_p: 0.7 top_k: 0 stop: [] openai: by_azure: false api_version: "" response_format: type: text claude: null ark: null deepseek: null qwen: null gemini: null custom: {} status: 0
请问你这个配置文件,在agent对话中会有internal error吗? 我copy了你的yaml,模型可以正常回复 但总是带有这个error
我也遇到同样的情况,加了两个大模型,一个deepseek,一个智谱。 deepseek工作流和agent都正常. 但是智谱在工作流会报错,agent正常。然后我经过debug之后发现eino最终传给智谱API的
message.content是个空字符串,目前没找到是什么原因导致的。{"role": "user", "content": ""}错误如下:
我的智谱配置如下:
id: 2001 name: GLM-4.5 icon_uri: default_icon/zai.png icon_url: "" description: zh: GML 模型简介 en: Multi-modal, 320ms, 88.7% MMLU, excels in education, customer support, health, and entertainment. default_parameters: - name: temperature label: zh: 生成随机性 en: Temperature desc: zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。' en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.' type: float min: "0" max: "1" default_val: balance: "0.8" creative: "1" default_val: "1.0" precise: "0.3" precision: 1 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: max_tokens label: zh: 最大回复长度 en: Response max length desc: zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。 en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters. type: int min: "1" max: "4096" default_val: default_val: "4096" options: [] style: widget: slider label: zh: 输入及输出设置 en: Input and output settings - name: top_p label: zh: Top P en: Top P desc: zh: '- **Top p 为累计概率**: 模型在生成输出时会从概率最高的词汇开始选择,直到这些词汇的总概率累积达到Top p 值。这样可以限制模型只选择这些高概率的词汇,从而控制输出内容的多样性。建议不要与“生成随机性”同时调整。' en: '**Top P**:\n\n- An alternative to sampling with temperature, where only tokens within the top p probability mass are considered. For example, 0.1 means only the top 10% probability mass tokens are considered.\n- We recommend altering this or temperature, but not both.' type: float min: "0" max: "1" default_val: default_val: "0.7" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: frequency_penalty label: zh: 重复语句惩罚 en: Frequency penalty desc: zh: '- **frequency penalty**: 当该值为正时,会阻止模型频繁使用相同的词汇和短语,从而增加输出内容的多样性。' en: '**Frequency Penalty**: When positive, it discourages the model from repeating the same words and phrases, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: presence_penalty label: zh: 重复主题惩罚 en: Presence penalty desc: zh: '- **presence penalty**: 当该值为正时,会阻止模型频繁讨论相同的主题,从而增加输出内容的多样性' en: '**Presence Penalty**: When positive, it prevents the model from discussing the same topics repeatedly, thereby increasing the diversity of the output.' type: float min: "-2" max: "2" default_val: default_val: "0" precision: 2 options: [] style: widget: slider label: zh: 生成多样性 en: Generation diversity - name: response_format label: zh: 输出格式 en: Response format desc: zh: '- **文本**: 使用普通文本格式回复\n- **Markdown**: 将引导模型使用Markdown格式输出回复\n- **JSON**: 将引导模型使用JSON格式输出' en: '**Response Format**:\n\n- **Text**: Replies in plain text format\n- **Markdown**: Uses Markdown format for replies\n- **JSON**: Uses JSON format for replies' type: int min: "" max: "" default_val: default_val: "0" options: - label: Text value: "0" - label: Markdown value: "1" - label: JSON value: "2" style: widget: radio_buttons label: zh: 输入及输出设置 en: Input and output settings meta: name: GLM-4.5 protocol: openai capability: function_call: true input_modal: - text - image input_tokens: 128000 json_mode: false max_tokens: 128000 output_modal: - text output_tokens: 16384 prefix_caching: false reasoning: false prefill_response: false conn_config: base_url: "https://open.bigmodel.cn/api/paas/v4/" api_key: "xxxxxxxxxxx" timeout: 0s model: "glm-4.5-air" temperature: 0.9 frequency_penalty: 0 presence_penalty: 0 max_tokens: 4096 top_p: 0.7 top_k: 0 stop: [] openai: by_azure: false api_version: "" response_format: type: text claude: null ark: null deepseek: null qwen: null gemini: null custom: {} status: 0请问你这个配置文件,在agent对话中会有internal error吗? 我copy了你的yaml,模型可以正常回复 但总是带有这个error
有遇到过,但后面我忘了怎么操作的,再也不会出现error了
按照文档配置claude模型后,使用了第三方url和api key,这个配置能正常在其他客户端使用,也能在coze页面显示出模型,在Agent里面能正常问答,但是放在工作流里面的大模型节点测试,会报错如下: 错误:"Workflow execution failure: expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'"
看下有没有把节点的输入放到“系统提示词”或者“用户提示词”里面
我有测试过把提示词 只放系统提示词,或者只放用户提示词,或者都放,还是一样的错误,我这个提示一看就是请求第三方服务模型的期望输出和实际输出不一致导致的。
claude 模式是哪个平台提供的?
你指的是连接服务是哪个平台吧,这个模型服务是我们自己包装过,从第三方买的API。
@magic-chen expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'
这个报错是 claude 的 go-sdk 抛出来的,可以试试全局搜到这个报错信息,然后断点调试一下
@magic-chen expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json'
这个报错是 claude 的 go-sdk 抛出来的,可以试试全局搜到这个报错信息,然后断点调试一下
@shentongmartin 那这个是不是没有解决方案呢?其他人以后配置claude模型也会出问题吗
@magic-chen expected destination type of 'string' or '[]byte' for responses with content-type 'text/plain; charset=utf-8' that is not 'application/json' 这个报错是 claude 的 go-sdk 抛出来的,可以试试全局搜到这个报错信息,然后断点调试一下
@shentongmartin 那这个是不是没有解决方案呢?其他人以后配置claude模型也会出问题吗
现在不确定是什么原因,所以看你那里能不能调试下?没收到其他关于 claude 模型的问题反馈。或者加点日志看下也行
我的智谱配置如下:
大模型节点是否将input 用户输入,放到 用户提示词中
我的智谱配置如下: