ai-gateway/controller
igophper 9ba5388367
feat: refactor response parsing logic to support multiple formats (#782)
* feat: Refactor response parsing logic to support multiple formats

The parsing logic for responses in relay.go and relay-audio.go was refactored to support multiple response formats - 'json', 'text', 'srt', 'verbose_json', and 'vtt'. The existing `WhisperResponse` struct was renamed to `WhisperJsonResponse` and a new struct `WhisperVerboseJsonResponse` was added to support the 'verbose_json' format. Additional parsing functions were added to extract text from these new response types. This change was necessary to make the parsing logic more flexible and extendable for different types of responses.

* chore: update name

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-12-10 18:39:14 +08:00
..
billing.go chore: update error code 2023-09-17 11:30:20 +08:00
channel-billing.go fix: fix unable to set zero value for base url & model mapping 2023-09-18 22:07:17 +08:00
channel-test.go feat: enable channel when test succeed (#771) 2023-12-03 20:10:57 +08:00
channel.go feat: able to delete all disabled channels 2023-10-14 17:25:48 +08:00
github.go fix: fix oauth2 state not checking 2023-09-15 00:24:20 +08:00
group.go feat: able to set group ratio now (close #62, close #142) 2023-06-11 11:08:16 +08:00
log.go feat: supprt channel priority now & record channel id in log (#484) 2023-09-17 19:18:16 +08:00
misc.go feat: support email domain whitelist (#337) 2023-07-30 12:44:41 +08:00
model.go feat: support claude-2.x (close #736) 2023-11-24 21:39:44 +08:00
option.go feat: support Tencent's model (close #519) 2023-10-03 14:19:03 +08:00
redemption.go feat: now user can top up via redemption code (close #9) 2023-04-26 17:02:26 +08:00
relay-aiproxy.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-ali.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-audio.go feat: refactor response parsing logic to support multiple formats (#782) 2023-12-10 18:39:14 +08:00
relay-baidu.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-claude.go feat: support claude-2.x (close #736) 2023-11-24 21:39:44 +08:00
relay-image.go feat: support dalle for Azure (#754) 2023-12-03 17:34:59 +08:00
relay-openai.go refactor: remove consumeQuota related logic (#738) 2023-11-24 20:42:29 +08:00
relay-palm.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-tencent.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-text.go feat: support plugin for ali channel (close #797) 2023-12-10 17:22:52 +08:00
relay-utils.go feat: enable channel when test succeed (#771) 2023-12-03 20:10:57 +08:00
relay-xunfei.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay-zhipu.go feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
relay.go feat: refactor response parsing logic to support multiple formats (#782) 2023-12-10 18:39:14 +08:00
token.go fix: fix token name too long 2023-08-12 16:58:29 +08:00
user.go feat: able to delete account by self (#294) 2023-07-23 13:37:32 +08:00
wechat.go feat: support aff now (close #75) 2023-06-17 18:12:58 +08:00