Class AssistantSettings
Represents configuration options for creating and interacting with an OpenAI Assistant tool.
Inheritance
object
AssistantSettings
Assembly: .dll
Syntax
public class AssistantSettings
Properties
AssistantId
Required. Unique identifier for the Assistant used for AssistantsAPI.
This is used to locally identify the AssistantsAPI instance and is not related to the OpenAI API.
Declaration
public string AssistantId { get; set; }
Property Value
AutoCancelOnRequiredAction
Declaration
public bool AutoCancelOnRequiredAction { get; set; }
Property Value
DebugMode
Optional. If true, the AssistantController will log debug information.
This is useful for debugging and development purposes.
It is recommended to disable this in production builds to avoid performance overhead.
Declaration
public bool DebugMode { get; set; }
Property Value
ErrorEvent
Declaration
public IServerSentErrorEventHandler ErrorEvent { get; set; }
Property Value
Optional.
Forces the assistants to use the specified tool on every request.
Declaration
public ToolChoice ForcedTool { get; set; }
Property Value
FunctionManager
Declaration
public IFunctionManager FunctionManager { get; set; }
Property Value
MaxRequestLength
Optional.
The maximum number of characters the assistant's responses can contain.
Use -1 for no limit.
Declaration
public int MaxRequestLength { get; set; }
Property Value
OnAssistantCreated
Declaration
public UnityEvent<Assistant> OnAssistantCreated { get; set; }
Property Value
OnAssistantRetrieved
Declaration
public UnityEvent<Assistant> OnAssistantRetrieved { get; set; }
Property Value
OnAssistantStatusChanged
Declaration
public UnityEvent<AssistantStatus> OnAssistantStatusChanged { get; set; }
Property Value
OnAssistantUpdated
Declaration
public UnityEvent<Assistant> OnAssistantUpdated { get; set; }
Property Value
OnMessageCompleted
Declaration
public UnityEvent<ThreadMessage> OnMessageCompleted { get; set; }
Property Value
OnMessageCreated
Declaration
public UnityEvent<ThreadMessage> OnMessageCreated { get; set; }
Property Value
OnMessageDelta
Declaration
public UnityEvent<ThreadMessageDelta> OnMessageDelta { get; set; }
Property Value
Declaration
public UnityEvent<ToolCall[]> OnReceiveToolCalls { get; set; }
Property Value
OnRequiredAction
Declaration
public UnityEvent<FunctionCall> OnRequiredAction { get; set; }
Property Value
OnRequiredActionTimeout
Declaration
public UnityEvent OnRequiredActionTimeout { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
OnRunStatusChanged
Declaration
public UnityEvent<RunStatus> OnRunStatusChanged { get; set; }
Property Value
OnThreadCreated
Declaration
public UnityEvent<Thread> OnThreadCreated { get; set; }
Property Value
Type |
Description |
UnityEvent<Thread> |
|
OnThreadDeleted
Declaration
public UnityEvent<bool> OnThreadDeleted { get; set; }
Property Value
Type |
Description |
UnityEvent<bool> |
|
OnThreadRetrieved
Declaration
public UnityEvent<Thread> OnThreadRetrieved { get; set; }
Property Value
Type |
Description |
UnityEvent<Thread> |
|
RequiredActionTimeoutSeconds
Declaration
public int RequiredActionTimeoutSeconds { get; set; }
Property Value
RunPollingDelay
Optional.
Tthe initial delay in seconds before checking the run status for the first time.
Declaration
public int RunPollingDelay { get; set; }
Property Value
RunPollingInterval
Optional.
The recurring interval in seconds for checking the run status.
Declaration
public int RunPollingInterval { get; set; }
Property Value
RunPollingTimeout
Optional.
The timeout in seconds for the run operation.
Declaration
public int RunPollingTimeout { get; set; }
Property Value
SaveMessagesToPrefs
Declaration
public bool SaveMessagesToPrefs { get; set; }
Property Value
Stream
Whether the assistant should stream responses.
Defaults to false.
Declaration
public bool Stream { get; set; }
Property Value
ThreadId
Declaration
public string ThreadId { get; set; }
Property Value
UsageEvent
Declaration
public IUsageEventHandler UsageEvent { get; set; }
Property Value
Methods
Validate()
Declaration