feat: log

This commit is contained in:
superobk
2024-04-30 17:59:37 +08:00
parent 884a835cae
commit 54ddb8ee4a
9 changed files with 81 additions and 31 deletions

View File

@ -1,3 +1,4 @@
import logging
from fastapi import Request, Response,status
from fastapi.responses import JSONResponse
from injector import inject, singleton
@ -8,11 +9,14 @@ from .tts import TTS
from .blackbox import Blackbox
logger = logging.getLogger(__name__)
@singleton
class AudioChat(Blackbox):
@inject
def __init__(self, asr: ASR, gpt: Tesou, tts: TTS):
logger.info("audio chat initint")
self.asr = asr
self.gpt = gpt
self.tts = tts