Skip to content

Commit

Permalink
fix Result
Browse files Browse the repository at this point in the history
  • Loading branch information
chengmo03 committed Mar 20, 2024
1 parent b1c3163 commit 4795ec3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions appbuilder/core/console/agent_builder/agent_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ def _transform(inp: data_class.HTTPResponse, out: data_class.AgentBuilderAnswer)
out.message = inp.message
out.answer = inp.result.answer
for ev in inp.result.content:
out.events.append(data_class.Event(code=ev.event_code, message=ev.event_message,
status=ev.event_status, event_type=ev.event_type,
content_type=ev.content_type, detail=ev.outputs))
event = data_class.Event(
code = ev.get("event_code", 0),
message = ev.get("event_message", ""),
status = ev.get("event_status", ""),
event_type = ev.get("event_type", ""),
content_type = ev.get("content_type", ""),
detail = ev.get("detail", {})
)
out.events.append(event)

0 comments on commit 4795ec3

Please sign in to comment.