Skip to content

Commit 07c5aad

Browse files
committed
fix(google_ai): close aiohttp session to prevent ResourceWarning
1 parent d9e0aba commit 07c5aad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • integrations/google_genai/src/haystack_integrations/components/generators/google_genai/chat

integrations/google_genai/src/haystack_integrations/components/generators/google_genai/chat/chat_generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,3 +1013,5 @@ async def run_async(
10131013

10141014
error_msg = f"Error in async Google Gen AI chat generation: {e}"
10151015
raise RuntimeError(error_msg) from e
1016+
finally:
1017+
await self._client.aio.aclose()

0 commit comments

Comments
 (0)