feat: 请求日志添加模型字段 (#113)

* feat: 请求日志添加模型字段

* fix: 调整gemini判断模型顺序
This commit is contained in:
tbphp
2025-08-03 12:29:18 +08:00
committed by GitHub
parent 2d9a7859aa
commit 2be2ea697e
9 changed files with 115 additions and 40 deletions

View File

@@ -45,6 +45,9 @@ func logFiltersScope(c *gin.Context) func(db *gorm.DB) *gorm.DB {
}
db = db.Where("key_value LIKE ?", likePattern)
}
if model := c.Query("model"); model != "" {
db = db.Where("model LIKE ?", "%"+model+"%")
}
if isSuccessStr := c.Query("is_success"); isSuccessStr != "" {
if isSuccess, err := strconv.ParseBool(isSuccessStr); err == nil {
db = db.Where("is_success = ?", isSuccess)