Support multimodal textbox spaces with state inputs and default parameter mapping

This commit is contained in:
Luxferre
2026-09-07 11:38:37 +03:00
parent 9f2a5068f8
commit 491114b2bd
3 changed files with 479 additions and 53 deletions
+1
View File
@@ -17,6 +17,7 @@ Default demo space: `https://tencent-hy3.hf.space`
- Automatically formats conversation history into structured inputs when the space supports them.
- Transparently composes multi-turn dialogue (`System`, `User`, `Assistant`) into single prompt inputs when the space only accepts a single message textbox.
- Automatically pads hidden/State inputs (e.g. Gradio State components) to prevent backend argument count mismatches.
- Automatically handles multimodal textbox inputs (`MultimodalData` with `{text, files}`) and space component defaults (radios, sliders, checkboxes).
- **Real-time streaming & accumulation filter**:
- Automatically computes token deltas from cumulative or incremental Gradio SSE output streams (including 2D Hy3 frames `[[content, reasoning, tool_calls, history]]`).
- Emits standards-compliant `chat.completion.chunk` SSE events in real time.