Explorar el Código

Merge pull request #1919 from seefs001/fix/submodel

fix : fix submodel adapter
Seefs hace 3 meses
padre
commit
25a3896e5c
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      relay/channel/submodel/adaptor.go

+ 5 - 1
relay/channel/submodel/adaptor.go

@@ -16,6 +16,10 @@ import (
 type Adaptor struct {
 }
 
+func (a *Adaptor) ConvertGeminiRequest(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest) (any, error) {
+	return nil, errors.New("submodel channel: endpoint not supported")
+}
+
 func (a *Adaptor) ConvertClaudeRequest(*gin.Context, *relaycommon.RelayInfo, *dto.ClaudeRequest) (any, error) {
 	return nil, errors.New("submodel channel: endpoint not supported")
 }
@@ -32,7 +36,7 @@ func (a *Adaptor) Init(info *relaycommon.RelayInfo) {
 }
 
 func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
-	return relaycommon.GetFullRequestURL(info.BaseUrl, info.RequestURLPath, info.ChannelType), nil
+	return relaycommon.GetFullRequestURL(info.ChannelBaseUrl, info.RequestURLPath, info.ChannelType), nil
 }
 
 func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error {