support workflow features

This commit is contained in:
takatost
2024-02-29 22:58:30 +08:00
parent 9651a208a9
commit 43b0440358
14 changed files with 211 additions and 97 deletions

View File

@ -43,7 +43,7 @@ class ChatMessageAudioApi(Resource):
try:
response = AudioService.transcript_asr(
tenant_id=app_model.tenant_id,
app_model=app_model,
file=file,
end_user=None,
)
@ -83,9 +83,9 @@ class ChatMessageTextApi(Resource):
def post(self, app_model):
try:
response = AudioService.transcript_tts(
tenant_id=app_model.tenant_id,
app_model=app_model,
text=request.form['text'],
voice=request.form['voice'] if request.form['voice'] else app_model.app_model_config.text_to_speech_dict.get('voice'),
voice=request.form.get('voice'),
streaming=False
)