From 6c156ea876aab38127de9b35f8babb17f10b1690 Mon Sep 17 00:00:00 2001 From: Cristiano Ferreira Date: Tue, 4 Mar 2025 13:32:35 +0000 Subject: [PATCH] Switch speaking to use ELAI --- ielts_be/configs/dependency_injection.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ielts_be/configs/dependency_injection.py b/ielts_be/configs/dependency_injection.py index f7af3aa..9654297 100644 --- a/ielts_be/configs/dependency_injection.py +++ b/ielts_be/configs/dependency_injection.py @@ -51,13 +51,22 @@ class DependencyInjector: with open('ielts_be/services/impl/third_parties/elai/avatars.json', 'r') as file: elai_avatars = json.load(file) + + with open('ielts_be/services/impl/third_parties/elai/elai_conf.json', 'r') as file: + elai_conf = json.load(file) """ - with open('ielts_be/services/impl/third_parties/heygen/avatars.json', 'r') as file: - heygen_avatars = json.load(file) + with open('ielts_be/services/impl/third_parties/elai/avatars.json', 'r') as file: + elai_avatars = json.load(file) + + with open('ielts_be/services/impl/third_parties/elai/conf.json', 'r') as file: + elai_conf = json.load(file) self._container.vid_gen = providers.Factory( - Heygen, client=self._container.http_client, token=os.getenv("HEY_GEN_TOKEN"), avatars=heygen_avatars + ELAI, client=self._container.http_client, + token=os.getenv("ELAI_TOKEN"), + avatars=elai_avatars, + conf=elai_conf ) self._container.ai_detector = providers.Factory( GPTZero, client=self._container.http_client, gpt_zero_key=os.getenv("GPT_ZERO_API_KEY")