Skip to content

Commit

Permalink
DocumentTableCell DocumentTableCellKind property value (content) edit…
Browse files Browse the repository at this point in the history
…ed, class warning added and test controller classifier-document commented
  • Loading branch information
Rafael-Pascoal committed May 28, 2024
1 parent 049b5da commit ac93c11
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

<ItemGroup>
<Folder Include="Models\AnalyzeDocument\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ public TestController(AzureDocumentIntelligenceClient client, ILogger<TestContro
// }
//}

[HttpPost("classify-document")]
public async Task<IActionResult> ClassifyDocument(ClassifyDocumentRequestBody requestBody)
{
try
{
_logger.LogInformation("Received request to classify document.");
var result = await _client.ClassifyDocumentAsync(requestBody);
return Ok(result);
}
catch (Exception ex)
{
_logger.LogError(ex, $"Error occurred while classifying document. {ex.Message}");
return StatusCode(500, $"Erro: {ex.Message}\n{ex.StackTrace}");
}
}
//[HttpPost("classify-document")]
//public async Task<IActionResult> ClassifyDocument(ClassifyDocumentRequestBody requestBody)
//{
// try
// {
// _logger.LogInformation("Received request to classify document.");
// var result = await _client.ClassifyDocumentAsync(requestBody);
// return Ok(result);
// }
// catch (Exception ex)
// {
// _logger.LogError(ex, $"Error occurred while classifying document. {ex.Message}");
// return StatusCode(500, $"Erro: {ex.Message}\n{ex.StackTrace}");
// }
//}

//[HttpPost("classify-document-from-stream")]
//public async Task<IActionResult> ClassifyDocumentFromStream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DocumentTableCell
public string[]? Elements { get; set; }

[JsonProperty("kind")]
public DocumentTableCellKind? Kind { get; set; } = content;
public DocumentTableCellKind? Kind { get; set; } = DocumentTableCellKind.content;

[JsonProperty("rowIndex")]
public int RowIndex { get; set; }
Expand Down

0 comments on commit ac93c11

Please sign in to comment.