Closed ole-jorgensen closed 1 week ago
Repeated calls to azureai models leads to an async error, which stems from the AzureAI ChatCompletionsClient needing to be manually closed
ChatCompletionsClient
Creates the client in the generate block, and closes it at the end of the generation. Also added a regression test.
This PR contains:
What is the current behavior? (You can also link to an open issue here)
Repeated calls to azureai models leads to an async error, which stems from the AzureAI
ChatCompletionsClient
needing to be manually closedWhat is the new behavior?
Creates the client in the generate block, and closes it at the end of the generation. Also added a regression test.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information: