mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-16 18:25:17 +02:00
added web_search tool to agents
This commit is contained in:
parent
aad14804ea
commit
41c3f2cfc6
1 changed files with 10 additions and 7 deletions
|
|
@ -13,7 +13,7 @@ from .helpers.instructions import (
|
||||||
add_rag_instructions_to_agent
|
add_rag_instructions_to_agent
|
||||||
)
|
)
|
||||||
|
|
||||||
from agents import Agent as NewAgent, Runner, FunctionTool, RunContextWrapper, ModelSettings
|
from agents import Agent as NewAgent, Runner, FunctionTool, RunContextWrapper, ModelSettings, WebSearchTool
|
||||||
# Add import for OpenAI functionality
|
# Add import for OpenAI functionality
|
||||||
from src.utils.common import common_logger as logger, generate_openai_output
|
from src.utils.common import common_logger as logger, generate_openai_output
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
@ -221,6 +221,9 @@ def get_agents(agent_configs, tool_configs, complete_request):
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"function": tool_config
|
"function": tool_config
|
||||||
})
|
})
|
||||||
|
if tool_name == "web_search":
|
||||||
|
tool = WebSearchTool()
|
||||||
|
else:
|
||||||
tool = FunctionTool(
|
tool = FunctionTool(
|
||||||
name=tool_name,
|
name=tool_name,
|
||||||
description=tool_config["description"],
|
description=tool_config["description"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue