Merged in develop (pull request #57)

Develop
This commit is contained in:
Tiago Ribeiro
2025-03-04 18:30:31 +00:00
2 changed files with 13 additions and 4 deletions

View File

@@ -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")

View File

@@ -16,8 +16,8 @@ class TrainingContentKnowledgeBase(IKnowledgeBase):
self._tips = None # self._read_json(path)
self._category_metadata = None
self._indices = None
self.load_indices_and_metadata()
self._logger = getLogger(__name__)
self.load_indices_and_metadata()
@staticmethod
def _read_json(path: str) -> Dict[str, any]: