Commit fb3fc30
authored
Big progress towards refactor in #310
- Replace `CallModelRequest` with passing the fields directly to `call_model`. The extra type wasn't necessary.
- Remove `Context`, moving the only field it contained (`algorithm`) into `Driver`. This fixes a TODO in `llm_class.rs` where the Context was missing that value.
- Drop the `Arc` on `CallModel`'s `Decision`. Now that `Decision` is a struct, cloning it is cheap (two short strings).
- Adds `into_parts` to allow caller to handle the final call. This calls `respond` with an `Abandoned` error to let the algorithm know.
Most of the diff is `Arc<Decision>` -> `Decision` and removing param `ctx` from everywhere.
Assisted-by: Claude:Opus 5 medium
Signed-off-by: Graham King <grahamk@nvidia.com>
1 parent bced06f commit fb3fc30
22 files changed
Lines changed: 436 additions & 733 deletions
File tree
- crates
- libsy-llm-client
- src
- tests
- libsy/src
- algorithms
- util
- core
- protocol
- src
- switchyard-py/src
- switchyard-server/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments