Ai Assistant Personalities

An AI Assistant Personality defines a system prompt used to customize the in-app AI Assistant.

List Ai Assistant Personalities

SDK Method

AiAssistantPersonality.List();

Return Object

FilesList<AiAssistantPersonality>

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

using FilesCom.Models;

try
{
    var aiAssistantPersonalityIterator = AiAssistantPersonality.List();
    foreach (AiAssistantPersonality aiAssistantPersonality in aiAssistantPersonalityIterator.ListAutoPaging()) {
        // Operate on aiAssistantPersonality
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Show Ai Assistant Personality

SDK Method

AiAssistantPersonality.Find();

Return Object

AiAssistantPersonality

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Method Arguments

ArgumentDescription
id
int64
Required
Ai Assistant Personality ID.

Example Request

using FilesCom.Models;

try
{
    var aiAssistantPersonality = await AiAssistantPersonality.Find(id);
    // Operate on aiAssistantPersonality
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Create Ai Assistant Personality

SDK Method

AiAssistantPersonality.Create();

Return Object

AiAssistantPersonality

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Method Arguments

ArgumentDefaultDescription
apply_to_all_workspaces
boolean
falseIf true, this default-workspace personality can apply to users in all workspaces.
name
string
Required
AI Assistant Personality name.
system_prompt
string
Required
System prompt injected into the in-app AI Assistant.
use_by_default
boolean
falseWhether this personality is the default personality for the Workspace.
workspace_id
int64
0Workspace ID. 0 means the default workspace.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("name", "Concise Assistant");
parameters.Add("system_prompt", "Respond as a concise operations assistant.");

try
{
    var aiAssistantPersonality = await AiAssistantPersonality.Create(parameters);
    // Operate on aiAssistantPersonality
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Update Ai Assistant Personality

SDK Method

aiAssistantPersonality.Update();

Return Object

AiAssistantPersonality

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Method Arguments

ArgumentDescription
apply_to_all_workspaces
boolean
If true, this default-workspace personality can apply to users in all workspaces.
name
string
AI Assistant Personality name.
system_prompt
string
System prompt injected into the in-app AI Assistant.
use_by_default
boolean
Whether this personality is the default personality for the Workspace.
workspace_id
int64
Workspace ID. 0 means the default workspace.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("apply_to_all_workspaces", false);

try
{
    // Find the aiAssistantPersonality object by its id.
    var aiAssistantPersonality = await AiAssistantPersonality.Find(id);
    await aiAssistantPersonality.Update(parameters);
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Delete Ai Assistant Personality

SDK Method

aiAssistantPersonality.Delete();

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Example Request

using FilesCom.Models;

try
{
    // Find the aiAssistantPersonality object by its id.
    var aiAssistantPersonality = await AiAssistantPersonality.Find(id);
    await aiAssistantPersonality.Delete();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

The AiAssistantPersonality Object

Some of the methods above return a AiAssistantPersonality object. The attributes of this object are listed below.

AttributeDescription
id
int64
AI Assistant Personality ID.
workspace_id
int64
Workspace ID. 0 means the default workspace.
name
string
AI Assistant Personality name.
system_prompt
string
System prompt injected into the in-app AI Assistant.
use_by_default
boolean
Whether this personality is the default personality for the Workspace.
apply_to_all_workspaces
boolean
If true, this default-workspace personality can apply to users in all workspaces.
created_at
date-time
Creation time.
updated_at
date-time
Last update time.