mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
The function default serialized gpt-4 value at import time, leading to yield a value of gpt-4 after setting gpt3only when not passing a value for model to the function when calling it, this fixes it
This commit is contained in:
@@ -5,7 +5,9 @@ from llm_utils import create_chat_completion
|
||||
|
||||
# This is a magic function that can do anything with no-code. See
|
||||
# https://github.com/Torantulino/AI-Functions for more info.
|
||||
def call_ai_function(function, args, description, model=cfg.smart_llm_model):
|
||||
def call_ai_function(function, args, description, model=None):
|
||||
if model is None:
|
||||
model = cfg.smart_llm_model
|
||||
# For each arg, if any are None, convert to "None":
|
||||
args = [str(arg) if arg is not None else "None" for arg in args]
|
||||
# parse args to comma seperated string
|
||||
|
||||
Reference in New Issue
Block a user