Skip to content

ait: update python token streamin async patterns#3269

Open
owenpearson wants to merge 1 commit intomainfrom
python-token-streaming-async-patterns
Open

ait: update python token streamin async patterns#3269
owenpearson wants to merge 1 commit intomainfrom
python-token-streaming-async-patterns

Conversation

@owenpearson
Copy link
Member

@owenpearson owenpearson commented Mar 12, 2026

Fixes bugs with asyncio/coroutine usage in python examples in the AIT docs where coroutines were created but never actually started. this meant that in some cases coroutines were created and then all executed at once using asyncio.gather, and in some cases coroutines weren't started at all. the most common way to create a coroutine and start it immediately is by wrapping the coroutine in a call to asyncio.create_task, so this PR updates all AIT python examples to do that.

I've tested the new examples with standalone python scripts and verified that they work correctly.

AIT-550

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 92c5d699-d613-4896-8f9a-4dc0c43a7b7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch python-token-streaming-async-patterns

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@owenpearson owenpearson force-pushed the python-token-streaming-async-patterns branch from f9e5541 to 7f44e1a Compare March 12, 2026 11:21
@owenpearson owenpearson requested review from GregHolmes and ttypic and removed request for GregHolmes March 12, 2026 11:41
@owenpearson owenpearson marked this pull request as ready for review March 12, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant