-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix Update ClientOptions Based on HTTP and WS #265
Fix Update ClientOptions Based on HTTP and WS #265
Conversation
WalkthroughThe updates focus on enhancing the configuration for the on-premise option across various client tests in the Deepgram SDK, alongside removing the Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (11)
- Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs (1 hunks)
- Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs (1 hunks)
- Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs (1 hunks)
- Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs (1 hunks)
- Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs (1 hunks)
- Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs (1 hunks)
- Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs (3 hunks)
- Deepgram/Abstractions/AbstractRestClient.cs (1 hunks)
- Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs (2 hunks)
- Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs (2 hunks)
- examples/prerecorded/file/Program.cs (1 hunks)
Files skipped from review due to trivial changes (1)
- Deepgram/Abstractions/AbstractRestClient.cs
Additional comments not posted (14)
examples/prerecorded/file/Program.cs (1)
47-48
: The addition of a prompt for the user to press any key to exit enhances the usability of the program by making the execution flow clearer.Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs (2)
56-59
: The removal of sections likePrerecorded
,Manage
, andAnalyze
, and the addition of theSpeak
section, along with the constructor changes, align with the PR's objectives of refining client options handling. Ensure that the removal of these sections does not impact other functionalities.
63-63
: The constructor's simplification by removing thekeepAlive
parameter and related logic is a positive change, making the client options more intuitive and aligned with the PR's objectives.Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs (3)
73-73
: The update to_clientOptions
initialization in the test method reflects the changes made to theDeepgramHttpClientOptions
constructor, ensuring the tests remain valid.
98-98
: Correctly updated_clientOptions
initialization in this test method to align with the simplifiedDeepgramHttpClientOptions
constructor.
125-125
: The adjustment in_clientOptions
initialization here is consistent with the modifications to theDeepgramHttpClientOptions
constructor, ensuring the test's accuracy.Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs (2)
53-53
: The addition of theSpeak
section and the removal of other sections in theDeepgramWsClientOptions
class align with the PR's objectives of refining client options handling. Ensure that the removal of these sections does not impact other functionalities.
59-59
: The constructor's simplification by removing theapiVersion
parameter and related logic is a positive change, making the WebSocket client options more intuitive and aligned with the PR's objectives.Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs (1)
20-23
: The update to_clientOptions
initialization in theSetup
method, including setting theOnPrem
property totrue
, is correctly implemented and aligns with the PR's objectives of refining client options handling.Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs (1)
20-23
: The update to_clientOptions
initialization in theSetup
method, including setting theOnPrem
property totrue
, is correctly implemented and aligns with the PR's objectives of refining client options handling.Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs (1)
21-24
: The update to_clientOptions
initialization in theSetup
method, including setting theOnPrem
property totrue
, is correctly implemented and aligns with the PR's objectives of refining client options handling.Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs (1)
20-23
: The update to_options
initialization in theSetup
method, including setting theOnPrem
property totrue
, is correctly implemented and aligns with the PR's objectives of refining client options handling.Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs (1)
20-23
: Ensure that tests adequately cover both on-premises (OnPrem = true
) and cloud scenarios, given the change inDeepgramHttpClientOptions
.Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs (1)
22-25
: Ensure that tests adequately cover both on-premises (OnPrem = true
) and cloud scenarios, given the change inDeepgramHttpClientOptions
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have been thinking about this a lot and I think separating out HTTP vs WS is probably the better thing to do for ClientOptions. As an example, the KeepAlive (currently) has no meaning for HTTP (yes, I know HTTP does actually support keeping a connection open). Just seems like this is the best way to avoid "overloaded" meanings on this because the object is entirely different.
Other changes:
Constructor(null, null, null, null, something)
Summary by CodeRabbit
KeepAlive
property and associated logic from client options to streamline HTTP client setup.