Merge branch 'master' into dev

This commit is contained in:
Andres Caicedo
2023-04-10 09:58:13 +02:00
9 changed files with 324 additions and 43 deletions

View File

@@ -5,8 +5,10 @@ cfg = Config()
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):
"""Call an AI function with the given args and description."""
def call_ai_function(function, args, description, model=None):
"""Call an AI function"""
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