mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-06 20:25:40 +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
|
// Using deprecated field but keeping for compatibility
|
||||||
function_call: _,
|
function_call: _,
|
||||||
ref tool_calls,
|
ref tool_calls,
|
||||||
role: _,
|
role,
|
||||||
refusal: _,
|
refusal: _,
|
||||||
} = delta;
|
} = 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;
|
break 'main;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user