Skip to content

[BUG] Broken gradio display after stream output feat #1305

@joejoe2

Description

@joejoe2

Describe the bug
After update to 1.15.0, the gradio ui seems to broken.

Code to reproduce the error

from smolagents import CodeAgent, GradioUI, OpenAIServerModel


agent = CodeAgent(
    tools=[],
    model=OpenAIServerModel(
        ...
    ),
    verbosity_level=1,
    name="example_agent",
    description="This is an example agent.",
    step_callbacks=[],
    stream_outputs=True, # or False
)

GradioUI(agent, file_upload_folder="./data").launch()

Error logs (if any)

  1. when stream_outputs=True, the message will display twice.
Image
  1. when stream_outputs=False, the message will nerver display.
Image

Expected behavior
A clear and concise description of what you expected to happen.

Packages version:
1.15.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions