Closed davidvonthenen closed 2 weeks ago
The pull request introduces modifications to the DeepgramHttpClientOptions
and DeepgramWsClientOptions
classes, primarily focusing on the constructor logic for handling the ApiKey
property. Enhancements include conditional checks for empty or whitespace ApiKey
values, improved logging for various parameters, and refined error handling. Additionally, the Config
record in the Deepgram.Models.Manage.v1
namespace has seen the removal of the DetectTopics
property, which has been commented out due to an error. Overall, these changes aim to improve validation and logging mechanisms within the client configuration.
File Path | Change Summary |
---|---|
Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs | Modified constructor to include checks and logging for ApiKey , refined BaseAddress handling, and retained error handling for invalid ApiKey . |
Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs | Updated constructor to check and log ApiKey , improved error handling, and refined BaseAddress management. |
Deepgram/Models/Manage/v1/Config.cs | Commented out DetectTopics property due to an error, while retaining the rest of the properties. |
DeepgramWsClientOptions
class constructor are similar to those in the DeepgramHttpClientOptions
class, as both involve modifications to the handling of the ApiKey
property and logging enhancements.DeepgramHttpClientOptions
constructor regarding the ApiKey
.Stop
method in the IListenWebSocketClient
interface relate to overall client configuration and error handling, similar to changes made in the DeepgramHttpClientOptions
class.Send()
method enhances API design, consistent with improvements made in the DeepgramHttpClientOptions
class regarding API key handling and logging.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?
Proposed changes
Addresses: https://github.com/deepgram/deepgram-dotnet-sdk/issues/342, https://github.com/deepgram/deepgram-dotnet-sdk/issues/346
Tested using microphone streaming example.
Types of changes
What types of changes does your code introduce to the community .NET SDK? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
NA
Summary by CodeRabbit
New Features
ApiKey
andBaseAddress
in client options, improving visibility during initialization.ApiKey
in bothDeepgramHttpClientOptions
andDeepgramWsClientOptions
.Bug Fixes
DetectTopics
property from theConfig
record to address an identified error.Refactor
DeepgramHttpClientOptions
andDeepgramWsClientOptions
for better error handling and configuration validation.