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

Added HttpClient Injection #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdechanterac
Copy link

I've added some constructor to be able to inject the HttpClient into the OpenAi class.
This allow to customize the HttpClient further such as adding a retry policy, or adding delegating handler to the HttpClient.
I also updated the readme file to show how we can use it in a simple case.

@darkwatchuk
Copy link

Hi,

Think you've missed passing the httpClient on the ChatEndpoint...

internal ChatEndpoint(HttpClient httpClient, OpenAIAPI api) : base(api) { }

should be this?

internal ChatEndpoint(HttpClient httpClient, OpenAIAPI api) : base(httpClient,api) { }

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