-
Notifications
You must be signed in to change notification settings - Fork 353
Closed
Labels
Description
It looks like prompt.Execute() does not support multi-message .prompt files in the Go SDK, despite documentation suggesting this is possible. I get this error parts template must produce only one message
when i try to execute a multi-message prompt.
To Reproduce
example.prompt file:
---
model: vertexai/gemini-2.0-flash
---
{{ role "system" }}
You are a great AI assistant.
{{ role "user" }}
Say hi
Go code:
p := genkit.LookupPrompt(g, "example")
resp, err := p.Execute(ctx, nil)
if err != nil {
log.Fatal(err)
}
Expected behavior
Both messages should be sent to the model in sequence (system + user).
Runtime (please complete the following information):
• OS: macOS with ARM64
• Version: 15.5
Go version
go1.24.4
If someone could help me out with a workaround or fix that would be 🔥
sentrizsentriz
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done