Skip to content

Commit e1823e9

Browse files
author
Andy
committed
feat: Add a travel planner powered by a custom-configured model.
1 parent 7a37eae commit e1823e9

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

examples/travel_planner/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
agent_card = AgentCard(
2525
name='travel planner Agent',
2626
description='travel planner',
27-
url='http://localhost:9999/',
27+
url='http://localhost:10001/',
2828
version='1.0.0',
2929
defaultInputModes=['text'],
3030
defaultOutputModes=['text'],
@@ -44,4 +44,4 @@
4444
)
4545
import uvicorn
4646

47-
uvicorn.run(server.build(), host='0.0.0.0', port=9999)
47+
uvicorn.run(server.build(), host='0.0.0.0', port=10001)

examples/travel_planner/agent.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ async def stream(self, query: str) -> AsyncGenerator[str, None]:
6464
# Return the text content block.
6565
if hasattr(chunk, 'content') and chunk.content:
6666
yield {'content': chunk.content, 'done': False}
67-
i = 1
68-
while i <= 100:
69-
yield {'content': str(i), 'done': False}
70-
i += 1
71-
await asyncio.sleep(0.5)
72-
yield {'content': '\n', 'done': True}
67+
yield {'content': '', 'done': True}
7368

7469
except Exception as e:
7570
print(f"error:{str(e)}")

examples/travel_planner/loop_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def main() -> None:
5252
print_welcome_message()
5353
async with httpx.AsyncClient() as httpx_client:
5454
client = await A2AClient.get_client_from_agent_card_url(
55-
httpx_client, 'http://localhost:9999'
55+
httpx_client, 'http://localhost:10001'
5656
)
5757
await interact_with_server(client)
5858

0 commit comments

Comments
 (0)