Class AssistantProvider
Simplifies implementation of HTTP operations for handling Assistant for AssistantsAPIv2.
Implements
IObjectProvider<Assistant>
Inherited Members
ObjectProvider<Assistant>.OnCreate
ObjectProvider<Assistant>.OnRetrieve
ObjectProvider<Assistant>.OnUpdate
ObjectProvider<Assistant>.OnList
ObjectProvider<Assistant>.OnDelete
ObjectProvider<Assistant>.CreateAsync(params object[])
ObjectProvider<Assistant>.RetrieveAsync(string, params object[])
ObjectProvider<Assistant>.RetrieveOrCreateAsync(string, params object[])
ObjectProvider<Assistant>.UpdateAsync(string, params object[])
ObjectProvider<Assistant>.ListAsync(params object[])
ObjectProvider<Assistant>.DeleteAsync(string, params object[])
Namespace: Glitch9.AIDevKit.OpenAI.Assistants
Assembly: .dll
Syntax
public class AssistantProvider : AssistantProviderBase<Assistant>, IObjectProvider<Assistant>
Constructors
AssistantProvider(AssistantsAPIv2)
Declaration
public AssistantProvider(AssistantsAPIv2 api)
Parameters
Type | Name | Description |
---|---|---|
AssistantsAPIv2 | api |
Methods
CreateInternalAsync(params object[])
Declaration
protected override UniTask<Assistant> CreateInternalAsync(params object[] args)
Parameters
Type | Name | Description |
---|---|---|
object[] | args |
Returns
Type | Description |
---|---|
UniTask<Assistant> |
Overrides
Glitch9.IO.Networking.RESTApi.ObjectProvider<Glitch9.AIDevKit.OpenAI.Assistant>.CreateInternalAsync(params object[])
DeleteInternalAsync(string, params object[])
Declaration
protected override UniTask<bool> DeleteInternalAsync(string id, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | id | |
object[] | args |
Returns
Type | Description |
---|---|
UniTask<bool> |
Overrides
Glitch9.IO.Networking.RESTApi.ObjectProvider<Glitch9.AIDevKit.OpenAI.Assistant>.DeleteInternalAsync(string, params object[])
FindMatchingAssistant(Assistant[])
OpenAI saves your assistant to their server. So try retrieving the assistant from the server first instead of creating a new one.
Declaration
protected virtual Assistant FindMatchingAssistant(Assistant[] assistants)
Parameters
Type | Name | Description |
---|---|---|
Assistant[] | assistants | Array of existing assistants. |
Returns
Type | Description |
---|---|
Assistant | The matching assistant object if found; otherwise, null. |
ListInternalAsync(params object[])
Declaration
protected override UniTask<Assistant[]> ListInternalAsync(params object[] args)
Parameters
Type | Name | Description |
---|---|---|
object[] | args |
Returns
Type | Description |
---|---|
UniTask<Assistant[]> |
Overrides
Glitch9.IO.Networking.RESTApi.ObjectProvider<Glitch9.AIDevKit.OpenAI.Assistant>.ListInternalAsync(params object[])
RetrieveInternalAsync(string, params object[])
Declaration
protected override UniTask<Assistant> RetrieveInternalAsync(string id, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | id | |
object[] | args |
Returns
Type | Description |
---|---|
UniTask<Assistant> |
Overrides
Glitch9.IO.Networking.RESTApi.ObjectProvider<Glitch9.AIDevKit.OpenAI.Assistant>.RetrieveInternalAsync(string, params object[])
UpdateInternalAsync(string, params object[])
Declaration
protected override UniTask<Assistant> UpdateInternalAsync(string id, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | id | |
object[] | args |
Returns
Type | Description |
---|---|
UniTask<Assistant> |
Overrides
Glitch9.IO.Networking.RESTApi.ObjectProvider<Glitch9.AIDevKit.OpenAI.Assistant>.UpdateInternalAsync(string, params object[])
Implements
Glitch9.IO.Networking.RESTApi.IObjectProvider<T>