Skip to content

Commit

Permalink
feat: update log search
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Jul 19, 2024
1 parent 9ef3212 commit 12da7f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func GetAllLogs(logType int, startTimestamp int64, endTimestamp int64, modelName
tx = DB.Where("type = ?", logType)
}
if modelName != "" {
tx = tx.Where("model_name = ?", modelName)
tx = tx.Where("model_name like ?", "%"+modelName+"%")
}
if username != "" {
tx = tx.Where("username = ?", username)
Expand Down

2 comments on commit 12da7f6

@liuzhiguo630
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个改动为什么要合并进去,这样会导致搜索出来的模型名混乱,比如搜索 gpt-4,结果出来是 gpt-4* 所有模型,但是我只想检索 gpt-4 模型的使用情况。如果要支持模糊搜索,可以使用 gpt-4% 这种名字来搜,不要破坏原本的精确搜索 @Calcium-Ion

@Calcium-Ion
Copy link
Owner Author

@Calcium-Ion Calcium-Ion commented on 12da7f6 Jul 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您可以fork一份,然后按自己的需求修改代码,或者您有更好的建议,可以提交pr

Please sign in to comment.