Skip to content

Commit a932b2d

Browse files
authored
Fix StopAsyncIteration catch (microsoft#1730)
1 parent 54885b8 commit a932b2d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Fix StopAsyncIteration catch."
4+
}

graphrag/query/llm/oai/chat_openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ async def _agenerate(
291291
callback.on_llm_new_token(delta)
292292
if chunk.choices[0].finish_reason == "stop": # type: ignore
293293
break
294-
except StopIteration:
294+
except StopAsyncIteration:
295295
break
296296
return full_response
297297

0 commit comments

Comments
 (0)