Class ResponseService
OpenAI's most advanced interface for generating model responses. Supports text and image inputs, and text outputs. Create stateful interactions with the model, using the output of previous responses as input. Extend the model's capabilities with built-in tools for file search, web search, computer use, and more. Allow the model access to external systems and data using function calling. https://platform.openai.com/docs/api-reference/responses
public class ResponseService : CrudServiceBase<OpenAIClient>
- Inheritance
-
objectResponseService
Constructors
ResponseService(OpenAIClient)
public ResponseService(OpenAIClient client)
Parameters
clientOpenAIClient
Methods
CancelAsync(string, RESTOptions)
public UniTask<Response> CancelAsync(string responseId, RESTOptions options = null)
Parameters
responseIdstringoptionsRESTOptions
Returns
- UniTask<Response>
CreateAsync(ResponseRequest, RESTOptions)
public UniTask<Response> CreateAsync(ResponseRequest request, RESTOptions options = null)
Parameters
requestResponseRequestoptionsRESTOptions
Returns
- UniTask<Response>
DeleteAsync(string, RESTOptions)
public UniTask<Response> DeleteAsync(string responseId, RESTOptions options = null)
Parameters
responseIdstringoptionsRESTOptions
Returns
- UniTask<Response>
ListInputItemsAsync(string, CursorQuery, RESTOptions)
public UniTask<QueryResponse<ConversationItem>> ListInputItemsAsync(string responseId, CursorQuery query = null, RESTOptions options = null)
Parameters
responseIdstringqueryCursorQueryoptionsRESTOptions
Returns
- UniTask<QueryResponse<ConversationItem>>
RetrieveAsync(string, ResponseQuery, RESTOptions)
public UniTask<Response> RetrieveAsync(string responseId, ResponseQuery request, RESTOptions options = null)
Parameters
responseIdstringrequestResponseQueryoptionsRESTOptions
Returns
- UniTask<Response>
StreamAsync(ResponseRequest, IResponsesApiListener, RESTOptions)
public UniTask StreamAsync(ResponseRequest request, IResponsesApiListener eventListener, RESTOptions options = null)
Parameters
requestResponseRequesteventListenerIResponsesApiListeneroptionsRESTOptions
Returns
- UniTask