#Usage Request Response Json Parsing Error

1 messages · Page 1 of 1 (latest)

cyan totem
#

I am integrating the deepgram-dotnet-sdk into my dotnet project. I am trying to make a GetUsageRequest request using the manage client as shown in the github documentation examples:
UsageRequestResponse response = await deepgramClient.GetUsageRequest(myId, requestId);. I am getting the following error: System.Text.Json.JsonException: The JSON value could not be converted to System.Nullable`1[System.Boolean]. Path: $.response.details.config.detect_topics | LineNumber: 0 | BytePositionInLine: 1039.
---> System.InvalidOperationException: Cannot get the value of a token type 'String' as a boolean.

I tested the API endpoint using the following http request:
https://api.deepgram.com/v1/projects/ProjectID/requests/RequestID

The returned json included a "config" object with "detect_topics": "true". I believe this is where the issue arises, as the Config object in your c# class has a DetectTopics property of type bool?, not string. Please let me know how I can fix this issue.

dusky islandBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently.

#

It looks like we're missing some important information to help debug your issue. Would you mind providing us with the following details in a reply?

  • A request ID that triggered your error or issue.
fading tartan
#

Hi there! Thanks for this... I will add a bug to the repo to track this