Skip to content

add async-thinking example#678

Open
red1-for-hek wants to merge 2 commits into
ollama:mainfrom
red1-for-hek:main
Open

add async-thinking example#678
red1-for-hek wants to merge 2 commits into
ollama:mainfrom
red1-for-hek:main

Conversation

@red1-for-hek
Copy link
Copy Markdown

Adds async-thinking.py to the examples folder — the async equivalent
of the existing thinking.py.

This follows the same pattern used by the other async examples:

  • async-chat.py mirrors chat.py
  • async-generate.py mirrors generate.py
  • async-tools.py mirrors tools.py

Also updates examples/README.md to list the new example.

Copilot AI review requested due to automatic review settings June 5, 2026 11:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new async example demonstrating “thinking mode” usage with the Ollama AsyncClient, and links it from the examples README.

Changes:

  • Introduce examples/async-thinking.py async script that calls AsyncClient.chat(..., think=True) and prints thinking + response.
  • Add the new example link under the “Thinking (generate)” section in examples/README.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
examples/async-thinking.py New async example for enabling and printing model “thinking” output.
examples/README.md Adds a link to the new async thinking example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/async-thinking.py
Comment thread examples/async-thinking.py
Comment thread examples/async-thinking.py
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.

2 participants