summaryrefslogtreecommitdiffstats
path: root/src/client/cohere.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/cohere.rs')
-rw-r--r--src/client/cohere.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/cohere.rs b/src/client/cohere.rs
index 4d713b6..cfab0fa 100644
--- a/src/client/cohere.rs
+++ b/src/client/cohere.rs
@@ -110,6 +110,7 @@ fn build_body(data: SendData, model: &Model) -> Result<Value> {
let SendData {
mut messages,
temperature,
+ top_p,
stream,
} = data;
@@ -173,6 +174,9 @@ fn build_body(data: SendData, model: &Model) -> Result<Value> {
if let Some(temperature) = temperature {
body["temperature"] = temperature.into();
}
+ if let Some(top_p) = top_p {
+ body["p"] = top_p.into();
+ }
if stream {
body["stream"] = true.into();
}