diff options
Diffstat (limited to 'src/client/vertexai.rs')
| -rw-r--r-- | src/client/vertexai.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/vertexai.rs b/src/client/vertexai.rs index d9c1019..e0ae567 100644 --- a/src/client/vertexai.rs +++ b/src/client/vertexai.rs @@ -158,7 +158,8 @@ pub(crate) fn build_body( let SendData { mut messages, temperature, - .. + top_p, + stream: _, } = data; patch_system_message(&mut messages); @@ -223,6 +224,10 @@ pub(crate) fn build_body( body["generationConfig"]["temperature"] = temperature.into(); } + if let Some(top_p) = top_p { + body["generationConfig"]["topP"] = top_p.into(); + } + Ok(body) } |
