summaryrefslogtreecommitdiffstats
path: root/src/client/ollama.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ollama.rs')
-rw-r--r--src/client/ollama.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/ollama.rs b/src/client/ollama.rs
index 0705f2e..a3e23c9 100644
--- a/src/client/ollama.rs
+++ b/src/client/ollama.rs
@@ -69,6 +69,7 @@ impl OllamaClient {
Model::new(client_name, &v.name)
.set_capabilities(v.capabilities)
.set_max_tokens(v.max_tokens)
+ .set_extra_fields(v.extra_fields.clone())
.set_tokens_count_factors(TOKENS_COUNT_FACTORS)
})
.collect()
@@ -77,7 +78,9 @@ impl OllamaClient {
fn request_builder(&self, client: &ReqwestClient, data: SendData) -> Result<RequestBuilder> {
let api_key = self.get_api_key().ok();
- let body = build_body(data, self.model.name.clone())?;
+ let mut body = build_body(data, self.model.name.clone())?;
+
+ self.model.merge_extra_fields(&mut body);
let chat_endpoint = self.config.chat_endpoint.as_deref().unwrap_or("/api/chat");