mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix(llm): add community-registry api (#24131)
This commit is contained in:
@@ -22,4 +22,5 @@ func init() {
|
||||
cmd.Perform("public", new(commonoptions.BasePublicOptions))
|
||||
cmd.Perform("private", new(commonoptions.BaseIdOptions))
|
||||
cmd.PerformClass("import", new(options.LLMInstantModelImportOptions))
|
||||
cmd.GetProperty(new(options.LLMInstantModelCommunityRegistryOptions))
|
||||
}
|
||||
|
||||
@@ -962,3 +962,7 @@ func (model *SInstantModel) CleanupImportTmpDir(ctx context.Context, userCred mc
|
||||
func (man *SInstantModelManager) GetOllamaRegistryYAML() string {
|
||||
return apis.OLLAMA_REGISTRY_YAML
|
||||
}
|
||||
|
||||
func (man *SInstantModelManager) GetPropertyCommunityRegistry(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
return jsonutils.Marshal(apis.OllamaRegistry), nil
|
||||
}
|
||||
|
||||
@@ -76,3 +76,14 @@ func (o *LLMInstantModelImportOptions) Params() (jsonutils.JSONObject, error) {
|
||||
}
|
||||
return jsonutils.Marshal(input), nil
|
||||
}
|
||||
|
||||
type LLMInstantModelCommunityRegistryOptions struct {
|
||||
}
|
||||
|
||||
func (o *LLMInstantModelCommunityRegistryOptions) Params() (jsonutils.JSONObject, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (o *LLMInstantModelCommunityRegistryOptions) Property() string {
|
||||
return "community-registry"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user