Skip to content

[Bug] [ <class 'dbgpt.agent.core.plan.awel.agent_operator.AWELAgentOperator'] Client chat flow error, AttributeError: 'CommonLLMHttpRequestBody' object has no attribute 'already_failed' #2112

Open
@fryng

Description

@fryng

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Windows

Python version information

=3.11

DB-GPT version

main

Related scenes

  • Chat Data
  • Chat Excel
  • Chat DB
  • Chat Knowledge
  • Model Management
  • Dashboard
  • Plugins

Installation Information

Device information

WINDOWS11,DOCKER-COMPOSE都出现这个问题

Models information

/

What happened

db-gpt-webserver-1 | 2024-11-01 02:44:38 140ce76a8a9e dbgpt.core.awel.runner.local_runner[1] INFO Run operator <class 'dbgpt.agent.core.plan.awel.agent_operator.AWELAgentOperator'>(e2726bca-7c47-4588-beea-63e7f8f105e0) error, error message: Traceback (most recent call last):
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/runner/local_runner.py", line 192, in _execute_node
db-gpt-webserver-1 | await node._run(dag_ctx, task_ctx.log_id)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/operators/base.py", line 248, in _run
db-gpt-webserver-1 | return await self._do_run(dag_ctx)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/operators/common_operator.py", line 190, in _do_run
db-gpt-webserver-1 | input_ctx: InputContext = await curr_task_ctx.task_input.map(map_function)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/task/task_impl.py", line 538, in map
db-gpt-webserver-1 | new_outputs, results = await self._apply_func(map_func)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/task/task_impl.py", line 533, in _apply_func
db-gpt-webserver-1 | results = await asyncio.gather(*map_tasks)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/task/task_impl.py", line 126, in map
db-gpt-webserver-1 | out = await self._apply_func(map_func)
db-gpt-webserver-1 | File "/app/dbgpt/core/awel/task/task_impl.py", line 112, in _apply_func
db-gpt-webserver-1 | out = await func(self._data)
db-gpt-webserver-1 | File "/app/dbgpt/agent/core/plan/awel/agent_operator.py", line 178, in map
db-gpt-webserver-1 | if input_value.already_failed:
db-gpt-webserver-1 | File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 853, in getattr
db-gpt-webserver-1 | raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
db-gpt-webserver-1 | AttributeError: 'CommonLLMHttpRequestBody' object has no attribute 'already_failed'

What you expected to happen

/

How to reproduce

请求代码如下
from dbgpt.client import Client
from dbgpt.client.flow import list_flow
import asyncio
DBGPT_API_KEY = "dbgpt"

client = Client(api_key=DBGPT_API_KEY, version="v2")

async def get_flow_list():

res = await list_flow(client=client)

return res

res = asyncio.run(get_flow_list())

for r in res:

print(r.name)

print(r.uid)

async def awel_flow_web_info_search():
async for data in client.chat_stream(
messages="今天的天气情况?",
model="zhipu_proxyllm",
chat_mode="chat_flow",
chat_param="e777dd16-8295-4406-ba80-d14e1dfa4dfb"
):
print(data)

asyncio.run(awel_flow_web_info_search())

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions