🐛 Bug: Fix the bug where tokens cannot be calculated.
Browse files
main.py
CHANGED
@@ -369,7 +369,7 @@ class LoggingStreamingResponse(Response):
|
|
369 |
async for chunk in self.body_iterator:
|
370 |
if isinstance(chunk, str):
|
371 |
chunk = chunk.encode('utf-8')
|
372 |
-
if
|
373 |
yield chunk
|
374 |
continue
|
375 |
line = chunk.decode('utf-8')
|
|
|
369 |
async for chunk in self.body_iterator:
|
370 |
if isinstance(chunk, str):
|
371 |
chunk = chunk.encode('utf-8')
|
372 |
+
if self.current_info.get("endpoint") == "/v1/audio/speech":
|
373 |
yield chunk
|
374 |
continue
|
375 |
line = chunk.decode('utf-8')
|