feat(ui): show only text models in the chat interface (#4869)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2025-02-19 17:34:30 +01:00 committed by GitHub
parent 08311f275a
commit ea0c9f1168
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 54 additions and 34 deletions

View file

@ -100,14 +100,25 @@ SOFTWARE.
<option value="" disabled class="text-gray-400" >Select a model</option>
{{ $model:=.Model}}
{{ range .ModelsConfig }}
{{ if eq . $model }}
<option value="chat/{{.}}" selected class="bg-gray-700 text-white">{{.}}</option>
{{ else }}
<option value="chat/{{.}}" class="bg-gray-700 text-white">{{.}}</option>
{{ end }}
{{ $cfg := . }}
{{ if eq .Name $model }}
<option value="chat/{{.Name}}" selected class="bg-gray-700 text-white">{{.Name}}</option>
{{ else }}
{{ range .KnownUsecaseStrings }}
{{ if eq . "FLAG_CHAT" }}
<option value="chat/{{$cfg.Name}}" class="bg-gray-700 text-white">{{$cfg.Name}}</option>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ range .ModelsWithoutConfig }}
{{ if eq . $model }}
<option value="chat/{{.}}" selected class="bg-gray-700 text-white">{{.}}</option>
{{ else }}
<option value="chat/{{.}}" class="bg-gray-700 text-white">{{.}}</option>
{{ end }}
{{end}}
</select>
</div>
</div>