Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@josearomeroj
Copy link
Contributor

Fixed Genkit's prompt load to respect role definitions from dotprompt files instead of forcing all messages to use the "user" role.

#3711

Checklist (if applicable):

@google-cla
Copy link

google-cla bot commented Nov 9, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@josearomeroj josearomeroj force-pushed the fix_load_role_dotprompt_parts branch from b19d47f to ea17dd1 Compare November 9, 2025 17:50
@hugoaguirre hugoaguirre linked an issue Nov 11, 2025 that may be closed by this pull request
Copy link
Contributor

@hugoaguirre hugoaguirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Overall, LGTM 👍🏽

@hugoaguirre hugoaguirre merged commit be12117 into firebase:main Nov 13, 2025
6 checks passed
@eric642
Copy link
Contributor

eric642 commented Nov 21, 2025

@hugoaguirre @rutujaD1999 @apascal07 My actual verification did not solve this problem, and this submission introduced a new bug. The modified code has caused the shared variable to behave in such a way that when multiple threads access the same prompt simultaneously, the message remains unchanged indefinitely.

if len(nonSystemMessages) > 0 {
	promptOpts = append(promptOpts, WithMessages(nonSystemMessages...))
} 

@apascal07
Copy link
Collaborator

@rutujaD1999 please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Go] Genkit ignores dotprompt-defined roles

5 participants