From 21f9c136a2a8855ebe879457808aceaa3297c5d3 Mon Sep 17 00:00:00 2001 From: BaimoQilin Date: Sun, 5 May 2024 20:58:53 +0800 Subject: [PATCH] Fix: no-json-in-text error while using advanced mode --- core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 45c2910..84f2bb9 100644 --- a/core.py +++ b/core.py @@ -23,13 +23,15 @@ def initialize(): """ logger(f"Launch. Software version {config.VERSION_NUMBER}, platform {sys.platform}") -def askgpt(system_prompt: str, user_prompt: str, model_name: str): +def askgpt(system_prompt: str, user_prompt: str, model_name: str, disable_json_mode: bool = False, image_url: str = None): """ Interacts with ChatGPT using the specified prompts. Args: system_prompt (str): The system prompt. user_prompt (str): The user prompt. + model_name (str): The model name to use. + disable_json_mode (bool): Whether to disable JSON mode. Returns: str: The response from ChatGPT.