feat: update all OpenAI/ChatGPT refs + settings dropdown for fixed-value fields
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+17
-28
@@ -90,10 +90,21 @@ def get_required_settings() -> List[Dict[str, Any]]:
|
||||
"wizard_step": 2,
|
||||
"wizard_category": "Security",
|
||||
},
|
||||
{
|
||||
"key": "ai_provider",
|
||||
"label": "AI Provider",
|
||||
"description": "AI provider for metadata extraction and OCR refinement (openai, azure, anthropic, gemini, ollama, openrouter, portkey, litellm)",
|
||||
"type": "string",
|
||||
"sensitive": False,
|
||||
"default": "openai",
|
||||
"options": ["openai", "azure", "anthropic", "gemini", "ollama", "openrouter", "portkey", "litellm"],
|
||||
"wizard_step": 3,
|
||||
"wizard_category": "AI Services",
|
||||
},
|
||||
{
|
||||
"key": "openai_api_key",
|
||||
"label": "OpenAI API Key",
|
||||
"description": "API key for OpenAI services (metadata extraction)",
|
||||
"label": "API Key (OpenAI / Azure / LiteLLM)",
|
||||
"description": "API key for OpenAI, Azure OpenAI, or LiteLLM (not required for Ollama)",
|
||||
"type": "string",
|
||||
"sensitive": True,
|
||||
"default": None,
|
||||
@@ -101,32 +112,12 @@ def get_required_settings() -> List[Dict[str, Any]]:
|
||||
"wizard_category": "AI Services",
|
||||
},
|
||||
{
|
||||
"key": "azure_ai_key",
|
||||
"label": "Azure AI Key",
|
||||
"description": "Azure AI key for document intelligence (OCR)",
|
||||
"type": "string",
|
||||
"sensitive": True,
|
||||
"default": None,
|
||||
"wizard_step": 3,
|
||||
"wizard_category": "AI Services",
|
||||
},
|
||||
{
|
||||
"key": "azure_region",
|
||||
"label": "Azure Region",
|
||||
"description": "Azure region for AI services (e.g., eastus)",
|
||||
"key": "openai_model",
|
||||
"label": "Default Model",
|
||||
"description": "Model name used when AI_MODEL is not set (e.g. gpt-4o-mini, claude-3-5-sonnet-20241022, llama3.2)",
|
||||
"type": "string",
|
||||
"sensitive": False,
|
||||
"default": "eastus",
|
||||
"wizard_step": 3,
|
||||
"wizard_category": "AI Services",
|
||||
},
|
||||
{
|
||||
"key": "azure_endpoint",
|
||||
"label": "Azure Endpoint",
|
||||
"description": "Azure AI endpoint URL",
|
||||
"type": "string",
|
||||
"sensitive": False,
|
||||
"default": None,
|
||||
"default": "gpt-4o-mini",
|
||||
"wizard_step": 3,
|
||||
"wizard_category": "AI Services",
|
||||
},
|
||||
@@ -147,8 +138,6 @@ def is_setup_required() -> bool:
|
||||
critical_settings = [
|
||||
("session_secret", ["INSECURE_DEFAULT_FOR_DEVELOPMENT_ONLY_DO_NOT_USE_IN_PRODUCTION_MINIMUM_32_CHARS"]),
|
||||
("admin_password", [None, "", "your_secure_password", "changeme", "admin"]),
|
||||
("openai_api_key", [None, "", "<OPENAI_API_KEY>", "test-key"]),
|
||||
("azure_ai_key", [None, "", "<AZURE_AI_KEY>", "test-key"]),
|
||||
]
|
||||
|
||||
for setting_key, invalid_values in critical_settings:
|
||||
|
||||
Reference in New Issue
Block a user