Skip to content

Commit ab79710

Browse files
authored
fix(openai): implement aclose on async stream responses (#1112)
1 parent cd8c118 commit ab79710

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

langfuse/openai.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,3 +977,10 @@ async def close(self) -> None:
977977
Automatically called if the response body is read to completion.
978978
"""
979979
await self.response.close()
980+
981+
async def aclose(self) -> None:
982+
"""Close the response and release the connection.
983+
984+
Automatically called if the response body is read to completion.
985+
"""
986+
await self.response.aclose()

0 commit comments

Comments
 (0)