This commit is contained in:
Cold
2026-01-08 15:55:44 +08:00
committed by 张斌
parent 3b9f612542
commit 865cae5e9a
2 changed files with 14 additions and 46 deletions

View File

@@ -9,6 +9,7 @@ import (
"mime/multipart"
"strings"
commonHttp "gitee.com/red-future---jilin-g/common/http"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
)
@@ -185,7 +186,7 @@ func (c *Client) UploadDocumentFromText(ctx context.Context, datasetId, content,
}
// 发送请求
client := c.HTTPClient.Clone()
client := commonHttp.Httpclient.Clone()
client.SetHeader("Authorization", "Bearer "+c.APIKey)
client.SetHeader("Content-Type", writer.FormDataContentType())