Fix video generation
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import uuid
|
||||
import random
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from app.repositories.abc import IFileStorage, IDocumentStore
|
||||
from app.services.abc import ISpeakingService, ILLMService, IVideoGeneratorService, ISpeechToTextService
|
||||
from app.configs.constants import (
|
||||
FieldsAndExercises, GPTModels, TemperatureSettings,
|
||||
ELAIAvatars, FilePaths
|
||||
)
|
||||
from app.helpers import TextHelper
|
||||
from app.repositories.abc import IFileStorage, IDocumentStore
|
||||
from app.services.abc import ISpeakingService, ILLMService, IVideoGeneratorService, ISpeechToTextService
|
||||
|
||||
|
||||
class SpeakingService(ISpeakingService):
|
||||
@@ -462,7 +462,8 @@ class SpeakingService(ISpeakingService):
|
||||
result = await self._create_video(
|
||||
exercise["question"],
|
||||
avatar,
|
||||
f'Failed to create video for part {part} question: {str(exercise["question"])}'
|
||||
f'Failed to create video for part {part} question: {str(exercise["question"])}',
|
||||
req_id
|
||||
)
|
||||
if result is not None:
|
||||
template["exercises"][template_index]["prompts"] = exercise["prompts"]
|
||||
@@ -503,7 +504,8 @@ class SpeakingService(ISpeakingService):
|
||||
avatar,
|
||||
'POST - generate_video_{p} - {r} - Failed to create video for part {p} question: {q}'.format(
|
||||
p=part, r=request_id, q=question
|
||||
)
|
||||
),
|
||||
request_id
|
||||
)
|
||||
if result is not None:
|
||||
self._logger.info(f'POST - generate_video_{part} - {request_id} - Video created')
|
||||
|
||||
Reference in New Issue
Block a user