mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-13 09:33:43 +08:00
feat: support cloudflare worker ai
This commit is contained in:
@@ -35,3 +35,8 @@ func ObjectData(c *gin.Context, object interface{}) error {
|
||||
func Done(c *gin.Context) {
|
||||
StringData(c, "[DONE]")
|
||||
}
|
||||
|
||||
func GetResponseID(c *gin.Context) string {
|
||||
logID := c.GetString("X-Oneapi-Request-Id")
|
||||
return fmt.Sprintf("chatcmpl-%s", logID)
|
||||
}
|
||||
Reference in New Issue
Block a user