mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
- 在 App.vue 中添加行业研究选项 - 在 market.vue 中实现行业研究页面布局 - 新增 IndustryResearchReportList 组件用于显示行业研究列表 - 在 app_common.go 中添加相关 API 接口 - 在 market_news_api.go 中实现行业研究数据获取逻辑 - 更新 README.md,添加行业研究功能说明
33 lines
638 B
Go
33 lines
638 B
Go
package data
|
|
|
|
import (
|
|
"context"
|
|
"go-stock/backend/db"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewDeepSeekOpenAiConfig(t *testing.T) {
|
|
db.Init("../../data/stock.db")
|
|
ai := NewDeepSeekOpenAi(context.TODO())
|
|
res := ai.NewChatStream("长电科技", "sh600584", "长电科技分析和总结", nil)
|
|
for {
|
|
select {
|
|
case msg := <-res:
|
|
t.Log(msg)
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestGetTopNewsList(t *testing.T) {
|
|
news := GetTopNewsList(30)
|
|
t.Log(news)
|
|
}
|
|
|
|
func TestSearchGuShiTongStockInfo(t *testing.T) {
|
|
db.Init("../../data/stock.db")
|
|
SearchGuShiTongStockInfo("hk01810", 60)
|
|
SearchGuShiTongStockInfo("sh600745", 60)
|
|
SearchGuShiTongStockInfo("gb_goog", 60)
|
|
|
|
}
|