Create Persona
Create a new persona
curl --request POST \
--url https://api.anam.ai/v1/personas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Eva",
"description": "Eva is the virtual receptionist of the fictional Sunset Hotel.",
"personaPreset": "eva",
"brainType": {},
"brain": {
"systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with '\''Hi,\n this is The Sunset Hotel reception, how may I help you?'\'' Be mindful of the hotel'\''s availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There'\''s a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself.",
"personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
"fillerPhrases": [
"Okay, got it.",
"I see.",
"Let me check that for you."
],
"languageModel": "<string>"
}
}'
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"personaPreset": "<string>",
"brainType": {},
"brain": {
"systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with 'Hi,\n this is The Sunset Hotel reception, how may I help you?' Be mindful of the hotel's availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There's a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself.",
"personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
"fillerPhrases": [
"Okay, got it.",
"I see.",
"Let me check that for you."
],
"languageModel": "<string>"
},
"isDefaultPersona": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"shareLinks": [
{
"id": "<string>",
"token": "<string>",
"usageLimit": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"usageCount": 123
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The name for the persona
"Eva"
The persona preset defines the face and voice of the persona from our list of available presets. Currently, the only available preset is "eva".
"eva"
The type of brain to use for the persona.
The brain configuration for the persona.
The system prompt to use for LLM interactions.
"You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with 'Hi,\n this is The Sunset Hotel reception, how may I help you?' Be mindful of the hotel's availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There's a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself."
Personality is a short description of the persona role-play. This improves the quality of the choice of filler phrases.
"You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva."
Filler phrases can be used to improve the response time of the persona. When enabled via the SDK the persona will first respond with a filler phrase before the actual response. Selection of filler phrases is decided by calling an LLM with the available list + personality.
[
"Okay, got it.",
"I see.",
"Let me check that for you."
]
The language model to use for the persona.
The description for the persona. This is an optional descriptor and is not used as part of the LLM prompt generation.
"Eva is the virtual receptionist of the fictional Sunset Hotel."
Response
The system prompt to use for LLM interactions.
"You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with 'Hi,\n this is The Sunset Hotel reception, how may I help you?' Be mindful of the hotel's availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There's a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself."
Personality is a short description of the persona role-play. This improves the quality of the choice of filler phrases.
"You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva."
Filler phrases can be used to improve the response time of the persona. When enabled via the SDK the persona will first respond with a filler phrase before the actual response. Selection of filler phrases is decided by calling an LLM with the available list + personality.
[
"Okay, got it.",
"I see.",
"Let me check that for you."
]
The language model to use for the persona.
Was this page helpful?
curl --request POST \
--url https://api.anam.ai/v1/personas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Eva",
"description": "Eva is the virtual receptionist of the fictional Sunset Hotel.",
"personaPreset": "eva",
"brainType": {},
"brain": {
"systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with '\''Hi,\n this is The Sunset Hotel reception, how may I help you?'\'' Be mindful of the hotel'\''s availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There'\''s a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself.",
"personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
"fillerPhrases": [
"Okay, got it.",
"I see.",
"Let me check that for you."
],
"languageModel": "<string>"
}
}'
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"personaPreset": "<string>",
"brainType": {},
"brain": {
"systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with 'Hi,\n this is The Sunset Hotel reception, how may I help you?' Be mindful of the hotel's availability: single and double rooms\n are still available all next week, except Tuesday. Dogs are allowed. There's a restaurant and bar in the lobby. If\n communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n conversation. Do not repeat yourself.",
"personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
"fillerPhrases": [
"Okay, got it.",
"I see.",
"Let me check that for you."
],
"languageModel": "<string>"
},
"isDefaultPersona": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"shareLinks": [
{
"id": "<string>",
"token": "<string>",
"usageLimit": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"usageCount": 123
}
]
}