tghamm / Anthropic.SDK

An unofficial C#/.NET SDK for accessing the Anthropic Claude API
https://www.nuget.org/packages/Anthropic.SDK
MIT License
55 stars 10 forks source link

Do no dispose of httpclient after each call. #23

Closed gluip closed 4 months ago

gluip commented 4 months ago

@tghamm I get a disposed object exception after the first call using a custom HttpClient. I added a test demonstrating the issue. This is a fix

tghamm commented 4 months ago

Whoops! Thank you @gluip Will review here in a moment and get a patch out assuming things check out.