mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
- 新增 SearchStockPriceInfo 函数,用于查询股票价格信息 - 更新 NewChatStream 函数,增加股票代码参数- 在前端添加股票代码参数传递 - 优化后端接口测试用例
22 lines
317 B
Go
22 lines
317 B
Go
package data
|
|
|
|
import (
|
|
"go-stock/backend/db"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewDeepSeekOpenAiConfig(t *testing.T) {
|
|
db.Init("../../data/stock.db")
|
|
ai := NewDeepSeekOpenAi()
|
|
res := ai.NewChatStream("闻泰科技", "sh600745")
|
|
for {
|
|
select {
|
|
case msg := <-res:
|
|
if msg == "" {
|
|
return
|
|
}
|
|
t.Log(msg)
|
|
}
|
|
}
|
|
}
|