We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43d6e0f commit 442e3f9Copy full SHA for 442e3f9
1 file changed
splunklib/ai/agent.py
@@ -234,11 +234,13 @@ async def __aexit__(
234
self, exc_type: ..., exc_value: ..., traceback: ...
235
) -> bool | None:
236
assert self._agent_context_manager is not None
237
- return await self._agent_context_manager.__aexit__(
+ result = await self._agent_context_manager.__aexit__(
238
exc_type,
239
exc_value,
240
traceback,
241
)
242
+ self._agent_context_manager = None
243
+ return result
244
245
@override
246
async def invoke(self, messages: list[BaseMessage]) -> AgentResponse[OutputT]:
0 commit comments