Python: docs: add self-hosting sample snippets#7104
Open
eavanvalkenburg wants to merge 3 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 636b7fb2-381a-4d62-b5cf-d029efa3ad20
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds documentation snippet regions to Python self-hosting samples (local OpenAI Responses routes, a workflow-based Responses route, and a Telegram bot sample) and updates the hosting samples index so Learn/docs can link to focused, runnable source excerpts.
Changes:
- Added named snippet markers around key “hosting seam” code paths in the local Responses, workflow Responses, and Telegram hosting samples.
- Updated the hosting samples index to include the new
af-hostingself-hosting helpers section.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/AGENTS.md | Adds af-hosting to the sample directory tree (and updates the hosting index view). |
| python/samples/04-hosting/README.md | Adds a new hosting option pointing to af-hosting and a corresponding “How to Choose” entry. |
| python/samples/04-hosting/af-hosting/local_telegram/app.py | Adds snippet boundaries around the Telegram-to-agent run + streaming + session persistence seam. |
| python/samples/04-hosting/af-hosting/local_responses/app.py | Adds snippet boundaries around the FastAPI /responses route implementation. |
| python/samples/04-hosting/af-hosting/local_responses_workflow/app.py | Adds snippet boundaries around the workflow-backed FastAPI /responses route implementation. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 636b7fb2-381a-4d62-b5cf-d029efa3ad20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 636b7fb2-381a-4d62-b5cf-d029efa3ad20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
Document the self-hosting sample seams so Learn content can stay linked to runnable source examples, including the Telegram hosting sample.
Description & Review Guide
Related Issue
N/A
Contribution Checklist