Skip to content

Commit

Permalink
bugfix: allow sending temperature=0 values with a stricter `if temper…
Browse files Browse the repository at this point in the history
…ature is None` comparison when falling back to NOT_GIVEN
  • Loading branch information
nikochiko committed Dec 6, 2024
1 parent bca5888 commit 04b1c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daras_ai_v2/language_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def _run_openai_chat(
max_completion_tokens=max_completion_tokens,
stop=stop or NOT_GIVEN,
n=num_outputs,
temperature=temperature or NOT_GIVEN,
temperature=temperature if temperature is not None else NOT_GIVEN,
frequency_penalty=frequency_penalty,
presence_penalty=presence_penalty,
tools=[tool.spec for tool in tools] if tools else NOT_GIVEN,
Expand Down

0 comments on commit 04b1c1f

Please sign in to comment.