Saltar para o conteúdo principal
PATCH
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
commands
/
{commandPublicId}
Update command
curl --request PATCH \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/commands/{commandPublicId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data @- <<EOF
{
  "command": "summarize-invoices",
  "description": "Summarizes recent invoices grouped by month.",
  "name": "Summarize invoices",
  "prompt": "Summarize the user's last 10 invoices grouped by month."
}
EOF
{
  "command": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "lastUsedAt": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "prompt": "<string>",
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedAt": "2023-11-07T05:31:56Z",
  "usageCount": 123
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório
commandPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for updating an existing agent command. All fields are optional; only provided fields are updated.

command
string

New slash command identifier. Lowercase alphanumeric with optional hyphens (not leading or trailing).

Maximum string length: 100
Pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Exemplo:

"summarize-invoices"

description
string

Short description shown in the command picker.

Maximum string length: 500
Exemplo:

"Summarizes recent invoices grouped by month."

name
string

New display name of the command.

Maximum string length: 150
Exemplo:

"Summarize invoices"

prompt
string

New prompt template injected when the command is invoked.

Maximum string length: 10000
Exemplo:

"Summarize the user's last 10 invoices grouped by month."

status
enum<string>

New status of the command (enabled or disabled).

Opções disponíveis:
active,
inactive

Resposta

OK

Slash command on an agent.

command
string
createdAt
string<date-time>
description
string
lastUsedAt
string<date-time>
name
string
prompt
string
publicId
string<uuid>
status
enum<string>
Opções disponíveis:
active,
inactive
updatedAt
string<date-time>
usageCount
integer<int64>