Skip to content

Commit 96ed062

Browse files
committed
feat(llma): add Gemini async
1 parent 7c7f529 commit 96ed062

File tree

6 files changed

+1275
-2
lines changed

6 files changed

+1275
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 7.1.0 - 2025-11-26
2+
3+
Add support for the async version of Gemini.
4+
15
# 7.0.2 - 2025-11-18
26

37
Add support for Python 3.14.

posthog/ai/gemini/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .gemini import Client
2+
from .gemini_async import AsyncClient
23
from .gemini_converter import (
34
format_gemini_input,
45
format_gemini_response,
@@ -9,12 +10,14 @@
910
# Create a genai-like module for perfect drop-in replacement
1011
class _GenAI:
1112
Client = Client
13+
AsyncClient = AsyncClient
1214

1315

1416
genai = _GenAI()
1517

1618
__all__ = [
1719
"Client",
20+
"AsyncClient",
1821
"genai",
1922
"format_gemini_input",
2023
"format_gemini_response",

posthog/ai/gemini/gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _generate_content_streaming(
304304

305305
def generator():
306306
nonlocal usage_stats
307-
nonlocal accumulated_content # noqa: F824
307+
nonlocal accumulated_content
308308
try:
309309
for chunk in response:
310310
# Extract usage stats from chunk

0 commit comments

Comments
 (0)