kuafuai / DevOpsGPT

Multi agent system for AI-driven software development. Combine LLM with DevOps tools to convert natural language requirements into working software. Supports any development language and extends the existing code.
https://www.kuafuai.net
Other
6.51k stars 837 forks source link

Expecting value: line 1 column 2 (char 1) 后端服务返回异常,请联系管理员检查终端服务日志以及浏览器控制台报错信息。 #52

Closed yyworld7 closed 1 year ago

yyworld7 commented 1 year ago
"question": "结果是否需要可视化展示?",
"reasoning": "可视化需要前端配合开发",
"answer_sample": "不需要可视化"

} ]

请检查以上问题,如有需要补充或者修改的,请提出,非常感谢! Traceback (most recent call last): File "F:\oyworld\GPT\DevOpsGPT\backend\app\controllers\common.py", line 10, in decorated_function result = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "F:\oyworld\GPT\DevOpsGPT\backend\app\controllers\step_requirement.py", line 23, in clarify msg, success = clarifyRequirement(userPrompt, globalContext, appArchitecture) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\oyworld\GPT\DevOpsGPT\backend\app\pkgs\prompt\prompt.py", line 19, in clarifyRequirement return obj.clarifyRequirement(userPrompt, globalContext, appArchitecture) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\oyworld\GPT\DevOpsGPT\backend\app\pkgs\prompt\requirement_basic.py", line 80, in clarifyRequirement return json.loads(message), success ^^^^^^^^^^^^^^^^^^^ File "C:\Users\W\anaconda3\envs\eng\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\W\anaconda3\envs\eng\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\W\anaconda3\envs\eng\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

booboosui commented 1 year ago

看上去是gpt返回的数据格式有问题,可以重试下看看

yyworld7 commented 1 year ago

第一次问答在cmd里是看得到回答的内容,然后下一步就返回错误了,在网页上也返回以上错误,多次重试还是一样

booboosui commented 1 year ago

增加了对返回数据的修复功能,可以用最新版本的代码试试看