init sample overhaul#825
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR overhauls the multi-language sample suite to remove MS Learn/tutorial and WinML-verification content and condense each language down to four standardized capability samples: chat-completion, embeddings, audio, and responses-api. It also switches every sample from consuming a published SDK package to consuming the in-repo SDK source, so samples now track main (Rust/Python/C# via path/project/editable references, JS via a file: dependency, C++ via the existing sdk_v2/cpp source).
Changes:
- Delete legacy/tutorial/WinML samples (e.g.,
tutorial-*,native-chat-completions,verify-winml,audio-transcription-example,live-audio-transcription-example) and consolidate into 4 per-language capability samples. - Repoint all sample manifests (
Cargo.toml,package.json,requirements.txt,.csproj,nuget.config,Directory.Packages.props) to local SDK source and drop Windows-only WinML feature/target dependencies. - Rewrite top-level and per-language README/docs to describe the new 4-sample structure and local-source consumption; expand
chat-completionandaudiosamples to demonstrate both native inference and the web server / file mode.
Reviewed changes
Copilot reviewed 188 out of 204 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
samples/{rust,js,python,cs,cpp}/README.md |
Rewritten sample tables for the 4 condensed capabilities and local-source consumption notes |
samples/rust/Cargo.toml + responses-api/* |
Workspace members reduced to 4; responses-api renamed and WinML target dep removed |
samples/rust/{tutorial-*,verify-winml,tool-calling-foundry-local}/* |
Legacy/tutorial/WinML samples deleted |
samples/js/*/package.json, app.js |
SDK switched to file:../../../sdk/js; chat-completion adds web-server flow |
samples/python/*/requirements.txt, src/*.py |
SDK switched to editable -e ../../../sdk/python; chat-completion adds web-server flow |
samples/cs/Directory.Packages.props, nuget.config, */*.csproj, Program.cs |
Central versions trimmed; ProjectReference to SDK source; audio adds --file/--synth modes |
samples/cpp/** |
New CMake/common helpers and 4 condensed C++ samples |
sdk/rust/README.md, sdk_v2/python/README.md |
Sample-link/table references updated to new sample names |
The samples themselves consistently track the new 4-capability structure, workspace/member lists match the remaining directories, and I found no dangling documentation references to the deleted sample names. The one concrete issue is that the JS README's setup instructions are incorrect for a fresh clone: sdk/js/dist/ is a gitignored build artifact, so following the documented npm install / npm start steps fails until sdk/js is built. Given the very large surface area (100+ files across five languages), multiple build-system/packaging changes, and the file-by-file diffs that were partially truncated, this is beyond what can be safely auto-approved.
| > Each sample's `package.json` references the SDK via `"foundry-local-sdk": "file:../../../sdk/js"`, | ||
| > so `npm install` builds against the in-repo SDK. The SDK ships a prebuilt `dist/` and downloads its | ||
| > native runtime on install. If you've changed the SDK source, rebuild it first with | ||
| > `npm install && npm run build` (and `npm run build:native` to rebuild the native addon) inside | ||
| > `sdk/js`. |
Overhaul samples to remove MSLearn content and condense down into capabilities.