feat: soporte Google Gemini en IA controller + UI
This commit is contained in:
@@ -89,7 +89,8 @@
|
||||
'bg-green-100 text-green-700': item.provider === 'openai',
|
||||
'bg-orange-100 text-orange-700': item.provider === 'anthropic',
|
||||
'bg-blue-100 text-blue-700': item.provider === 'ollama',
|
||||
'bg-gray-100 text-gray-700': !['qwen','openai','anthropic','ollama'].includes(item.provider)
|
||||
'bg-yellow-100 text-yellow-700': item.provider === 'gemini',
|
||||
'bg-gray-100 text-gray-700': !['qwen','openai','anthropic','ollama','gemini'].includes(item.provider)
|
||||
}" x-text="item.provider"></span>
|
||||
</td>
|
||||
<td class="py-2 px-3 text-gray-500 font-mono text-xs" x-text="item.model_name || '—'"></td>
|
||||
@@ -143,17 +144,18 @@
|
||||
<select x-model="form.provider" required
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-[#8eb02f]">
|
||||
<option value="">Seleccionar...</option>
|
||||
<option value="qwen">Qwen (Alibaba)</option>
|
||||
<option value="qwen">Qwen (Alibaba)</option>
|
||||
<option value="openai">OpenAI</option>
|
||||
<option value="anthropic">Anthropic</option>
|
||||
<option value="groq">Groq</option>
|
||||
<option value="ollama">Ollama (local)</option>
|
||||
<option value="gemini">Google Gemini</option>
|
||||
<option value="otro">Otro</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Modelo</label>
|
||||
<input x-model="form.model_name" type="text" placeholder="Ej: qwen2.5-72b-instruct"
|
||||
<input x-model="form.model_name" type="text" placeholder="Ej: gemini-2.0-flash"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-[#8eb02f]" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,15 +172,19 @@
|
||||
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Base URL
|
||||
<span x-show="form.provider !== 'ollama'" class="text-gray-400">(opcional — dejar vacío para usar el default del provider)</span>
|
||||
<span x-show="form.provider !== 'ollama' && form.provider !== 'gemini'" class="text-gray-400">(opcional — dejar vacío para usar el default del provider)</span>
|
||||
<span x-show="form.provider === 'ollama'" class="text-blue-500">* requerido — incluir /v1 al final</span>
|
||||
<span x-show="form.provider === 'gemini'" class="text-gray-400">(fijo — no necesita)</span>
|
||||
</label>
|
||||
<input x-model="form.base_url" type="url"
|
||||
:placeholder="form.provider === 'ollama' ? 'http://10.0.1.15:11434/v1' : 'https://dashscope.aliyuncs.com/compatible-mode/v1'"
|
||||
:placeholder="form.provider === 'ollama' ? 'http://10.0.1.15:11434/v1' : form.provider === 'gemini' ? 'https://generativelanguage.googleapis.com' : 'https://dashscope.aliyuncs.com/compatible-mode/v1'"
|
||||
class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-[#8eb02f]" />
|
||||
<p x-show="form.provider === 'ollama'" x-cloak class="text-[10px] text-blue-500 mt-1">
|
||||
Interna (red Coolify): <code>http://10.0.1.15:11434/v1</code> — Pública: <code>https://ollama.u-s.app/v1</code>
|
||||
</p>
|
||||
<p x-show="form.provider === 'gemini'" x-cloak class="text-[10px] text-yellow-600 mt-1">
|
||||
Usa <code>https://generativelanguage.googleapis.com/v1beta/models/{model}:streamGenerateContent?alt=sse</code>. Solo necesitas el API Key.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user