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

配置deepseek的api之后,metagpt重复在think,但无法执行action动作 #1708

Open
zhulf11 opened this issue Feb 21, 2025 · 2 comments

Comments

@zhulf11
Copy link

zhulf11 commented Feb 21, 2025

2025-02-21 10:06:54.840 | ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 231.734(s), this was the 6th time calling it. exp: 1 validation error for WritePRD_AN
Value error, Missing fields: {'UI Design draft', 'Anything UNCLEAR'} [type=value_error, input_value={'Language': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/value_error
2025-02-21 10:06:54.842 | WARNING | metagpt.utils.common:wrapper:673 - There is a exception in role's execution, in order to resume, we delete the newest role communication message in the role's memory.
2025-02-21 10:06:54.855 | ERROR | metagpt.utils.common:wrapper:655 - Exception occurs, start to serialize the project, exp:
Traceback (most recent call last):
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py", line 449, in _aask_v1
instruct_content = output_class(**parsed_data)
pydantic_core._pydantic_core.ValidationError: 1 validation error for WritePRD_AN
Value error, Missing fields: {'UI Design draft', 'Anything UNCLEAR'} [type=value_error, input_value={'Language': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/value_error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\utils\common.py", line 664, in wrapper
return await func(self, *args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py", line 551, in run
rsp = await self.react()
tenacity.RetryError: RetryError[<Future at 0x1b156176a60 state=finished raised ValidationError>]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\utils\common.py", line 650, in wrapper
result = await func(self, *args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\team.py", line 134, in run
await self.env.run()
Exception: Traceback (most recent call last):
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py", line 449, in _aask_v1
instruct_content = output_class(**parsed_data)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\pydantic\main.py", line 164, in init
pydantic_self.pydantic_validator.validate_python(data, self_instance=pydantic_self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for WritePRD_AN
Value error, Missing fields: {'UI Design draft', 'Anything UNCLEAR'} [type=value_error, input_value={'Language': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/value_error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\utils\common.py", line 664, in wrapper
return await func(self, *args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py", line 551, in run
rsp = await self.react()
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py", line 520, in react
rsp = await self._react()
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py", line 475, in _react
rsp = await self._act()
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py", line 404, in _act
response = await self.rc.todo.run(self.rc.history)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\write_prd.py", line 87, in run
return await self._handle_new_requirement(req)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\write_prd.py", line 108, in _handle_new_requirement
node = await WRITE_PRD_NODE.fill(context=context, llm=self.llm, exclude=exclude) # schema=schema
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py", line 648, in fill
return await self.simple_fill(schema=schema, mode=mode, images=images, timeout=timeout, exclude=exclude)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py", line 473, in simple_fill
content, scontent = await self.aask_v1(
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_asyncio.py", line 47, in call
do = self.iter(retry_state=retry_state)
File "C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_init
.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x1b156176a60 state=finished raised ValidationError>]

@seehi
Copy link
Contributor

seehi commented Feb 24, 2025

deepseek-chat还是deepseek-reasoner

@annian101
Copy link

2025-02-21 10:06:54.840 | 错误 | metagpt.utils.common:log_it:554 - 在 231.734(s) 之后完成对“metagpt.actions.action_node.ActionNode._aask_v1”的调用,这是第 6 次调用它。 exp: WritePRD_AN 的 1 个验证错误 值错误,缺少字段:{'UI 设计草稿','任何不清楚的内容'} [type=value_error, input_value={'Language': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict] 有关更多信息,请访问https://errors.pydantic.dev/2.5/v/value_error 2025-02-21 10:06:54.842 | 警告 | metagpt.utils.common:wrapper:673 - 角色执行时出现异常,为了恢复,我们删除角色内存中最新的角色通信消息。2025-02-21 10:06:54.855 | 错误 | metagpt.utils.common:wrapper:655 - 发生异常,开始序列化项目,exp: 回溯(最近一次调用最后一次): 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\tenacity_asyncio.py”,第 50 行,在调用 结果中 = await fn(*args, **kwargs) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py”,第 449 行,在 _aask_v1 中 instruct_content = output_class(**parsed_data) pydantic_core._pydantic_core.ValidationError: WritePRD_AN 的 1 个验证错误 值错误,缺少字段:{'UI 设计草稿','任何不清楚的东西'} [type=value_error, input_value={'语言': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict] 欲了解更多信息,请访问https://errors.pydantic.dev/2.5/v/value_error

上述异常是导致以下异常的直接原因:

回溯(最近一次调用最后一次): 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\utils\common.py”,第 664 行,在包装器中 返回 await func(self,*args,**kwargs) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py”,第 551 行,在运行 rsp = await self.react() tenacity.RetryError:RetryError [<Future at 0x1b156176a60 state=finished raised ValidationError>]

在处理上述异常的过程中,又发生了另一个异常:

回溯(最近一次调用最后一次): 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \ utils \ common.py”,第 650 行,在包装器 结果中 = await func(self,* args,** kwargs) 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \ team.py”,第 134 行,运行中 等待 self.env.run() 异常:回溯(最近一次调用最后一次): 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ tenacity_asyncio.py”,第 50 行,在调用 结果中 = await fn(* args,** kwargs) 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \ action \ action_node.py”,行449,在 _aask_v1 中 instruct_content = output_class(parsed_data) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\pydantic\main.py”,第 164 行,在init ** pydantic_self中。pydantic_validator .validate_python (data, self_instance= pydantic_self ) pydantic_core._pydantic_core.ValidationError: WritePRD_AN 的 1 个验证错误 值错误,缺少字段:{'UI 设计草稿', '任何 UNCLEAR'} [type=value_error, input_value={'Language': 'zh_cn', 'Pr...示': '屏幕底部'}}, input_type=dict] 有关更多信息,请访问https://errors.pydantic.dev/2.5/v/value_error

上述异常是导致以下异常的直接原因:

回溯(最近一次调用最后一次): 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \ utils \ common.py”,第 664 行,在包装器中 返回 await func(self,* args,** kwargs) 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \roles \role.py”,第 551 行,在运行 rsp = await self.react() 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \roles \role.py”,第 520 行,在 react rsp = await self._react() 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ metagpt \roles \role.py”,第 475 行,在 _react rsp中= await self._act() 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\roles\role.py”,第 404 行,在 _act 响应中 = await self.rc.todo.run(self.rc.history) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\write_prd.py”,第 87 行,在运行中 return await self._handle_new_requirement(req) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\write_prd.py”,第 108 行,在 handle_new_requirement 中 node = await WRITE_PRD_NODE.fill(context=context, llm=self.llm, exclude=exclude) # schema=schema 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py”,第 648 行,在填充中 返回 await self.simple_fill(schema=schema, mode=mode, images=images, timeout=timeout, exclude=exclude) 文件“C:\Users\USERl.conda\envs\metagpt\lib\site-packages\metagpt\actions\action_node.py”,第 473 行,在 simple_fill 内容中,scontent = await self。aask_v1( 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ tenacity_asyncio.py”,第 88 行,在 async_wrapped 返回 await fn(* args,** kwargs) 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ tenacity_asyncio.py”,第 47 行,在call do = self.iter(retry_state = retry_state) 文件“C:\ Users \ USERl.conda \ envs \ metagpt \ lib \ site-packages \ tenacity init .py”,第 326 行,在 iter 中 从 fut.exception()引发 retry_exc tenacity.RetryError:RetryError [<Future at 0x1b156176a60 state = finished 引发 ValidationError>]

deepsek哪个版本?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants