conductor-checkpoint-msg_017fAeUG21Ym1EeofanFzFGa
This commit is contained in:
parent
60742dca76
commit
f58675f577
1 changed files with 4 additions and 1 deletions
|
|
@ -99,10 +99,13 @@ class OpenAIClient(BaseOpenAIClient):
|
|||
verbosity: str | None = None,
|
||||
):
|
||||
"""Create a regular completion with JSON format."""
|
||||
# Reasoning models (gpt-5 family) don't support temperature
|
||||
is_reasoning_model = model.startswith('gpt-5') or model.startswith('o1') or model.startswith('o3')
|
||||
|
||||
return await self.client.chat.completions.create(
|
||||
model=model,
|
||||
messages=messages,
|
||||
temperature=temperature,
|
||||
temperature=temperature if not is_reasoning_model else None,
|
||||
max_tokens=max_tokens,
|
||||
response_format={'type': 'json_object'},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue