mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 05:54:19 +02:00
fix: skip max_completion_tokens when maxTokens is None (#3284)
This commit is contained in:
parent
e87ede075c
commit
549f48bc7a
1 changed files with 2 additions and 1 deletions
|
|
@ -84,8 +84,9 @@ class OpenAISamplingHandler:
|
|||
kwargs: dict[str, Any] = {
|
||||
"model": model,
|
||||
"messages": openai_messages,
|
||||
"max_completion_tokens": params.maxTokens,
|
||||
}
|
||||
if params.maxTokens is not None:
|
||||
kwargs["max_completion_tokens"] = params.maxTokens
|
||||
if params.temperature is not None:
|
||||
kwargs["temperature"] = params.temperature
|
||||
if params.stopSequences:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue