map预分配容量避免动态扩容,优化了返回值复用情况
This commit is contained in:
@@ -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 获取全局客户端
|
||||
|
||||
Reference in New Issue
Block a user