|
|
@@ -7,6 +7,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/timeutil" |
|
|
|
"xorm.io/builder" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
type AiModelManage struct { |
|
|
@@ -87,11 +88,10 @@ func DeleteModelById(id string) error { |
|
|
|
} |
|
|
|
|
|
|
|
func ModifyModelDescription(id string, description string) error { |
|
|
|
sess := x.NewSession() |
|
|
|
var sess *xorm.Session |
|
|
|
sess = x.ID(id) |
|
|
|
defer sess.Close() |
|
|
|
|
|
|
|
re, err := sess.Update(&AiModelManage{ |
|
|
|
ID: id, |
|
|
|
re, err := sess.Cols("description").Update(&AiModelManage{ |
|
|
|
Description: description, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|