fix: allow setting temperature to 0 in OpenAIModel.py (#3465)
Update OpenAIModel.py- Fix can not set temperature to 0 bug. As when the input temperature is 0, the condition would become False , so this expressing set it to 0.1, it become impossible to set it to 0.
This commit is contained in:
parent
6ce733570f
commit
5ffaa78e1c
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ class OpenAIModelComponent(LCModelComponent):
|
||||||
model=model_name,
|
model=model_name,
|
||||||
base_url=openai_api_base,
|
base_url=openai_api_base,
|
||||||
api_key=api_key,
|
api_key=api_key,
|
||||||
temperature=temperature or 0.1,
|
temperature=temperature if temperature is not None else 0.1,
|
||||||
seed=seed,
|
seed=seed,
|
||||||
)
|
)
|
||||||
if json_mode:
|
if json_mode:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue