mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-26 09:45:59 +08:00
Merge commit '1c2654320e5b6268b13b6efca40ce37a523d032b'
This commit is contained in:
@@ -10,7 +10,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/Laisky/one-api/common/random"
|
||||
"github.com/songquanpeng/one-api/common/random"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func OpenBrowser(url string) {
|
||||
@@ -106,6 +107,11 @@ func GenRequestID() string {
|
||||
return GetTimeString() + random.GetRandomNumberString(8)
|
||||
}
|
||||
|
||||
func GetResponseID(c *gin.Context) string {
|
||||
logID := c.GetString(RequestIdKey)
|
||||
return fmt.Sprintf("chatcmpl-%s", logID)
|
||||
}
|
||||
|
||||
func Max(a int, b int) int {
|
||||
if a >= b {
|
||||
return a
|
||||
|
||||
Reference in New Issue
Block a user