diff --git a/src/smolagents/default_tools.py b/src/smolagents/default_tools.py index 8b6f44f..5628930 100644 --- a/src/smolagents/default_tools.py +++ b/src/smolagents/default_tools.py @@ -146,12 +146,11 @@ class UserInputTool(Tool): class DuckDuckGoSearchTool(Tool): name = "web_search" - description = """Performs a duckduckgo web search based on your query (think a Google search) then returns the top search results as a list of dict elements. - Each result has keys 'title', 'href' and 'body'.""" + description = """Performs a duckduckgo web search based on your query (think a Google search) then returns the top search results.""" inputs = { "query": {"type": "string", "description": "The search query to perform."} } - output_type = "any" + output_type = "string" def __init__(self, *args, max_results=10, **kwargs): super().__init__(*args, **kwargs) diff --git a/src/smolagents/gradio_ui.py b/src/smolagents/gradio_ui.py index b7a8724..a326d7c 100644 --- a/src/smolagents/gradio_ui.py +++ b/src/smolagents/gradio_ui.py @@ -35,9 +35,7 @@ def pull_messages_from_step(step_log: AgentStep, test_mode: bool = True): content=str(content), ) if step_log.observations is not None: - yield gr.ChatMessage( - role="assistant", content=step_log.observations - ) + yield gr.ChatMessage(role="assistant", content=step_log.observations) if step_log.error is not None: yield gr.ChatMessage( role="assistant",