Skip to content

Commit

Permalink
Refactor ImageAnalyzerController.cs to remove unused code and add con…
Browse files Browse the repository at this point in the history
…sole log for payload
  • Loading branch information
heblasco committed Sep 24, 2024
1 parent 41f4b41 commit 1cfcb99
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/AIHub/Controllers/ImageAnalyzerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public async Task<IActionResult> DenseCaptionImage(string image_url, string prom
}
var payload = new
{
enhancements = new
{
ocr = new { enabled = true },
grounding = new { enabled = true }
},
messages = new object[]
{
new {
Expand Down Expand Up @@ -94,6 +89,7 @@ public async Task<IActionResult> DenseCaptionImage(string image_url, string prom
max_tokens = 800,
stream = false
};
Console.WriteLine(JsonConvert.SerializeObject(payload));
var response = await httpClient.PostAsync(GPT4o_ENDPOINT, new StringContent(JsonConvert.SerializeObject(payload), Encoding.UTF8, "application/json"));

if (response.IsSuccessStatusCode)
Expand Down

0 comments on commit 1cfcb99

Please sign in to comment.