map预分配容量避免动态扩容,优化了返回值复用情况

This commit is contained in:
Cold
2025-12-06 10:13:38 +08:00
committed by 张斌
parent 15ce1cf345
commit 86661c687a
3 changed files with 52 additions and 10 deletions

View File

@@ -50,8 +50,7 @@ func loadConfig(ctx context.Context) (baseURL, apiKey string) {
// 使用 GoFrame 全局配置(从项目的 config.yml 读取)
baseURL = g.Cfg().MustGet(ctx, "ragflow.base_url", "").String()
apiKey = g.Cfg().MustGet(ctx, "ragflow.api_key", "").String()
return baseURL, apiKey
return
}
// GetGlobalClient 获取全局客户端