Commit 4ea1657
committed
chore(examples): soften 00 determinism wording + clarify 09 loop exit
- 00 hello-world: docstring + module comment described
temperature=0.0 as making the run "reproduce deterministically",
which over-promises. LLM APIs don't guarantee strict determinism
even at temp 0 (provider-side batching, GPU sampling heuristics,
model-version drift). Reworded to "reduces sampling variance" and
"as reproducible as the API allows" so the pedagogical point
(RuntimeConfig is the tuning knob) lands without an inaccurate
guarantee. ``_DETERMINISTIC`` variable name kept as a recognizable
shorthand for the demo.
- 09 tool-use: docstring said the loop terminates when
``finish_reason="stop"``, but the route function actually checks
whether the last AssistantMessage carries any ``tool_calls``.
finish_reason isn't tracked in state. Reworded to match the
implementation: "loop terminates when the assistant message has
no tool_calls (the model is done requesting tools) or after a
hard turn cap."1 parent 833163d commit 4ea1657
2 files changed
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments