feat(xai): 为xAI渠道添加/v1/responses支持 (#2897)
* feat(xai): 为xAI渠道添加/v1/responses支持 * Add video generation model to constants * fix: 修正先前更改中对于grok-3-mini的思考预算和"-search"设计
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package xai
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -46,7 +45,7 @@ func xAIStreamHandler(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Re
|
||||
|
||||
helper.StreamScannerHandler(c, resp, info, func(data string) bool {
|
||||
var xAIResp *dto.ChatCompletionsStreamResponse
|
||||
err := json.Unmarshal([]byte(data), &xAIResp)
|
||||
err := common.UnmarshalJsonStr(data, &xAIResp)
|
||||
if err != nil {
|
||||
common.SysLog("error unmarshalling stream response: " + err.Error())
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user