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.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/ollama.rs b/src/client/ollama.rs
index 434e487..1394ced 100644
--- a/src/client/ollama.rs
+++ b/src/client/ollama.rs
@@ -179,15 +179,14 @@ fn build_body(data: SendData, model: &Model) -> Result<Value> {
"options": {},
});
- if let Some(num_predict) = model.max_output_tokens {
- body["options"]["num_predict"] = num_predict.into();
+ if let Some(v) = model.max_output_tokens {
+ body["options"]["num_predict"] = v.into();
}
-
- if let Some(temperature) = temperature {
- body["options"]["temperature"] = temperature.into();
+ if let Some(v) = temperature {
+ body["options"]["temperature"] = v.into();
}
- if let Some(top_p) = top_p {
- body["options"]["top_p"] = top_p.into();
+ if let Some(v) = top_p {
+ body["options"]["top_p"] = v.into();
}
Ok(body)