-
Notifications
You must be signed in to change notification settings - Fork 375
Open
Labels
Description
Describe the bug
There is no list of tools after loading the prompt。
To Reproduce
func Run1(ctx context.Context, query string) (string, error) {
g := genkit.Init(
ctx,
genkit.WithPlugins(&anthropic.Anthropic{}),
genkit.WithDefaultModel("claude-4-opus-20250514"),
genkit.WithPromptDir(aicommon.WorkDirWith("prompts")),
)
prompt := genkit.LookupPrompt(g, "ex")
if prompt == nil {
return "", fmt.Errorf("lookup prompt failed")
}
ac, err := prompt.Render(ctx, map[string]any{
"date": time.Now().Format(time.DateTime),
"question": query,
"location": "chian",
})
if err != nil {
return "", err
}
// ac.Tools is nil
log.Info().Any("ac", ac).Msg("render")
return "", nil
}
The content of my prompt file
---
system: "Answer questions using the tools you have."
tools:
- getWeather
input:
schema:
location: string
---
What is the weather in {{location}}?
Runtime (please complete the following information):
- OS: [e.g. Linux, MacOS]
- Version [e.g. 22]
** Go version
go version
go version go1.24.6 darwin/arm64
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status