ImageToTextExtensions.GetTextContentAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get a single text generation result for the prompt and settings.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.TextContent> GetTextContentAsync (this Microsoft.SemanticKernel.ImageToText.IImageToTextService imageToTextService, Microsoft.SemanticKernel.ImageContent content, Microsoft.SemanticKernel.PromptExecutionSettings? executionSettings = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
static member GetTextContentAsync : Microsoft.SemanticKernel.ImageToText.IImageToTextService * Microsoft.SemanticKernel.ImageContent * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.TextContent>
<Extension()>
Public Function GetTextContentAsync (imageToTextService As IImageToTextService, content As ImageContent, Optional executionSettings As PromptExecutionSettings = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TextContent)
Parameters
- imageToTextService
- IImageToTextService
Image to text service
- content
- ImageContent
The image content to generate text from.
- executionSettings
- PromptExecutionSettings
The AI execution settings (optional).
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The single text result generated by the remote model