Commit 700f90e
Stream content endpoint (foundation-model-stack#272)
* wip: /stream-content endpoint
Signed-off-by: Mateus Devino <[email protected]>
* wip: initial streaming and request parsing
Signed-off-by: Mateus Devino <[email protected]>
* wip: refactor stream error handling
Signed-off-by: Mateus Devino <[email protected]>
* Improve error handling
Signed-off-by: Mateus Devino <[email protected]>
* tweaks
Signed-off-by: declark1 <[email protected]>
* Move handle_streaming_content_detection handler to separate file
Signed-off-by: declark1 <[email protected]>
* Rename response 'detections' field
Signed-off-by: Mateus Devino <[email protected]>
* Fix error handling when 'content' is missing on first request
Signed-off-by: Mateus Devino <[email protected]>
* Fix generation streaming endpoint link
Signed-off-by: Mateus Devino <[email protected]>
* Fix error handling - second stream message onwards
Signed-off-by: Mateus Devino <[email protected]>
* Return an actual ndjson
Signed-off-by: Mateus Devino <[email protected]>
* stream client binary (for testing)
Signed-off-by: Mateus Devino <[email protected]>
* nd_json for error
Signed-off-by: Mateus Devino <[email protected]>
* Refactor detector extraction from first frame
Signed-off-by: Mateus Devino <[email protected]>
* wip: adapt existing code to new endpoint
Signed-off-by: Mateus Devino <[email protected]>
* Adapt aggregator logic
Signed-off-by: Mateus Devino <[email protected]>
* Forward results to output stream
Signed-off-by: Mateus Devino <[email protected]>
* Fix error handling for second frame onward
Signed-off-by: Mateus Devino <[email protected]>
* Remove unused code
Signed-off-by: Mateus Devino <[email protected]>
* Rename generation variables
Signed-off-by: Mateus Devino <[email protected]>
* Re-add request validation
Signed-off-by: Mateus Devino <[email protected]>
* Remove unused code
Signed-off-by: Mateus Devino <[email protected]>
* Re-add missing aggregator test
Signed-off-by: Mateus Devino <[email protected]>
* Remove unneeded derives
Signed-off-by: Mateus Devino <[email protected]>
* Add copyright note to streaming_content_detection/aggregator.rs
Signed-off-by: Mateus Devino <[email protected]>
* Nest imports on streaming_content_detection.rs
Signed-off-by: Mateus Devino <[email protected]>
* Rename request to frame
Signed-off-by: Mateus Devino <[email protected]>
* Remove unused variable
Signed-off-by: Mateus Devino <[email protected]>
* Replace errors Debug with Display
Signed-off-by: Mateus Devino <[email protected]>
* Reuse streaming/aggregator.rs types
Signed-off-by: Mateus Devino <[email protected]>
* Simplify aggregator logic
Signed-off-by: Mateus Devino <[email protected]>
* Refactor nd_json conversion logic
Signed-off-by: Mateus Devino <[email protected]>
* Rename streaming_output_detection_task()
Signed-off-by: Mateus Devino <[email protected]>
* Drop validation for extra detectors on second frame onwards
Signed-off-by: Mateus Devino <[email protected]>
* Fix import formatting
Signed-off-by: Mateus Devino <[email protected]>
* Add comments for a possible refactor
Signed-off-by: Mateus Devino <[email protected]>
* Replace Tracker Default implementation with a derive macro
Signed-off-by: Mateus Devino <[email protected]>
---------
Signed-off-by: Mateus Devino <[email protected]>
Signed-off-by: declark1 <[email protected]>
Co-authored-by: declark1 <[email protected]>1 parent 0da639d commit 700f90e
File tree
10 files changed
+1055
-11
lines changed- src
- orchestrator
- streaming_content_detection
- streaming
- utils
10 files changed
+1055
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1108 | 1136 | | |
1109 | 1137 | | |
1110 | 1138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
493 | 521 | | |
494 | 522 | | |
495 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
| 387 | + | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
0 commit comments