Skip to content

Commit

Permalink
Fix: no-json-in-text error while using advanced mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhou-Shilin committed May 5, 2024
1 parent 8de8816 commit 21f9c13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 21f9c13

Please sign in to comment.