summaryrefslogtreecommitdiffstats
path: root/src/client/ernie.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ernie.rs')
-rw-r--r--src/client/ernie.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/ernie.rs b/src/client/ernie.rs
index 68d1ace..ffe10f0 100644
--- a/src/client/ernie.rs
+++ b/src/client/ernie.rs
@@ -230,6 +230,7 @@ fn build_body(data: SendData, model: &Model) -> Value {
let SendData {
mut messages,
temperature,
+ top_p,
stream,
} = data;
@@ -242,6 +243,9 @@ fn build_body(data: SendData, model: &Model) -> Value {
if let Some(temperature) = temperature {
body["temperature"] = temperature.into();
}
+ if let Some(top_p) = top_p {
+ body["top_p"] = top_p.into();
+ }
if let Some(max_output_tokens) = model.max_output_tokens {
body["max_output_tokens"] = max_output_tokens.into();