v1

latestOpenAPI 3.0.22026-07-173834119.9 KB
Prompt Management

Create Prompt Template

Endpoint to Create a Prompt Template

This endpoint creates a prompt template and returns the template ID.


Request Body

FieldTypeDescription
namestrThe name of the prompt template.
prompt_templatestrThe prompt template.

Example Request Body

```json

{
    "name": "CHATBOT_PROMPT",
    "prompt_template": "Given the following information, answer the question. Context {context}. Question {question}"
}

```

Response Body

FieldTypeDescription
idstrThe ID of the created prompt template.
namestrThe name of the created prompt template.
prompt_templatestrThe prompt template.
versionintThe version of the created prompt template.

Errors

  • 500 Internal Server Error: If there is an unexpected error during the creation of the prompt template.
post/prompt/template/save

Request body

namestring required
prompt_templatestring required

Response

Successful Response

idstring required
namestring required
prompt_templatestring required
versioninteger required