From 04f7d89399c71e731788ccdee18e7b39c4f3b0a4 Mon Sep 17 00:00:00 2001 From: liusanp Date: Wed, 7 May 2025 18:32:59 +0800 Subject: [PATCH] fix: xAi requestUrl --- relay/channel/xai/adaptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/channel/xai/adaptor.go b/relay/channel/xai/adaptor.go index 18c734ee..21eed20c 100644 --- a/relay/channel/xai/adaptor.go +++ b/relay/channel/xai/adaptor.go @@ -41,7 +41,7 @@ func (a *Adaptor) Init(info *relaycommon.RelayInfo) { } func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { - return fmt.Sprintf("%s/v1/chat/completions", info.BaseUrl), nil + return relaycommon.GetFullRequestURL(info.BaseUrl, info.RequestURLPath, info.ChannelType), nil } func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error {