{ "type": "object", "properties": { "model": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "anthropic", "description": "Use Anthropic model" }, "modelName": { "type": "string", "description": "The name of the model" }, "secrets": { "type": "object", "properties": { "basePath": { "type": "string", "default": "https://api.anthropic.com", "description": "The Anthropic base API url" }, "apiKey": { "type": "string", "description": "The Anthropic API key" } }, "additionalProperties": false, "description": "The Anthropic API secrets config" }, "temperature": { "type": "number", "description": "The temperature for the Anthropic model" }, "maxTokens": { "type": "number", "description": "The maximum number of tokens for the Anthropic model" }, "topP": { "type": "number", "description": "The top P value for the Anthropic model" }, "topK": { "type": "number", "description": "The top K value for the Anthropic model" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "huggingFace", "description": "Use Open AI model" }, "modelName": { "$ref": "#/properties/model/anyOf/0/properties/modelName" }, "secrets": { "type": "object", "properties": { "basePath": { "type": "string", "description": "The base API url" }, "apiKey": { "type": "string", "description": "The HuggingFace API key" } }, "additionalProperties": false, "description": "The HuggingFace API secrets config" }, "temperature": { "type": "number", "description": "The temperature for the HuggingFace model" }, "maxTokens": { "type": "number", "description": "The maximum number of tokens for the HuggingFace model" }, "topP": { "type": "number", "description": "The top P value for the HuggingFace model" }, "topK": { "type": "number", "description": "The top K value for the HuggingFace model" }, "frequencyPenalty": { "type": "number", "description": "The frequency penalty for the HuggingFace model" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "openai", "description": "Use OpenAI model" }, "modelName": { "$ref": "#/properties/model/anyOf/0/properties/modelName" }, "secrets": { "type": "object", "properties": { "basePath": { "type": "string", "default": "https://api.openai.com/v1", "description": "The OpenAI base API path" }, "apiKey": { "type": "string", "description": "The OpenAI API key" }, "organization": { "type": "string", "description": "The OpenAI organization" }, "accessToken": { "type": "string", "description": "The OpenAI access token" } }, "additionalProperties": false, "description": "The OpenAI API secrets config" }, "temperature": { "type": "number", "description": "The temperature for the OpenAI model" }, "maxTokens": { "type": "number", "description": "The maximum number of tokens for the OpenAI model" }, "topP": { "type": "number", "description": "The top P value for the OpenAI model" }, "frequencyPenalty": { "type": "number", "description": "The frequency penalty for the OpenAI model" }, "presencePenalty": { "type": "number", "description": "The presence penalty for the OpenAI model" } }, "required": [ "type" ], "additionalProperties": false } ], "description": "The LLM model configuration" }, "title": { "type": "string" }, "userPrompt": { "type": "string" }, "systemPrompt": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "enum": [ "user", "assistant", "system" ] }, "text": { "type": "string" } }, "required": [ "name", "text" ], "additionalProperties": false } }, "forms": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "input" }, "defaultValue": {}, "description": { "type": "string" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "textarea" }, "defaultValue": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/defaultValue" }, "description": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/description" }, "row": { "type": "number" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "select" }, "defaultValue": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/defaultValue" }, "description": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/description" }, "options": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "value": { "type": "string" } }, "required": [ "value" ], "additionalProperties": false } } }, "required": [ "type", "options" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "checkbox-group" }, "defaultValue": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/defaultValue" }, "description": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/description" }, "options": { "type": "array", "items": { "$ref": "#/properties/forms/additionalProperties/anyOf/2/properties/options/items" } } }, "required": [ "type", "options" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "radio-group" }, "defaultValue": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/defaultValue" }, "description": { "$ref": "#/properties/forms/additionalProperties/anyOf/0/properties/description" }, "options": { "type": "array", "items": { "$ref": "#/properties/forms/additionalProperties/anyOf/2/properties/options/items" } } }, "required": [ "type", "options" ], "additionalProperties": false } ] } } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }