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:
@@ -18,7 +18,8 @@
|
||||
for everyone, whether you're a small startup or a large enterprise.
|
||||
</p>
|
||||
<p class="text-gray-600">
|
||||
We harness the power of OpenAI for metadata extraction and text refinement, integrate seamlessly
|
||||
We harness the power of pluggable AI providers (OpenAI, Anthropic Claude, Google Gemini, Ollama,
|
||||
OpenRouter, Portkey, and more) for metadata extraction and text refinement, integrate seamlessly
|
||||
with Dropbox, Nextcloud, and Paperless NGX for storage and indexing, leverage Azure Document
|
||||
Intelligence for OCR, and even use Gotenberg for file-to-PDF conversions.
|
||||
</p>
|
||||
@@ -33,7 +34,7 @@
|
||||
<ul class="list-disc list-inside text-gray-600 ml-2">
|
||||
<li>Simple and secure file uploads with drag & drop support</li>
|
||||
<li>OCR powered by Azure Document Intelligence</li>
|
||||
<li>Automated metadata extraction using OpenAI</li>
|
||||
<li>Automated metadata extraction using a pluggable AI provider</li>
|
||||
<li>PDF conversion for various file formats via Gotenberg</li>
|
||||
<li>Intelligent document classification and date extraction</li>
|
||||
</ul>
|
||||
|
||||
@@ -139,8 +139,21 @@
|
||||
Enable {{ setting.key.replace('_', ' ').title() }}
|
||||
</label>
|
||||
</div>
|
||||
{% elif setting.metadata.options %}
|
||||
<!-- Dropdown Select for fields with a fixed list of values -->
|
||||
<select
|
||||
id="{{ setting.key }}"
|
||||
name="{{ setting.key }}"
|
||||
x-model="formData['{{ setting.key }}']"
|
||||
class="setting-input w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"
|
||||
>
|
||||
<option value="">— select —</option>
|
||||
{% for opt in setting.metadata.options %}
|
||||
<option value="{{ opt }}">{{ opt }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% else %}
|
||||
<!-- Text Input -->
|
||||
<!-- Text / Password Input -->
|
||||
<div class="relative">
|
||||
{% if setting.metadata.sensitive %}
|
||||
<!-- Sensitive Field with Show/Hide Toggle -->
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="border-b border-gray-200 pb-6 last:border-b-0">
|
||||
<label for="{{ setting.key }}" class="block text-sm font-medium text-gray-900 mb-1">
|
||||
{{ setting.label }}
|
||||
{% if setting.default is none or setting.key in ['admin_password', 'openai_api_key', 'azure_ai_key', 'azure_endpoint'] %}
|
||||
{% if setting.default is none or setting.key in ['admin_password'] %}
|
||||
<span class="text-red-600">*</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
@@ -129,7 +129,18 @@
|
||||
/>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- Regular input -->
|
||||
<!-- Regular input or select -->
|
||||
{% if setting.options %}
|
||||
<select
|
||||
id="{{ setting.key }}"
|
||||
name="{{ setting.key }}"
|
||||
class="wizard-input w-full px-4 py-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
||||
>
|
||||
{% for opt in setting.options %}
|
||||
<option value="{{ opt }}" {% if setting.current_value == opt %}selected{% elif not setting.current_value and opt == setting.default %}selected{% endif %}>{{ opt }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% else %}
|
||||
<input
|
||||
type="{% if setting.sensitive %}password{% else %}text{% endif %}"
|
||||
id="{{ setting.key }}"
|
||||
@@ -137,9 +148,10 @@
|
||||
value="{{ setting.current_value if setting.current_value else '' }}"
|
||||
class="wizard-input w-full px-4 py-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
||||
placeholder="{{ setting.description }}"
|
||||
{% if setting.default is none or setting.key in ['admin_password', 'openai_api_key', 'azure_ai_key', 'azure_endpoint'] %}required{% endif %}
|
||||
{% if setting.default is none or setting.key in ['admin_password'] %}required{% endif %}
|
||||
/>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if setting.value_source == 'db' %}
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800 mt-1">DB</span>
|
||||
|
||||
@@ -174,11 +174,11 @@
|
||||
Configure Now
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elif name == "OpenAI" %}
|
||||
{% elif name == "AI Provider" %}
|
||||
{% if provider.configured %}
|
||||
<button
|
||||
class="test-provider-btn inline-flex items-center px-2.5 py-1.5 border border-gray-300 text-xs font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
||||
data-provider="openai">
|
||||
data-provider="ai_provider">
|
||||
Test Connection
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -521,8 +521,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
endpoint = '/api/onedrive/test-token';
|
||||
} else if (provider === 'google_drive') {
|
||||
endpoint = '/api/google-drive/test-token';
|
||||
} else if (provider === 'openai') {
|
||||
endpoint = '/api/openai/test';
|
||||
} else if (provider === 'ai_provider') {
|
||||
endpoint = '/api/ai/test';
|
||||
} else if (provider === 'azure') {
|
||||
endpoint = '/api/azure/test';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user