Merge pull request #1020 from QuantumNous/v1responses

feat: support /v1/responses API
This commit is contained in:
Calcium-Ion
2025-05-04 17:13:39 +08:00
committed by GitHub
35 changed files with 597 additions and 27 deletions

View File

@@ -4,7 +4,6 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/gin-gonic/gin"
"io"
"net/http"
"one-api/dto"
@@ -15,6 +14,8 @@ import (
"one-api/setting/model_setting"
relaycommon "one-api/relay/common"
"strings"
"github.com/gin-gonic/gin"
)
const (
@@ -174,6 +175,11 @@ func (a *Adaptor) ConvertEmbeddingRequest(c *gin.Context, info *relaycommon.Rela
return nil, errors.New("not implemented")
}
func (a *Adaptor) ConvertOpenAIResponsesRequest(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest) (any, error) {
// TODO implement me
return nil, errors.New("not implemented")
}
func (a *Adaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader) (any, error) {
return channel.DoApiRequest(a, c, info, requestBody)
}