We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eb37ba commit cb223f1Copy full SHA for cb223f1
posthog/ai/gemini/gemini.py
@@ -193,14 +193,14 @@ def _generate_content_streaming(
193
):
194
start_time = time.time()
195
usage_stats: Dict[str, int] = {"input_tokens": 0, "output_tokens": 0}
196
- accumulated_content = [] # noqa: F824
+ accumulated_content = []
197
198
kwargs_without_stream = {"model": model, "contents": contents, **kwargs}
199
response = self._client.models.generate_content_stream(**kwargs_without_stream)
200
201
def generator():
202
nonlocal usage_stats
203
- nonlocal accumulated_content
+ nonlocal accumulated_content # noqa: F824
204
try:
205
for chunk in response:
206
if hasattr(chunk, "usage_metadata") and chunk.usage_metadata:
0 commit comments