Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publicly expose OllamaApiClient.Dispose #157

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

Joy-less
Copy link
Contributor

This means that when putting the client in a field/property, you don't have to write code like:

((IDisposable)Client)?.Dispose();

Instead you can just write:

Client?.Dispose();

@awaescher
Copy link
Owner

Pretty interesting as I am sure this was not possible before because IChatClient was implemented explicitly. And the compiler did not accept a single public implementation for the method. We discussed this earlier (#126).
I guess the compiler got an update here with the latest .NET 9 / Visual Studio updates. Nice. Thanks a lot.

@awaescher awaescher merged commit a5d641b into awaescher:main Jan 3, 2025
1 check passed
@Joy-less Joy-less deleted the expose-dispose branch January 3, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants