Change DuckDuckGoSearchTool output_type to string (#116)
* Change DuckDuckGoSearchTool output_type to string and update description accordingly
This commit is contained in:
parent
681758ae84
commit
e5d879feab
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue