akhaliq HF Staff Claude commited on
Commit
fc64284
·
1 Parent(s): 35f71ba

Add type hint to /chat messages parameter (gradio requires typed API params)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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` (JSON-encoded 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."""
 
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."""