Set proper model name in `Assistant::chat` request

This commit is contained in:
Héctor Ramón Jiménez 2024-07-12 10:40:11 +02:00
parent 537b385381
commit d3e195fd6f
No known key found for this signature in database
GPG Key ID: 7CC46565708259A7
1 changed files with 2 additions and 1 deletions

View File

@ -319,6 +319,7 @@ impl Assistant {
history: &[Message],
message: &str,
) -> impl Stream<Item = Result<ChatEvent, ChatError>> {
let model = self.model.clone();
let history = history.to_vec();
let message = message.to_owned();
@ -347,7 +348,7 @@ impl Assistant {
port = Self::HOST_PORT
))
.json(&json!({
"model": "tgi",
"model": format!("{model}", model = model.name()),
"messages": messages,
"stream": true,
"cache_prompt": true,