mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-02-11 17:04:30 +08:00
增加自动迁移数据表代码
This commit is contained in:
@@ -69,7 +69,7 @@ func (h *ChatModelHandler) Save(c *gin.Context) {
|
||||
item.Description = data.Description
|
||||
item.Category = data.Category
|
||||
item.Temperature = data.Temperature
|
||||
item.KeyId = data.KeyId
|
||||
item.KeyId = uint(data.KeyId)
|
||||
item.Type = data.Type
|
||||
item.Options = utils.JsonEncode(data.Options)
|
||||
var res *gorm.DB
|
||||
@@ -117,7 +117,7 @@ func (h *ChatModelHandler) List(c *gin.Context) {
|
||||
// initialize key name
|
||||
keyIds := make([]int, 0)
|
||||
for _, v := range items {
|
||||
keyIds = append(keyIds, v.KeyId)
|
||||
keyIds = append(keyIds, int(v.KeyId))
|
||||
}
|
||||
var keys []model.ApiKey
|
||||
keyMap := make(map[uint]string)
|
||||
|
||||
Reference in New Issue
Block a user