UpdatePrompt
client.agents.updatePrompt(AgentUpdatePromptParams { metadata, promptId, spec } body, RequestOptionsoptions?): AgentUpdatePromptResponse { prompt }
POST/gitpod.v1.AgentService/UpdatePrompt
Updates an existing prompt.
Use this method to:
- Modify prompt content or metadata
- Change prompt type (template/command)
UpdatePrompt
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const response = await client.agents.updatePrompt();
console.log(response.prompt);{
"prompt": {
"id": "id",
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"description": "description",
"name": "name",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"command": "command",
"isCommand": true,
"isSkill": true,
"isTemplate": true,
"prompt": "prompt"
}
}
}Returns Examples
{
"prompt": {
"id": "id",
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"description": "description",
"name": "name",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"command": "command",
"isCommand": true,
"isSkill": true,
"isTemplate": true,
"prompt": "prompt"
}
}
}