diff --git a/api/openai.py b/api/openai.py index ad87469..af3d57e 100644 --- a/api/openai.py +++ b/api/openai.py @@ -16,7 +16,10 @@ from utilities import utilities, Utilities from utilities import discordutils if use_helicone: - from helicone import openai + try: + from helicone import openai + except ImportError: + from helicone import openai_proxy as openai else: import openai import discord diff --git a/modules/chatgpt.py b/modules/chatgpt.py index f4c2c37..cfd6ea2 100644 --- a/modules/chatgpt.py +++ b/modules/chatgpt.py @@ -21,7 +21,10 @@ from servicemodules.serviceConstants import service_italics_marks, default_italics_mark if use_helicone: - from helicone import openai + try: + from helicone import openai + except ImportError: + from helicone import openai_proxy as openai else: import openai