Skip to content

Python: docs: add self-hosting sample snippets - #7104

Merged
eavanvalkenburg merged 3 commits into
microsoft:mainfrom
eavanvalkenburg:document-telegram-hosting-sample
Jul 17, 2026
Merged

Python: docs: add self-hosting sample snippets#7104
eavanvalkenburg merged 3 commits into
microsoft:mainfrom
eavanvalkenburg:document-telegram-hosting-sample

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

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

  • What are the major changes? Adds named documentation snippet regions to the local Responses, workflow, and Telegram hosting samples; expands the hosting sample index.
  • What is the impact of these changes? Documentation can reference focused, runnable self-hosting examples and users can discover the Telegram sample from the hosting sample index.
  • What do you want reviewers to focus on? Verify the snippet boundaries preserve sample behavior and accurately represent the hosting seams.

Related Issue

N/A

Contribution Checklist

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 636b7fb2-381a-4d62-b5cf-d029efa3ad20
Copilot AI review requested due to automatic review settings July 14, 2026 08:53
@giles17 giles17 added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Jul 14, 2026
@github-actions github-actions Bot changed the title docs: add self-hosting sample snippets Python: docs: add self-hosting sample snippets Jul 14, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Code Review

Reviewers: 5 | Confidence: 86% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by eavanvalkenburg's agents

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-hosting self-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.

Comment thread python/samples/AGENTS.md
Comment thread python/samples/04-hosting/README.md Outdated
Comment thread python/samples/04-hosting/README.md Outdated
eavanvalkenburg and others added 2 commits July 14, 2026 10:57
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
@eavanvalkenburg
eavanvalkenburg added this pull request to the merge queue Jul 17, 2026
Merged via the queue into microsoft:main with commit 1036fa7 Jul 17, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants