连接池,redis,和配置文件

This commit is contained in:
Cold
2025-12-09 09:20:44 +08:00
committed by 张斌
parent 4b2b5e6177
commit 87b3ac9878
6 changed files with 149 additions and 148 deletions

View File

@@ -5,6 +5,7 @@ import (
"net/http"
"net/url"
"strings"
"time"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/errors/gerror"
@@ -34,6 +35,7 @@ func init() {
httpClient := gclient.New()
httpClient.SetHeader("Authorization", "Bearer "+apiKey)
httpClient.SetHeader("Content-Type", "application/json")
httpClient.SetTimeout(60 * time.Second) // RAGFlow AI 推理需要较长时间
globalClient = &Client{
BaseURL: strings.TrimSuffix(baseURL, "/"),