Kaynağa Gözat

fix: add missing f-string prefix in TypeError message (#1202)

The TypeError message in TTSInferenceEngine.inference() was missing the
f-string prefix, causing the format expression to be rendered literally
instead of being interpolated with the actual type name.

Made-with: Cursor
huang yutong 2 hafta önce
ebeveyn
işleme
f48256a1b4
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      fish_speech/inference_engine/__init__.py

+ 1 - 1
fish_speech/inference_engine/__init__.py

@@ -101,7 +101,7 @@ class TTSInferenceEngine(ReferenceLoader, VQManager):
             # Check the response type
             if not isinstance(wrapped_result.response, GenerateResponse):
                 raise TypeError(
-                    "Expected GenerateResponse, got {type(wrapped_result.response).__name__}"
+                    f"Expected GenerateResponse, got {type(wrapped_result.response).__name__}"
                 )
 
             result: GenerateResponse = wrapped_result.response