wrap tools = await mcp.register_tools(llm) in try in examples

This commit is contained in:
vipyne
2025-11-04 09:01:01 -06:00
parent ef88d6a2ea
commit b7a4d7371c
4 changed files with 36 additions and 14 deletions

View File

@@ -144,7 +144,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
mcp_image = UrlToImageProcessor(aiohttp_session=session)
tools = await mcp.register_tools(llm)
tools = {}
try:
tools = await mcp.register_tools(llm)
except Exception as e:
logger.error(f"error registering tools")
logger.exception("error trace:")
system = f"""
You are a helpful LLM in a WebRTC call.