From 69f7ed8d0e9649b55d49d5b01029557112292f64 Mon Sep 17 00:00:00 2001 From: Selcuk Gun Date: Thu, 15 May 2025 17:29:27 -0700 Subject: [PATCH] Rename ollama sample script and await create_session PiperOrigin-RevId: 759369988 --- .../samples/hello_world_ollama/{asyncio_run.py => main.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename contributing/samples/hello_world_ollama/{asyncio_run.py => main.py} (95%) diff --git a/contributing/samples/hello_world_ollama/asyncio_run.py b/contributing/samples/hello_world_ollama/main.py similarity index 95% rename from contributing/samples/hello_world_ollama/asyncio_run.py rename to contributing/samples/hello_world_ollama/main.py index 2f106df..9a679f4 100755 --- a/contributing/samples/hello_world_ollama/asyncio_run.py +++ b/contributing/samples/hello_world_ollama/main.py @@ -41,7 +41,7 @@ async def main(): artifact_service=artifact_service, session_service=session_service, ) - session_11 = session_service.create_session( + session_11 = await session_service.create_session( app_name=app_name, user_id=user_id_1 ) @@ -66,7 +66,7 @@ async def main(): session_11, 'Roll a die with 100 sides and check if it is prime' ) await run_prompt(session_11, 'Roll it again.') - await run_prompt(session_11, 'What numbers did I got?') + await run_prompt(session_11, 'What numbers did I get?') end_time = time.time() print('------------------------------------') print('End time:', end_time)