fix(makeprompt.py): add api_key parameter to the generate_response function call to fix missing api_key error

fix(openaicaller.py): fix import statement for num_tokens_from_messages function
refactor(openaicaller.py): remove unused api_key parameter from openai_caller class constructor
refactor(openaicaller.py): change generate_response and moderation methods to accept variable number of arguments
refactor(openaicaller.py): change error_call parameter to be optional and provide a default function if not provided
refactor(openaicaller.py): remove unused api_key parameter from generate_response and moderation methods
refactor(openaicaller.py): remove unused api_key parameter from main function
This commit is contained in:
Paillat
2023-08-02 20:12:06 +02:00
parent 45dfafadd8
commit a7a0f5dac8
2 changed files with 29 additions and 12 deletions

View File

@@ -111,6 +111,7 @@ async def chatgpt_process(
)
response = await caller.generate_response(
error_call,
api_key=api_key,
model=model,
messages=msgs,
functions=called_functions,