Update wellbe_agent.py
Browse files- wellbe_agent.py +7 -3
wellbe_agent.py
CHANGED
|
@@ -43,7 +43,8 @@ def build_mcp_servers(
|
|
| 43 |
healthcare_server = MCPServerStreamableHttp(
|
| 44 |
params=cfg["healthcare-mcp-public"], name="Healthcare MCP Server"
|
| 45 |
)
|
| 46 |
-
whoop_server = MCPServerStdio(params=cfg["whoop"], name="Whoop MCP Server")
|
|
|
|
| 47 |
return healthcare_server, whoop_server
|
| 48 |
|
| 49 |
def select_model() -> Union[str, LitellmModel]:
|
|
@@ -59,12 +60,15 @@ async def answer_question(
|
|
| 59 |
"""Run the WellBe+ agent on a single question and return the assistant reply."""
|
| 60 |
healthcare_srv, whoop_srv = build_mcp_servers(whoop_email, whoop_password)
|
| 61 |
|
| 62 |
-
async with healthcare_srv as hserver
|
| 63 |
agent = Agent(
|
| 64 |
name="WellBe+ Assistant",
|
| 65 |
instructions=PROMPT_TEMPLATE,
|
| 66 |
model=select_model(),
|
| 67 |
-
mcp_servers=[
|
|
|
|
|
|
|
|
|
|
| 68 |
)
|
| 69 |
result = await Runner.run(agent, question)
|
| 70 |
return result.final_output
|
|
|
|
| 43 |
healthcare_server = MCPServerStreamableHttp(
|
| 44 |
params=cfg["healthcare-mcp-public"], name="Healthcare MCP Server"
|
| 45 |
)
|
| 46 |
+
# whoop_server = MCPServerStdio(params=cfg["whoop"], name="Whoop MCP Server")
|
| 47 |
+
whoop_server "Whoop Tool Not available now"
|
| 48 |
return healthcare_server, whoop_server
|
| 49 |
|
| 50 |
def select_model() -> Union[str, LitellmModel]:
|
|
|
|
| 60 |
"""Run the WellBe+ agent on a single question and return the assistant reply."""
|
| 61 |
healthcare_srv, whoop_srv = build_mcp_servers(whoop_email, whoop_password)
|
| 62 |
|
| 63 |
+
async with healthcare_srv as hserver: #, whoop_srv as wserver:
|
| 64 |
agent = Agent(
|
| 65 |
name="WellBe+ Assistant",
|
| 66 |
instructions=PROMPT_TEMPLATE,
|
| 67 |
model=select_model(),
|
| 68 |
+
mcp_servers=[
|
| 69 |
+
hserver
|
| 70 |
+
#, wserver
|
| 71 |
+
],
|
| 72 |
)
|
| 73 |
result = await Runner.run(agent, question)
|
| 74 |
return result.final_output
|