diff --git a/relay/common/relay_info.go b/relay/common/relay_info.go index fa87dc24..a07ec316 100644 --- a/relay/common/relay_info.go +++ b/relay/common/relay_info.go @@ -6,7 +6,6 @@ import ( "one-api/dto" relayconstant "one-api/relay/constant" "strings" - "sync" "time" "github.com/gin-gonic/gin" @@ -55,7 +54,6 @@ type RelayInfo struct { StartTime time.Time FirstResponseTime time.Time isFirstResponse bool - responseMutex sync.Mutex // Add mutex for protecting concurrent access //SendLastReasoningResponse bool ApiType int IsStream bool @@ -214,9 +212,6 @@ func (info *RelayInfo) SetIsStream(isStream bool) { } func (info *RelayInfo) SetFirstResponseTime() { - info.responseMutex.Lock() - defer info.responseMutex.Unlock() - if info.isFirstResponse { info.FirstResponseTime = time.Now() info.isFirstResponse = false