Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Use configured temperature value in create_chat_completion function

Merwane Hamadif4831348e8ee
diff --git a/scripts/llm_utils.py b/scripts/llm_utils.py
index 3fb348f07b..8acafc91a5 100644
--- a/scripts/llm_utils.py
+++ b/scripts/llm_utils.py
@@ -5,7 +5,7 @@ cfg = Config()
openai.api_key = cfg.openai_api_key
# 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"""
if cfg.use_azure:
response = openai.ChatCompletion.create(