Skip to content

AI Prompt Template

Function Description

AI prompt templates are used to quickly build similar types of AI requests.

Execution Properties

Plugin Execution Phase: Default Phase
Plugin Execution Priority: 500

Configuration Description

NameData TypeRequiredDefault ValueDescription
templatesarray of objectRequired-Template settings

Template object configuration description:

NameData TypeRequiredDefault ValueDescription
namestringRequired-Template name
template.modelstringRequired-Model name
template.messagesarray of objectRequired-Input for large model

Message object configuration description:

NameData TypeRequiredDefault ValueDescription
rolestringRequired-Role
contentstringRequired-Message

Configuration example:

templates:
- name: "developer-chat"
template:
model: gpt-3.5-turbo
messages:
- role: system
content: "You are a {{program}} expert, in {{language}} programming language."
- role: user
content: "Write me a {{program}} program."

Example request body using the above configuration:

{
"template": "developer-chat",
"properties": {
"program": "quick sort",
"language": "python"
}
}