Allows an avatar image to be added to the agent.
This action is designed to permit the upload and serving of an avatar image for your agent.
jivas/avatar_action
AvatarAction
^2.0.0
The Avatar Action supports avatar management for agents via a unified API endpoint. You can set, retrieve, and delete an agent's avatar image using the set_avatar
, get_avatar
, and delete_avatar
walkers respectively.
POST /action/walker
Parameter | Description | Example Value |
---|---|---|
agent_id | The ID of the agent | "my-agent-uuid" |
module_root | Module root for these actions | "actions.jivas.avatar_action" |
walker | The operation to perform | "set_avatar" |
args | Arguments dictionary for the walker | See examples below |
files | List of file objects, required for upload operations | See below |
Walker: 'set_avatar'
files
parameter should include the image file to be set as the avatar.{
"agent_id": "my-agent-uuid",
"module_root": "actions.jivas.avatar_action",
"walker": "set_avatar",
"args": {},
"files": [
{
"name": "avatar.png",
"content": "<binary image data>",
"type": "image/png"
}
]
}
Walker: 'get_avatar'
base64_prefix
.{
"agent_id": "my-agent-uuid",
"module_root": "actions.jivas.avatar_action",
"walker": "get_avatar",
"args": {
"base64_prefix": true
},
"files": []
}
Walker: 'delete_avatar'
{
"agent_id": "my-agent-uuid",
"module_root": "actions.jivas.avatar_action",
"walker": "delete_avatar",
"args": {},
"files": []
}
set_avatar
, ensure the image file is properly encoded and the mimetype is correctly specified.get_avatar
, if base64_prefix
is True
, the returned string will include the mimetype prefix (e.g., data:image/png;base64,
).avatar_action
project.git clone https://github.com/TrueSelph/avatar_action
git checkout -b new-feature-x
git commit -m 'Implemented new feature x.'
git push origin new-feature-x
This project is protected under the Apache License 2.0. See LICENSE for more information.
jvcli download action jivas/avatar_action
Last published
2 months ago
Version
0.0.1
Downloads
223
Author
jivasType
action
Visibility
Public
Tags