Skip to content

Commit a91e3e2

Browse files
author
harvey_xiang
committed
feat: add chat_time
1 parent 8dfa338 commit a91e3e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/memos/api/middleware/request_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818

1919
async def _tee_stream(
2020
original: StreamingResponse,
21-
) -> str:
21+
) -> StreamingResponse:
2222
chunks = []
2323

2424
async for chunk in original.body_iterator:
2525
chunks.append(chunk)
2626
yield chunk
2727

28-
body_str = "".join(chunks)
28+
body_str = "".join(chunks).decode("utf-8", errors="replace")
2929

30-
return body_str
30+
logger.info(f"Response content: {body_str}")
3131

3232

3333
logger = memos.log.get_logger(__name__)

0 commit comments

Comments
 (0)