-
Notifications
You must be signed in to change notification settings - Fork 623
Description
Describe the bug
When attempting to use partials within Genkit prompts, I am consistently encountering an error message: "the partial is already registered: additional_guidliness". This error appears to prevent the successful generation of descriptions or other outputs.
To Reproduce
Define a prompt that utilizes a partial, for example:
{{#if additional_guidelines}}
{{#each additional_guidelines}}
(† this))
{{/each}}
{{/if}}
Attempt to render the prompt, or trigger its execution in a way that would lead to description generation.
Expected behavior
The partials should be correctly processed, and the prompt should render without errors, allowing for the generation of the desired output.
Actual behavior:
An internal server error (Status: 500) occurs with the message: "Error generating description: the partial is already registered: additional_guidliness".
Runtime (please complete the following information):
- OS: Archlinux
- Version latest
** Go version
- go version go1.24.3 linux/amd64
Additional context
- This issue occurs when attempting to use partials, specifically additional_guidliness in the provided example.
- The error suggests that the partial additional_guidliness is being registered multiple times, leading to a conflict.
- According to the Genkit documentation/code (as referenced in the Discord discussion: https://github.com/firebase/genkit/blob/b4e1c7f8fa25c4677f7c7252ef958e10614ecc496/go/ai/prompt.go#L279-L291), DotPrompt.Compile() calls DotPrompt.RegisterPartials() which then calls DefinePartial(). This process should check if partials are already known. The error indicates this check might not be preventing re-registration or there's an issue with how partials are being defined or included in the prompt structure.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status


