one-api/common
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
..
blacklist fix: add user to blacklist when it's banned or deleted, and make deletion soft (close #473, close #791) 2024-03-10 15:56:19 +08:00
config Merge remote-tracking branch 'origin/upstream/main' 2024-03-18 01:31:21 +00:00
env fix: fix baidu system prompt (close #1079) 2024-03-13 22:56:54 +08:00
helper feat: support ollama now (close #870) 2024-03-14 01:02:47 +08:00
image Merge remote-tracking branch 'origin/upstream/main' 2024-01-28 13:44:16 +00:00
logger feat: support ollama now (close #870) 2024-03-14 01:02:47 +08:00
message fix: Upgrade error handling to errors/v2 package and refactor error messages. 2024-03-12 06:43:54 +00:00
constants.go feat: support lingyiwanwu 2024-03-14 23:11:36 +08:00
crypto.go Initial commit 2023-04-22 20:39:27 +08:00
custom-event.go refactor: rename file to conform to standards 2023-05-13 15:43:55 +08:00
database.go fix: fix baidu system prompt (close #1079) 2024-03-13 22:56:54 +08:00
embed-file-system.go feat: Handle errors, validate model names, and calculate quota usage (#978) 2024-02-12 21:35:40 +08:00
gin.go fix: Refactor relay/channel, upgrade deps, improve request handling and error messages. 2024-03-19 03:11:19 +00:00
group-ratio.go chore: update module name 2024-01-28 19:38:58 +08:00
init.go Merge remote-tracking branch 'origin/upstream/main' 2024-01-28 13:44:16 +00:00
model-ratio.go Merge remote-tracking branch 'origin/upstream/main' 2024-03-18 01:31:21 +00:00
random.go feat: switch priority when retry (close #1048) 2024-03-03 22:14:07 +08:00
rate-limit.go Initial commit 2023-04-22 20:39:27 +08:00
redis.go chore: update module name 2024-01-28 19:38:58 +08:00
utils.go fix: make quota int64 2024-03-13 20:00:51 +08:00
validate.go Initial commit 2023-04-22 20:39:27 +08:00
verification.go Initial commit 2023-04-22 20:39:27 +08:00