diff --git a/extensions/vscode/SerializedContinueConfig.json b/extensions/vscode/config_schema.json similarity index 86% rename from extensions/vscode/SerializedContinueConfig.json rename to extensions/vscode/config_schema.json index 6afe2052b..2eee6d576 100644 --- a/extensions/vscode/SerializedContinueConfig.json +++ b/extensions/vscode/config_schema.json @@ -184,10 +184,105 @@ ] } }, - "required": [ - "title", - "provider", - "model" + "required": ["title", "provider", "model"], + "allOf": [ + { + "if": { + "properties": { + "provider": { + "enum": [ + "openai", + "anthropic", + "google-palm", + "huggingface-inference-api", + "replicate", + "together" + ] + } + } + }, + "then": { + "required": ["api_key"] + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["huggingface-tgi"] + } + } + }, + "then": { + "required": ["api_base"] + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai", "openai-aiohttp"] + } + } + }, + "then": { + "properties": { + "engine": { + "type": "string" + }, + "api_type": { + "type": "string" + }, + "api_version": { + "type": "string" + } + } + } + }, + { + "if": { + "properties": { + "api_type": { + "const": "azure" + } + } + }, + "then": { + "required": ["engine", "api_version", "api_base"] + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai"] + } + } + }, + "then": { + "properties": { + "use_legacy_completions_endpoint": { + "type": "boolean" + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["text-gen-webui"] + } + } + }, + "then": { + "properties": { + "streaming_url": { + "type": "string" + } + } + } + } ] }, "ModelRoles": { @@ -215,9 +310,7 @@ "type": "string" } }, - "required": [ - "default" - ] + "required": ["default"] }, "SlashCommand": { "title": "SlashCommand", @@ -251,11 +344,7 @@ "type": "object" } }, - "required": [ - "name", - "description", - "step" - ] + "required": ["name", "description", "step"] }, "CustomCommand": { "title": "CustomCommand", @@ -274,11 +363,7 @@ "type": "string" } }, - "required": [ - "name", - "prompt", - "description" - ] + "required": ["name", "prompt", "description"] }, "ContextProviderWithParams": { "title": "ContextProviderWithParams", @@ -303,9 +388,7 @@ "type": "object" } }, - "required": [ - "name" - ] + "required": ["name"] }, "RetrievalSettings": { "title": "RetrievalSettings", @@ -420,6 +503,11 @@ } ] }, + "system_message": { + "title": "System Message", + "description": "A system message that will always be followed by the LLM", + "type": "string" + }, "completion_options": { "title": "Completion Options", "description": "Default options for completion. These will be overriden by any options set for a specific model.", @@ -518,4 +606,4 @@ } } } -} \ No newline at end of file +} diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 549fb2d9e..976cfe809 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -278,7 +278,7 @@ "jsonValidation": [ { "fileMatch": "config.json", - "url": "./SerializedContinueConfig.json" + "url": "./config_schema.json" } ] }, diff --git a/gui/src/components/dialogs/FTCDialog.tsx b/gui/src/components/dialogs/FTCDialog.tsx index 5fa2d4e64..48699fefd 100644 --- a/gui/src/components/dialogs/FTCDialog.tsx +++ b/gui/src/components/dialogs/FTCDialog.tsx @@ -55,10 +55,11 @@ function FTCDialog() {