diff options
Diffstat (limited to 'src/client/openai.rs')
| -rw-r--r-- | src/client/openai.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs index c002f52..e5f4d23 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -300,7 +300,11 @@ pub fn openai_build_chat_completions_body(data: ChatCompletionsData, model: &Mod }); if let Some(v) = model.max_tokens_param() { - if model.patch().and_then(|v| v.get("body").and_then(|v| v.get("max_tokens"))) == Some(&Value::Null) { + if model + .patch() + .and_then(|v| v.get("body").and_then(|v| v.get("max_tokens"))) + == Some(&Value::Null) + { body["max_completion_tokens"] = v.into(); } else { body["max_tokens"] = v.into(); |
