-
Notifications
You must be signed in to change notification settings - Fork 81
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
[CONFIG] [STANDARD] [BROKER] -> Used library for injecting HttpClient into broker #84
Conversation
Used constant strings instead of magic strings for better readability. Removed some warnings
used dependency injection to inject broker and related dependencies
OpenAI.NET/Brokers/HttpMessageHandlers/OpenAIBrokerAuthorizationMessageHandler.cs
Outdated
Show resolved
Hide resolved
OpenAI.NET.Tests.Acceptance/Clients/Completions/CompletionClientTests.Prompts.cs
Outdated
Show resolved
Hide resolved
OpenAI.NET.Tests.Acceptance/Clients/Completions/CompletionClientTests.cs
Outdated
Show resolved
Hide resolved
OpenAI.NET.Tests.Unit/Services/Foundations/Completions/CompletionServiceTests.cs
Outdated
Show resolved
Hide resolved
OpenAI.NET.Tests.Acceptance/Clients/Completions/CompletionClientTests.Prompts.cs
Outdated
Show resolved
Hide resolved
Thank you for your contribution to this. There are definitely things here that we need to incorporate into our code before publishing our alpha release. However, the decisions you are making here needs to align with our principles and standards. Creating things like I highly encourage you to go through the contribution links learn about The Standard, The C# Coding Standard and The Standard Team - these docs will help you tremendously have a heavy contribution in this project. |
Delegating Handlers are extremely useful in order to intercept and put something inside the request or do logging in a cleaner and concise way. Why should brokers contain such code that could be repetitive but not the part of the core business logic? Besides it's a MS recommendation. It acts like a HttpInterceptor in Angular. Useful Links: |
OpenAI.NET.Tests.Acceptance/Clients/Completions/CompletionClientTests.Prompts.cs
Show resolved
Hide resolved
OpenAI.NET.Tests.Acceptance/Clients/Completions/CompletionClientTests.Prompts.cs
Outdated
Show resolved
Hide resolved
…olicies for resiliency and fault tolerance
Closes #106 Allowed consumers of Clients (Exposures) to implement
*** added seconds and milliseconds as the unit to measure the durations. |
Closing this due to inactivity |
Closes #20
used dependency injection to inject HttpClient and related dependencies for each broker