修复parts的错误

This commit is contained in:
zzh
2025-07-16 01:25:51 +09:00
parent abae90b16d
commit cfb682ae3c
4 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ class TTSGeminiChatService(GeminiChatService):
# 构建TTS专用的payload - 不包含tools和safetySettings
from app.service.chat.gemini_chat_service import _filter_empty_parts
request_dict = request.model_dump()
request_dict = request.model_dump(by_alias=True, exclude_none=False)
# 构建TTS专用的简化payload
payload = {
@@ -130,7 +130,7 @@ class TTSGeminiChatService(GeminiChatService):
error_type="tts-api-error",
error_log=error_msg,
error_code=status_code,
request_msg=request.model_dump()
request_msg=request.model_dump(by_alias=True, exclude_none=False)
)
logger.error(f"TTS API call failed: {error_msg}")