Commit eac4bbf
authored
Addressed issue where dynamic types were not streaming. (#1606)
- Updated `ir_helpers/mod.rs` to introduce `IRHelperExtended` and
`IRSemanticStreamingHelper` traits, adding methods for class field
management and streaming behavior.
- Modified `mod.rs` to export the new traits and updated relevant
imports across the codebase.
- Refactored `validate_streaming_state` and `process_node` functions in
`semantic_streaming.rs` to utilize the new traits for improved type
handling.
- Adjusted various modules to implement the extended functionality,
ensuring better integration with runtime context and type management.
This update improves the flexibility and usability of the IR helper
functions, facilitating better handling of class fields and streaming
requirements.
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Introduce `IRHelperExtended` and `IRSemanticStreamingHelper` traits to
enhance dynamic type handling and streaming behavior in the Intermediate
Representation.
>
> - **Traits**:
> - Introduce `IRHelperExtended` and `IRSemanticStreamingHelper` in
`ir_helpers/mod.rs` for class field management and streaming behavior.
> - Implement these traits in `IntermediateRepr` and `ScopedIr`.
> - **Functions**:
> - Refactor `validate_streaming_state` and `process_node` in
`semantic_streaming.rs` to use new traits.
> - Update `parsed_value_to_response` in `llm_client/mod.rs` and
`helpers/mod.rs` to utilize new traits.
> - **Modules**:
> - Modify `mod.rs` to export new traits and update imports across the
codebase.
> - Adjust various modules to implement extended functionality for
better runtime context and type management.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for e9cb26c. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->1 parent 366af1a commit eac4bbf
File tree
19 files changed
+1060
-810
lines changed- engine
- baml-lib
- baml-core/src/ir
- ir_helpers
- jsonish/src
- deserializer
- helpers
- baml-runtime/src
- internal
- llm_client
- prompt_renderer
- runtime
- type_builder
- types
- language_client_codegen/src
- python
- ruby
- typescript
19 files changed
+1060
-810
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 12 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 238 | + | |
245 | 239 | | |
246 | 240 | | |
247 | 241 | | |
| |||
250 | 244 | | |
251 | 245 | | |
252 | 246 | | |
253 | | - | |
| 247 | + | |
254 | 248 | | |
255 | 249 | | |
256 | 250 | | |
257 | 251 | | |
258 | 252 | | |
259 | 253 | | |
260 | 254 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 255 | + | |
278 | 256 | | |
279 | 257 | | |
280 | 258 | | |
| |||
285 | 263 | | |
286 | 264 | | |
287 | 265 | | |
288 | | - | |
| 266 | + | |
289 | 267 | | |
290 | 268 | | |
291 | 269 | | |
292 | 270 | | |
293 | 271 | | |
294 | 272 | | |
295 | | - | |
296 | | - | |
| 273 | + | |
297 | 274 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 275 | + | |
310 | 276 | | |
311 | 277 | | |
312 | 278 | | |
313 | 279 | | |
314 | | - | |
| 280 | + | |
315 | 281 | | |
316 | 282 | | |
317 | 283 | | |
| |||
353 | 319 | | |
354 | 320 | | |
355 | 321 | | |
356 | | - | |
| 322 | + | |
357 | 323 | | |
358 | 324 | | |
359 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | | - | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
16 | 21 | | |
17 | | - | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | | - | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments