We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e6336e commit af5a130Copy full SHA for af5a130
src/huggingface_hub/inference/_mcp/mcp_client.py
@@ -272,9 +272,6 @@ async def process_single_turn_with_tools(
272
273
# Read from stream
274
async for chunk in response:
275
- # Yield each chunk to caller
276
- yield chunk
277
-
278
num_of_chunks += 1
279
delta = chunk.choices[0].delta if chunk.choices and len(chunk.choices) > 0 else None
280
if not delta:
@@ -304,6 +301,9 @@ async def process_single_turn_with_tools(
304
301
if exit_if_first_chunk_no_tool and num_of_chunks <= 2 and len(final_tool_calls) == 0:
305
302
return
306
303
+ # Yield each chunk to caller
+ yield chunk
+
307
if message["content"]:
308
messages.append(message)
309
0 commit comments