fix: volcengine claude DoResponse
This commit is contained in:
@@ -341,6 +341,13 @@ func (a *Adaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, request
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (usage any, err *types.NewAPIError) {
|
func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (usage any, err *types.NewAPIError) {
|
||||||
|
if info.RelayFormat == types.RelayFormatClaude {
|
||||||
|
if info.IsStream {
|
||||||
|
return claude.ClaudeStreamHandler(c, resp, info, claude.RequestModeMessage)
|
||||||
|
}
|
||||||
|
return claude.ClaudeHandler(c, resp, info, claude.RequestModeMessage)
|
||||||
|
}
|
||||||
|
|
||||||
if info.RelayMode == constant.RelayModeAudioSpeech {
|
if info.RelayMode == constant.RelayModeAudioSpeech {
|
||||||
encoding := mapEncoding(c.GetString(contextKeyResponseFormat))
|
encoding := mapEncoding(c.GetString(contextKeyResponseFormat))
|
||||||
if info.IsStream {
|
if info.IsStream {
|
||||||
|
|||||||
Reference in New Issue
Block a user