DoRequest

This commit is contained in:
creamlike1024
2025-05-13 21:13:34 +08:00
parent b2cad22952
commit b2499b0a7e
3 changed files with 28 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *common.RelayInfo, r
if request == nil {
return nil, errors.New("request is nil")
}
return convertCozeChatRequest(*request), nil
return convertCozeChatRequest(c, *request), nil
}
// ConvertOpenAIResponsesRequest implements channel.Adaptor.
@@ -88,7 +88,7 @@ func (a *Adaptor) DoRequest(c *gin.Context, info *common.RelayInfo, requestBody
time.Sleep(time.Second * 1)
}
// 发送获取消息请求
return channel.DoApiRequest(a, c, info, requestBody)
return getChatDetail(a, c, info)
}
// DoResponse implements channel.Adaptor.
@@ -109,7 +109,7 @@ func (a *Adaptor) GetModelList() []string {
// GetRequestURL implements channel.Adaptor.
func (a *Adaptor) GetRequestURL(info *common.RelayInfo) (string, error) {
return fmt.Sprintf("%s/v3/chat/message/list", info.BaseUrl), nil
return fmt.Sprintf("%s/v3/chat", info.BaseUrl), nil
}
// Init implements channel.Adaptor.