From 10f852803a4c836eb7addc3c2413e4e25c8e692d Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Sat, 15 Feb 2025 17:59:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=A8=A1=E5=9E=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9Eprovider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/ai-local/dto/output.go | 14 +++++++------- module/ai-local/iml.go | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/module/ai-local/dto/output.go b/module/ai-local/dto/output.go index 58c224b3..74cc946a 100644 --- a/module/ai-local/dto/output.go +++ b/module/ai-local/dto/output.go @@ -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 { diff --git a/module/ai-local/iml.go b/module/ai-local/iml.go index f50483b7..8380a2f3 100644 --- a/module/ai-local/iml.go +++ b/module/ai-local/iml.go @@ -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 }