feat(provider): 模型目录 - 合并 PR #251 服务商发现插件
This commit is contained in:
commit
0ac7e2a2bb
8 files changed
+963
No files matched your search
@@ -104,6 +104,12 @@ type ChannelModelCatalogOption struct {
|
||||
}
|
||||
|
||||
func (s *Service) FetchChannelModelCatalog(ctx context.Context, actor *model.User, input ChannelModelsRequest) ([]ChannelModelCatalogItem, error) {
|
||||
// 功能开关:如果启用插件机制,使用新实现
|
||||
if s.isPluginEnabled() {
|
||||
return s.FetchChannelModelCatalogWithPlugin(ctx, actor, input)
|
||||
}
|
||||
|
||||
// 否则使用原有实现(向后兼容)
|
||||
if actor == nil || strings.TrimSpace(actor.ID) == "" {
|
||||
return nil, Unauthorized("请先登录")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user