fix: 优化负利润分析和缓存处理逻辑
This commit is contained in:
parent
de6783c66e
commit
bb1cfed160
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/ollama/ollama/api"
|
"github.com/ollama/ollama/api"
|
||||||
)
|
)
|
||||||
|
|
@ -48,6 +49,7 @@ func (c *Client) ToolSelect(ctx context.Context, messages []api.Message, tools [
|
||||||
Stream: new(bool), // 设置为false,不使用流式响应
|
Stream: new(bool), // 设置为false,不使用流式响应
|
||||||
Think: &api.ThinkValue{Value: false},
|
Think: &api.ThinkValue{Value: false},
|
||||||
Tools: tools,
|
Tools: tools,
|
||||||
|
KeepAlive: &api.Duration{Duration: 24 * time.Hour},
|
||||||
}
|
}
|
||||||
err = c.client.Chat(ctx, req, func(resp api.ChatResponse) error {
|
err = c.client.Chat(ctx, req, func(resp api.ChatResponse) error {
|
||||||
res = resp
|
res = resp
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue