update run_default for run_mcp.py
This commit is contained in:
parent
35209978e1
commit
d0492a500e
11
run_mcp.py
11
run_mcp.py
@ -51,9 +51,14 @@ class MCPRunner:
|
|||||||
|
|
||||||
async def run_default(self) -> None:
|
async def run_default(self) -> None:
|
||||||
"""Run the agent in default mode."""
|
"""Run the agent in default mode."""
|
||||||
await self.agent.run(
|
prompt = input("Enter your prompt: ")
|
||||||
"Hello, what tools are available to me? Terminate after you have listed the tools."
|
if not prompt.strip():
|
||||||
)
|
logger.warning("Empty prompt provided.")
|
||||||
|
return
|
||||||
|
|
||||||
|
logger.warning("Processing your request...")
|
||||||
|
await self.agent.run(prompt)
|
||||||
|
logger.info("Request processing completed.")
|
||||||
|
|
||||||
async def cleanup(self) -> None:
|
async def cleanup(self) -> None:
|
||||||
"""Clean up agent resources."""
|
"""Clean up agent resources."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user