diff --git a/Backend/gpt.py b/Backend/gpt.py index 2dc5bcf..cb3346e 100644 --- a/Backend/gpt.py +++ b/Backend/gpt.py @@ -209,7 +209,7 @@ def get_search_terms(video_subject: str, amount: int, script: str, ai_model: str except (json.JSONDecodeError, ValueError): # Get everything between the first and last square brackets - response = response[response.find("[") + 1:response.rfind("]")] + response = response[response.find("["):response.rfind("]") + 1] print(colored("[*] GPT returned an unformatted response. Attempting to clean...", "yellow"))