OpenAIChatCompletionService.GetTextContentsAsync 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 completion results for the prompt and settings.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.TextContent>> GetTextContentsAsync (string prompt, Microsoft.SemanticKernel.PromptExecutionSettings? executionSettings = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTextContentsAsync : string * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.TextContent>>
override this.GetTextContentsAsync : string * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.TextContent>>
Public Function GetTextContentsAsync (prompt As String, Optional executionSettings As PromptExecutionSettings = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of TextContent))
Parameters
- prompt
- String
The raw prompt input.
- 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
List of different completions results generated by the remote model