mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-06 04:05:37 +00:00
Update the streaming detection to work with Mistral
This commit is contained in:
parent
116fbb4c24
commit
afadfa420a
@ -281,11 +281,14 @@ async fn streamed_chat(
|
||||
// Using deprecated field but keeping for compatibility
|
||||
function_call: _,
|
||||
ref tool_calls,
|
||||
role: _,
|
||||
role,
|
||||
refusal: _,
|
||||
} = delta;
|
||||
|
||||
if content.is_none() && tool_calls.is_none() && global_tool_calls.is_empty()
|
||||
if content.as_ref().map_or(true, |s| s.is_empty())
|
||||
&& tool_calls.is_none()
|
||||
&& global_tool_calls.is_empty()
|
||||
&& role.is_none()
|
||||
{
|
||||
break 'main;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user