
















package main
import (
"context"
"time"
"github.com/zarldev/zarlmono/zkit/agent/runner"
"github.com/zarldev/zarlmono/zkit/ai/llm/anthropic"
)
func main() {
provider, _ := anthropic.NewProvider(apiKey)
r := runner.New(runner.ClientFromProvider(provider),
runner.WithPromptText("You are a helpful coding assistant."),
runner.WithMaxIterations(20),
runner.WithToolTimeout(60*time.Second),
)
_, _ = r.Run(context.Background(), runner.TaskSpec{
Prompt: "Refactor the auth package to use context everywhere.",
})
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。