(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader)
| 607 | } |
| 608 | |
| 609 | func (a *Adaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader) (any, error) { |
| 610 | if info.RelayMode == relayconstant.RelayModeAudioTranscription || |
| 611 | info.RelayMode == relayconstant.RelayModeAudioTranslation || |
| 612 | (info.RelayMode == relayconstant.RelayModeImagesEdits && !isJSONRequest(c)) { |
| 613 | return channel.DoFormRequest(a, c, info, requestBody) |
| 614 | } else if info.RelayMode == relayconstant.RelayModeRealtime { |
| 615 | return channel.DoWssRequest(a, c, info, requestBody) |
| 616 | } else { |
| 617 | return channel.DoApiRequest(a, c, info, requestBody) |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (usage any, err *types.NewAPIError) { |
| 622 | switch info.RelayMode { |
nothing calls this directly
no test coverage detected