fix: fix channel test & clear response_time on test failed

This commit is contained in:
WqyJh
2023-11-30 11:56:25 +08:00
parent 0bcb91e5ef
commit 8ffc76084c
3 changed files with 14 additions and 8 deletions

View File

@@ -99,7 +99,7 @@ func (channel *Channel) GetBaseURL() string {
}
func (channel *Channel) GetModelMapping() (m map[string]string) {
if channel.ModelMapping == nil {
if channel.ModelMapping == nil || *channel.ModelMapping == "" {
return
}
err := json.Unmarshal([]byte(*channel.ModelMapping), &m)