mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Use configured temperature value in create_chat_completion function
This commit is contained in:
@@ -5,7 +5,7 @@ cfg = Config()
|
|||||||
openai.api_key = cfg.openai_api_key
|
openai.api_key = cfg.openai_api_key
|
||||||
|
|
||||||
# Overly simple abstraction until we create something better
|
# Overly simple abstraction until we create something better
|
||||||
def create_chat_completion(messages, model=None, temperature=None, max_tokens=None)->str:
|
def create_chat_completion(messages, model=None, temperature=cfg.temperature, max_tokens=None)->str:
|
||||||
"""Create a chat completion using the OpenAI API"""
|
"""Create a chat completion using the OpenAI API"""
|
||||||
if cfg.use_azure:
|
if cfg.use_azure:
|
||||||
response = openai.ChatCompletion.create(
|
response = openai.ChatCompletion.create(
|
||||||
|
|||||||
Reference in New Issue
Block a user