ProjectResponsesClient.CreateResponseAsync 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.
Overloads
| Name | Description |
|---|---|
| CreateResponseAsync(String, String, String, CancellationToken) |
Asynchronously creates a response for the specified model from user input text. |
| CreateResponseAsync(String, String, CancellationToken) |
Asynchronously creates a response from user input text. |
| CreateResponseAsync(String, IEnumerable<ResponseItem>, String, CancellationToken) |
Asynchronously creates a response for the specified model from the supplied input items. |
| CreateResponseAsync(CreateResponseOptions, CancellationToken) |
Asynchronously creates a response using the supplied response options. |
| CreateResponseAsync(IEnumerable<ResponseItem>, String, CancellationToken) |
Asynchronously creates a response from the supplied input items. |
CreateResponseAsync(String, String, String, CancellationToken)
- Source:
- ProjectResponsesClient.cs
- Source:
- ProjectResponsesClient.cs
Asynchronously creates a response for the specified model from user input text.
public override System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(string model, string userInputText, string previousResponseId = default, System.Threading.CancellationToken cancellationToken = default);
override this.CreateResponseAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
abstract member CreateResponseAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
override this.CreateResponseAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
Public Overrides Function CreateResponseAsync (model As String, userInputText As String, Optional previousResponseId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))
Parameters
- model
- String
The model used to create the response.
- userInputText
- String
The user input text used to create the response.
- previousResponseId
- String
The ID of the previous response to continue.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The created response result.
Applies to
CreateResponseAsync(String, String, CancellationToken)
- Source:
- ProjectResponsesClient.cs
- Source:
- ProjectResponsesClient.cs
Asynchronously creates a response from user input text.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(string userInputText, string previousResponseId = default, System.Threading.CancellationToken cancellationToken = default);
override this.CreateResponseAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
abstract member CreateResponseAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
override this.CreateResponseAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
Public Overridable Function CreateResponseAsync (userInputText As String, Optional previousResponseId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))
Parameters
- userInputText
- String
The user input text used to create the response.
- previousResponseId
- String
The ID of the previous response to continue.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The created response result.
Applies to
CreateResponseAsync(String, IEnumerable<ResponseItem>, String, CancellationToken)
- Source:
- ProjectResponsesClient.cs
- Source:
- ProjectResponsesClient.cs
Asynchronously creates a response for the specified model from the supplied input items.
public override System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(string model, System.Collections.Generic.IEnumerable<OpenAI.Responses.ResponseItem> inputItems, string previousResponseId = default, System.Threading.CancellationToken cancellationToken = default);
override this.CreateResponseAsync : string * seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
abstract member CreateResponseAsync : string * seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
override this.CreateResponseAsync : string * seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
Public Overrides Function CreateResponseAsync (model As String, inputItems As IEnumerable(Of ResponseItem), Optional previousResponseId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))
Parameters
- model
- String
The model used to create the response.
- inputItems
- IEnumerable<OpenAI.Responses.ResponseItem>
The input items used to create the response.
- previousResponseId
- String
The ID of the previous response to continue.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The created response result.
Applies to
CreateResponseAsync(CreateResponseOptions, CancellationToken)
- Source:
- ProjectResponsesClient.cs
- Source:
- ProjectResponsesClient.cs
Asynchronously creates a response using the supplied response options.
public override System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(OpenAI.Responses.CreateResponseOptions options, System.Threading.CancellationToken cancellationToken = default);
override this.CreateResponseAsync : OpenAI.Responses.CreateResponseOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
abstract member CreateResponseAsync : OpenAI.Responses.CreateResponseOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
override this.CreateResponseAsync : OpenAI.Responses.CreateResponseOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
Public Overrides Function CreateResponseAsync (options As CreateResponseOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))
Parameters
- options
- OpenAI.Responses.CreateResponseOptions
The options used to create the response.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The created response result.
Applies to
CreateResponseAsync(IEnumerable<ResponseItem>, String, CancellationToken)
- Source:
- ProjectResponsesClient.cs
- Source:
- ProjectResponsesClient.cs
Asynchronously creates a response from the supplied input items.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(System.Collections.Generic.IEnumerable<OpenAI.Responses.ResponseItem> inputItems, string previousResponseId = default, System.Threading.CancellationToken cancellationToken = default);
override this.CreateResponseAsync : seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
abstract member CreateResponseAsync : seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
override this.CreateResponseAsync : seq<OpenAI.Responses.ResponseItem> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
Public Overridable Function CreateResponseAsync (inputItems As IEnumerable(Of ResponseItem), Optional previousResponseId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))
Parameters
- inputItems
- IEnumerable<OpenAI.Responses.ResponseItem>
The input items used to create the response.
- previousResponseId
- String
The ID of the previous response to continue.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The created response result.