feat: support cloudflare worker ai

This commit is contained in:
CalciumIon committed 2024-07-13 19:55:22 +08:00
1 parent 1086340e14
commit fe4665fd99
15 files changed
+296 -28

No files matched your search

+5
View File
@@ -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)
}