Merge branch 'feature/1.5-local-model' into 'main'

本地模型列表新增provider

See merge request apipark/APIPark!192
This commit is contained in:
刘健
2025-02-15 17:59:48 +08:00
2 changed files with 8 additions and 7 deletions
+7 -7
View File
@@ -65,13 +65,13 @@ type SimpleItem struct {
}
type LocalModelItem struct {
Id string `json:"id"`
Name string `json:"name"`
State LocalModelState `json:"state"`
APICount int64 `json:"api_count"`
UpdateTime auto.TimeLabel `json:"update_time"`
CanDelete bool `json:"can_delete"`
Id string `json:"id"`
Name string `json:"name"`
State LocalModelState `json:"state"`
APICount int64 `json:"api_count"`
Provider string `json:"provider"`
UpdateTime auto.TimeLabel `json:"update_time"`
CanDelete bool `json:"can_delete"`
}
type LocalModelPackageItem struct {
+1
View File
@@ -96,6 +96,7 @@ func (i *imlLocalModel) Search(ctx context.Context, keyword string) ([]*ai_local
APICount: apiCountMap[s.Id],
CanDelete: true,
UpdateTime: auto.TimeLabel(s.UpdateAt),
Provider: "ollama",
}
}), nil
}