one-api/middleware
Laisky.Cai ddd2dd1041 fix: Refactor relay/channel, upgrade deps, improve request handling and error messages.
* Updated relay/channel/gemini package to use gin-gonic/gin for routing
* Added timeouts, environment variable for proxy, and error handling for HTTP clients in relay/util/init.go
* Improved error handling, URL path cases, and channel selection logic in middleware/distributor.go
* Added Content-Type header, closed request bodies, and added context to requests in relay/channel/common.go
* Upgraded various dependencies in go.mod
* Modified the GetRequestURL method in relay/channel/gemini/adaptor.go to include a "key" parameter in the URL and set a default version of "v1beta"
* Added io and net/http packages in relay/channel/gemini/adaptor.go and relay/channel/gemini/main.go
* Added a struct for GeminiStreamResp and modified response handling in relay/channel/gemini/main.go
* Imported packages for io and net/http added, gin-gonic/gin package added, and error handling improved in relay/channel/gemini/main.go
2024-03-19 03:11:19 +00:00
..
auth.go Merge remote-tracking branch 'origin/upstream/main' 2024-03-11 09:32:11 +00:00
cache.go fix: add no-cache for index.html 2023-05-22 00:54:53 +08:00
cors.go fix: cors allow all headers 2023-06-20 22:04:01 +08:00
distributor.go fix: Refactor relay/channel, upgrade deps, improve request handling and error messages. 2024-03-19 03:11:19 +00:00
logger.go chore: update module name 2024-01-28 19:38:58 +08:00
rate-limit.go chore: update module name 2024-01-28 19:38:58 +08:00
recover.go chore: add more info for panic fix 2024-03-10 23:59:35 +08:00
request-id.go feat: support ollama now (close #870) 2024-03-14 01:02:47 +08:00
turnstile-check.go chore: update module name 2024-01-28 19:38:58 +08:00
utils.go chore: update module name 2024-01-28 19:38:58 +08:00