Skip to content

面试功能最后的格式化错误 #22

@zhangzhenxiang666

Description

@zhangzhenxiang666

我使用的docker部署的, 我完成了面试的问题后它生成最后的结构化数据的时候出错了,
我看来如果选openai它会有思考字段(我用的openrouter的免费模型qwen3.6), 最后这个生成结构化的数据的时候能不能不使用response_format这种功能, 改用提示词里面定义结构然后尝试从ai回复中提取json数据
Error message: [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received array"
}
]
at async A (.next/server/chunks/[root-of-the-server]__6718d7cf._.js:1:9877) {
value: [ [Object] ],
context: undefined,
[cause]: Error [ZodError]: [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received array"
}
]
at ignore-listed frames
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions