Closed kaller01 closed 1 month ago
The changes introduce new functionality in the Deepgram SDK by adding methods for analyzing text input. The AnalyzeText
method allows for synchronous analysis of text, while AnalyzeTextCallBack
enables asynchronous analysis with a callback URL. Additionally, a new TextSource
class is introduced to encapsulate text input. Unit tests for these methods are also added to ensure proper functionality and error handling.
Files | Change Summary |
---|---|
Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs |
Added multiple unit tests for AnalyzeText and AnalyzeTextCallBack methods, verifying correct behavior and error handling under various conditions. |
Deepgram/Clients/Analyze/v1/Client.cs |
Introduced AnalyzeText for synchronous analysis and AnalyzeTextCallBack for asynchronous analysis with logging and validation of callback parameters. |
Deepgram/Clients/Interfaces/v1/IAnalyzeClient.cs |
Added method signatures for AnalyzeText and AnalyzeTextCallBack to the IAnalyzeClient interface, allowing for text analysis with optional parameters. |
Deepgram/Models/Analyze/v1/TextSource.cs |
Created TextSource class to encapsulate text input for analysis, including serialization attributes and a ToString method for JSON representation. |
AnalyzeText
method, which addresses the need for analyzing text directly from a string without conversion to file encoding, as proposed in the issue.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?
Hi @kaller01
This is amazing! and you even added UnitTests for the new code! Awesome!
I will take a look at this today. Since there are other things in the pipeline to be released, I will see about getting this in.
Proposed changes
Addresses #335, implements
AnalyzeText
,AnalyzeTextCallback
and tests following the same structure as the equivalent methods for URL.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
AnalyzeClientTests
have not been linted as it currently is not using repo standards (could include that in this PR or open seperate issue?)Summary by CodeRabbit
New Features
AnalyzeText
for synchronous processing andAnalyzeTextCallBack
for asynchronous processing with callback support.TextSource
class to encapsulate text input for analysis.Tests
AnalyzeClient
class, validating the behavior of new methods under various conditions.Documentation