Fix OpenAI parameter: use max_completion_tokens instead of max_tokens
Newer OpenAI models (including gpt-5-nano) require max_completion_tokens parameter instead of the deprecated max_tokens parameter.
This commit is contained in:
parent
7cfd228225
commit
06e66f1bc0
1 changed files with 2 additions and 2 deletions
|
|
@ -103,7 +103,7 @@ Remember: Provide helpful, accurate information to assist with operational quest
|
|||
model=self.model,
|
||||
messages=messages,
|
||||
temperature=0.3,
|
||||
max_tokens=1500
|
||||
max_completion_tokens=1500
|
||||
)
|
||||
|
||||
# Parse response
|
||||
|
|
@ -239,7 +239,7 @@ Remember: Provide helpful, accurate information to assist with operational quest
|
|||
model=self.model,
|
||||
messages=messages,
|
||||
temperature=0.3,
|
||||
max_tokens=1500,
|
||||
max_completion_tokens=1500,
|
||||
stream=True
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue