Class ConversationService
public class ConversationService : CrudServiceBase<OpenAIClient>
- Inheritance
-
objectConversationService
Constructors
ConversationService(OpenAIClient)
public ConversationService(OpenAIClient client)
Parameters
clientOpenAIClient
Methods
CreateAsync(RESTOptions)
public UniTask<Conversation> CreateAsync(RESTOptions options = null)
Parameters
optionsRESTOptions
Returns
- UniTask<Conversation>
CreateAsync(string, RESTOptions)
public UniTask<Conversation> CreateAsync(string agentId, RESTOptions options = null)
Parameters
agentIdstringoptionsRESTOptions
Returns
- UniTask<Conversation>
CreateItemsAsync(string, ConversationItem[], RESTOptions)
Create items in a conversation with the given ID.
public UniTask<QueryResponse<ConversationItem>> CreateItemsAsync(string conversationId, ConversationItem[] items, RESTOptions options = null)
Parameters
conversationIdstringitemsConversationItem[]optionsRESTOptions
Returns
- UniTask<QueryResponse<ConversationItem>>
DeleteAsync(string, RESTOptions)
public UniTask<bool> DeleteAsync(string id, RESTOptions options = null)
Parameters
idstringoptionsRESTOptions
Returns
- UniTask<bool>
DeleteItemAsync(string, string, RESTOptions)
Delete an item from a conversation with the given IDs.
public UniTask<Conversation> DeleteItemAsync(string conversationId, string itemId, RESTOptions options = null)
Parameters
conversationIdstringitemIdstringoptionsRESTOptions
Returns
- UniTask<Conversation>
GetList()
public List<Conversation> GetList()
Returns
- List<Conversation>
ListItemsAsync(string, CursorQuery, RESTOptions)
List all items for a conversation with the given ID.
public UniTask<QueryResponse<ConversationItem>> ListItemsAsync(string conversationId, CursorQuery query = null, RESTOptions options = null)
Parameters
conversationIdstringqueryCursorQueryoptionsRESTOptions
Returns
- UniTask<QueryResponse<ConversationItem>>
RetrieveAsync(string, RESTOptions)
public UniTask<Conversation> RetrieveAsync(string id, RESTOptions options = null)
Parameters
idstringoptionsRESTOptions
Returns
- UniTask<Conversation>
RetrieveItemAsync(string, string, OutputDataList, RESTOptions)
Get a single item from a conversation with the given IDs.
public UniTask<ConversationItem> RetrieveItemAsync(string conversationId, string itemId, OutputDataList Include = null, RESTOptions options = null)
Parameters
conversationIdstringitemIdstringIncludeOutputDataListoptionsRESTOptions
Returns
- UniTask<ConversationItem>
UpdateAsync(string, ServerDictionary, RESTOptions)
public UniTask<Conversation> UpdateAsync(string id, ServerDictionary metadata, RESTOptions options = null)
Parameters
idstringmetadataServerDictionaryoptionsRESTOptions
Returns
- UniTask<Conversation>