Spaces:
Running
Running
Add type hint to /chat messages parameter (gradio requires typed API params)
Browse files
app.py
CHANGED
|
@@ -129,8 +129,8 @@ app = Server()
|
|
| 129 |
|
| 130 |
|
| 131 |
@app.api()
|
| 132 |
-
def chat(messages, reasoning: bool = True) -> Iterator[dict]:
|
| 133 |
-
"""Reasoning-aware chat endpoint. Takes `messages` (
|
| 134 |
role/content/reasoning_details dicts) and an optional `reasoning` bool.
|
| 135 |
Streams `{"event":"delta","text":...}` lines, then a final `done` event
|
| 136 |
with the new assistant message so the frontend can persist it."""
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
@app.api()
|
| 132 |
+
def chat(messages: list, reasoning: bool = True) -> Iterator[dict]:
|
| 133 |
+
"""Reasoning-aware chat endpoint. Takes `messages` (list of
|
| 134 |
role/content/reasoning_details dicts) and an optional `reasoning` bool.
|
| 135 |
Streams `{"event":"delta","text":...}` lines, then a final `done` event
|
| 136 |
with the new assistant message so the frontend can persist it."""
|