coze-dev / coze-dev/coze-studio

智能体添加变量依然不生效

Open
#2,310 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

大佬 之前提过一个 智能体变量不生效的问题 #2236 ,然后您这边说是解决了我们测试了之后好像还是不生效,代码已经拉取最新的了,然后镜像用的是latest。
使用这种方式:{
"bot_id": "7540201057557676032",
"stream": true,
"user_id": "11",
"additional_messages": [
{
"role": "user",
"content_type": "text",
"content": "{\"variables\": {\"roleType\": \"宝爸\", \"babyGender\": \"女\", \"sceneTag\": \"即将吃完\", \"babyStage\": \"3段\", \"brandTag\": \"至初\"}, \"prompt\": \"根据提示词和变量生成人设\"}"
}
]
} 可以生成,生成结果如下:

Image
但是这种方式:
{
"bot_id": "7540201057557676032",
"stream": true,
"user_id": "11",
"additional_messages": [
{
"role": "user",
"content_type": "text",
"content": "帮我生成一下人设"
}
],
"custom_variables": {
"roleType": "宝爸",
"babyGender": "女",
"sceneTag":"即将吃完",
"babyStage":"3段",
"brandTag":"至初"

}
}
就没法生成,流式响应结果是:

Image

Contributor guide

Open the contributing guide

Research direction

Compare the reproduced request using custom_variables with the working additional_messages request, focusing on how each produces the streaming response. Done means the custom_variables form generates the expected agent persona instead of the shown failure response.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.