feat: support ollama now (close #870)

This commit is contained in:
JustSong
2024-03-14 01:02:47 +08:00
parent 79d0cd378a
commit 2dcef85285
14 changed files with 313 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ import (
func RequestId() func(c *gin.Context) {
return func(c *gin.Context) {
id := helper.GetTimeString() + helper.GetRandomNumberString(8)
id := helper.GenRequestID()
c.Set(logger.RequestIdKey, id)
ctx := context.WithValue(c.Request.Context(), logger.RequestIdKey, id)
c.Request = c.Request.WithContext(ctx)