From c4caea5be8c4e82c2e77565703d2ae7048167247 Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Fri, 25 Apr 2025 17:03:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E6=B7=BB=E5=8A=A0AI=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E8=B5=84=E8=AE=AF=E6=80=BB=E7=BB=93=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在市场组件中增加 AI 总结按钮和模态框 - 实现 SummaryStockNews 函数用于获取 AI 总结 - 添加 GetNewsList 方法获取市场新闻列表 - 优化市场资讯的展示和交互 --- backend/data/openai_api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/data/openai_api.go b/backend/data/openai_api.go index 1b24cc0..56529c2 100644 --- a/backend/data/openai_api.go +++ b/backend/data/openai_api.go @@ -564,7 +564,7 @@ func AskAi(o OpenAi, err error, messages []map[string]interface{}, ch chan map[s } return } - location, _ := time.LoadLocation("Asia/Shanghai") + //location, _ := time.LoadLocation("Asia/Shanghai") scanner := bufio.NewScanner(body) for scanner.Scan() { @@ -598,7 +598,7 @@ func AskAi(o OpenAi, err error, messages []map[string]interface{}, ch chan map[s "chatId": streamResponse.Id, "model": streamResponse.Model, "content": content, - "time": time.Now().In(location).Format(time.DateTime), + "time": time.Now().Format(time.DateTime), } //logger.SugaredLogger.Infof("Content data: %s", content) @@ -611,7 +611,7 @@ func AskAi(o OpenAi, err error, messages []map[string]interface{}, ch chan map[s "chatId": streamResponse.Id, "model": streamResponse.Model, "content": reasoningContent, - "time": time.Now().In(location).Format(time.DateTime), + "time": time.Now().Format(time.DateTime), } //logger.SugaredLogger.Infof("ReasoningContent data: %s", reasoningContent)