@@ -19,7 +19,7 @@ public async Task<IActionResult> GenerateImageAltText(IFormFile documentWithImag
19
19
{
20
20
try
21
21
{
22
- var imageDescriber = new OpenAIClientImageHelper ( openAIApiKey ) ;
22
+ var imageHelper = new OpenAIClientImageHelper ( openAIApiKey ) ;
23
23
using ( var server = new RichEditDocumentServer ( ) )
24
24
{
25
25
await RichEditHelper . LoadFile ( server , documentWithImage ) ;
@@ -29,7 +29,7 @@ public async Task<IActionResult> GenerateImageAltText(IFormFile documentWithImag
29
29
foreach ( var shape in document . Shapes )
30
30
{
31
31
if ( shape . Type == DevExpress . XtraRichEdit . API . Native . ShapeType . Picture && string . IsNullOrEmpty ( shape . AltText ) )
32
- shape . AltText = imageDescriber . DescribeImageAsync ( shape . PictureFormat . Picture ) . Result ;
32
+ shape . AltText = imageHelper . DescribeImageAsync ( shape . PictureFormat . Picture ) . Result ;
33
33
}
34
34
} ) ;
35
35
@@ -51,7 +51,7 @@ public async Task<IActionResult> GenerateChartAltText(IFormFile documentWithImag
51
51
{
52
52
try
53
53
{
54
- var imageDescriber = new OpenAIClientImageHelper ( openAIApiKey ) ;
54
+ var imageHelper = new OpenAIClientImageHelper ( openAIApiKey ) ;
55
55
using ( var workbook = new Workbook ( ) )
56
56
{
57
57
await SpreadsheetHelper . LoadWorkbook ( workbook , documentWithImage ) ;
@@ -61,7 +61,7 @@ public async Task<IActionResult> GenerateChartAltText(IFormFile documentWithImag
61
61
foreach ( var chart in worksheet . Charts )
62
62
{
63
63
OfficeImage image = chart . ExportToImage ( ) ;
64
- chart . AlternativeText = await imageDescriber . DescribeImageAsync ( image ) ;
64
+ chart . AlternativeText = await imageHelper . DescribeImageAsync ( image ) ;
65
65
}
66
66
}
67
67
0 commit comments