修复获取模型消息数量,统计数据
This commit is contained in:
parent
7b55f41f90
commit
1004f59db0
|
|
@ -63,7 +63,12 @@ func GetAIStreamModelMsgCount() ([]AIStreamMsgModelIDCount, error) {
|
||||||
//获取模型名称
|
//获取模型名称
|
||||||
for i, _ := range aiStreamMsgModelIDCounts {
|
for i, _ := range aiStreamMsgModelIDCounts {
|
||||||
modelName := FindModelByIDV2(int(aiStreamMsgModelIDCounts[i].ModelID))
|
modelName := FindModelByIDV2(int(aiStreamMsgModelIDCounts[i].ModelID))
|
||||||
|
if modelName == nil || len(modelName) == 0 {
|
||||||
|
aiStreamMsgModelIDCounts[i].ModelName = "未知模型"
|
||||||
|
} else {
|
||||||
aiStreamMsgModelIDCounts[i].ModelName = modelName[0].Description
|
aiStreamMsgModelIDCounts[i].ModelName = modelName[0].Description
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return aiStreamMsgModelIDCounts, nil
|
return aiStreamMsgModelIDCounts, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue