Commit 7ad2ef0
Fix documentation anomalies: incorrect API signatures, missing SDK links, wrong streaming patterns (#598)
## Summary
Systematic audit of all SDK documentation against actual source code
revealed **10 documentation anomalies** across 6 files. All fixes are
documentation-only — no source code changes.
## Changes by File
### Root `README.md`
| Fix | Before | After |
|-----|--------|-------|
| C# unload method name | `await model.Unload()` | `await
model.UnloadAsync()` |
| C# streaming missing parameter |
`CompleteChatStreamingAsync(messages)` |
`CompleteChatStreamingAsync(messages, CancellationToken.None)` |
### `sdk/cs/README.md`
| Fix | Before | After |
|-----|--------|-------|
| Non-existent factory methods (3 occurrences) |
`ChatMessage.FromUser("...")` / `ChatMessage.FromSystem("...")` | `new
ChatMessage { Role = "user", Content = "..." }` |
| Streaming property doesn't exist | `chunk.Choices?[0]?.Delta?.Content`
| `chunk.Choices?[0]?.Message?.Content` |
| Internal property used in public example |
`m.SelectedVariant.Info.DisplayName` | `m.Info.DisplayName` |
### `sdk/js/README.md`
| Fix | Before | After |
|-----|--------|-------|
| Streaming chunk access (2 occurrences) |
`chunk.choices?.[0]?.message?.content` |
`chunk.choices?.[0]?.delta?.content` |
### `sdk/python/README.md`
| Fix | Before | After |
|-----|--------|-------|
| Streaming pattern | Callback:
`client.complete_streaming_chat(messages, on_chunk)` | Generator: `for
chunk in client.complete_streaming_chat(messages):` |
### `sdk/rust/README.md`
| Fix | Before | After |
|-----|--------|-------|
| Non-existent trait | "All models implement the `IModel` trait" | "All
models are represented by the `Model` type" |
| Missing error variant | 8 variants listed | 9 variants (added
`Internal { reason }`) |
| Wrong license | "MIT" | "Microsoft Software License Terms" |
### `docs/README.md`
| Fix | Before | After |
|-----|--------|-------|
| Missing SDK references | Only C# and JS listed | Added Python and Rust
SDK links |
## Verification Method
Each fix was verified by reading the actual source code:
- C# `ChatMessage` constructor syntax confirmed in
`ChatCompletionsTests.cs`
- C# streaming `Message.Content` (not `Delta`) confirmed in
`ChatClient.cs` — both streaming and non-streaming return
`ChatCompletionCreateResponse`
- JS streaming `delta.content` confirmed in `chatClient.ts` JSDoc
- Python generator return confirmed in `chat_client.py:263-290`
- Rust `Model` struct confirmed in `lib.rs:16`; no trait exists
- Rust error variants confirmed in `error.rs:4-33`
- LICENSE file confirmed as Microsoft Software License Terms
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baijumeswani <12852605+baijumeswani@users.noreply.github.com>
Co-authored-by: Baiju Meswani <baijumeswani@gmail.com>1 parent aa6c9be commit 7ad2ef0
6 files changed
+18
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| |||
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
523 | | - | |
| 524 | + | |
0 commit comments