From 1cfcb998e012dafb06e9ab970d6895b979407d1f Mon Sep 17 00:00:00 2001 From: heblasco Date: Tue, 24 Sep 2024 11:55:14 +0200 Subject: [PATCH] Refactor ImageAnalyzerController.cs to remove unused code and add console log for payload --- src/AIHub/Controllers/ImageAnalyzerController.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/AIHub/Controllers/ImageAnalyzerController.cs b/src/AIHub/Controllers/ImageAnalyzerController.cs index 9e83042..57fe307 100644 --- a/src/AIHub/Controllers/ImageAnalyzerController.cs +++ b/src/AIHub/Controllers/ImageAnalyzerController.cs @@ -57,11 +57,6 @@ public async Task DenseCaptionImage(string image_url, string prom } var payload = new { - enhancements = new - { - ocr = new { enabled = true }, - grounding = new { enabled = true } - }, messages = new object[] { new { @@ -94,6 +89,7 @@ public async Task 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)