1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 17:06:42 +00:00

clean model names

This commit is contained in:
Laura
2025-08-08 14:49:14 +02:00
parent 359cfdf707
commit 65f167a0f8

View File

@@ -1,6 +1,9 @@
package main
import "context"
import (
"context"
"strings"
)
type Model struct {
ID string `json:"id"`
@@ -22,9 +25,15 @@ func LoadModels() ([]*Model, error) {
models := make([]*Model, len(list))
for index, model := range list {
name := model.Name
if index := strings.Index(name, ": "); index != -1 {
name = name[index+2:]
}
m := &Model{
ID: model.ID,
Name: model.Name,
Name: name,
Description: model.Description,
SupportedParameters: model.SupportedParameters,
}