Skip to content

Issue 434 #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Issue 434 #437

wants to merge 3 commits into from

Conversation

novoforce
Copy link

Problem

The code example for using the Runner with InMemorySessionService was missing the necessary async/await structure for creating a session.

Symptom

This caused the example to fail at runtime with two errors:

  1. A RuntimeWarning: coroutine 'InMemorySessionService.create_session' was never awaited
  2. A subsequent ValueError: Session not found because the session was never actually created.

Solution

This PR corrects the example by:

  1. Wrapping the main execution logic in an async def main() function.
  2. Using await on the session_service.create_session() call.
  3. Running the script with asyncio.run(main()).

@novoforce
Copy link
Author

Problem

The code example for using the Runner with InMemorySessionService was missing the necessary async/await structure for creating a session.

Symptom

This caused the example to fail at runtime with two errors:

  1. A RuntimeWarning: coroutine 'InMemorySessionService.create_session' was never awaited
  2. A subsequent ValueError: Session not found because the session was never actually created.

Solution

This PR corrects the example by:

  1. Wrapping the main execution logic in an async def main() function.
  2. Using await on the session_service.create_session() call.
  3. Running the script with asyncio.run(main()).

Fix for the issue: #434

@lavinigam-gcp
Copy link
Collaborator

Hi @novoforce Can you resolve the merge conflict?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants