OllamaChatClient.CompleteAsync 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.
Sends chat messages to the model and returns the response messages.
public System.Threading.Tasks.Task<Microsoft.Extensions.AI.ChatCompletion> CompleteAsync (System.Collections.Generic.IList<Microsoft.Extensions.AI.ChatMessage> chatMessages, Microsoft.Extensions.AI.ChatOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CompleteAsync : System.Collections.Generic.IList<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Extensions.AI.ChatOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.ChatCompletion>
override this.CompleteAsync : System.Collections.Generic.IList<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Extensions.AI.ChatOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.ChatCompletion>
Public Function CompleteAsync (chatMessages As IList(Of ChatMessage), Optional options As ChatOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ChatCompletion)
Parameters
- chatMessages
- IList<ChatMessage>
The chat content to send.
- options
- ChatOptions
The chat options to configure the request.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The response messages generated by the client.
Implements
Applies to
Colaborar con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.