mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Display the different tool calls we need to do
This commit is contained in:
parent
511eef87bf
commit
148816a3da
1 changed files with 11 additions and 1 deletions
|
@ -374,6 +374,16 @@ async fn streamed_chat(
|
|||
);
|
||||
|
||||
for call in meili_calls {
|
||||
tx.send(Event::Data(
|
||||
sse::Data::new_json(&json!({
|
||||
"object": "chat.completion.tool.call",
|
||||
"tool": call,
|
||||
}))
|
||||
.unwrap(),
|
||||
))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let SearchInIndexParameters { index_uid, q } =
|
||||
serde_json::from_str(&call.function.arguments).unwrap();
|
||||
|
||||
|
@ -448,7 +458,7 @@ async fn streamed_chat(
|
|||
);
|
||||
tx.send(Event::Data(
|
||||
sse::Data::new_json(&json!({
|
||||
"object": "chat.completion.tool.event",
|
||||
"object": "chat.completion.tool.output",
|
||||
"tool": tool,
|
||||
}))
|
||||
.unwrap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue