-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: fix Image prompt template hardcoded template format #27495
core: fix Image prompt template hardcoded template format #27495
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good -- thanks for your contribution!
Fixes #27411 **Description:** Adds `template_format` to the `ImagePromptTemplate` class and updates passing in the `template_format` parameter from ChatPromptTemplate instead of the hardcoded "f-string". Also updated docs and typing related to `template_format` to be more up-to-date and specific. **Dependencies:** None **Add tests and docs**: Added unit tests to validate fix. Needed to update `test_chat` snapshot due to adding new attribute `template_format` in `ImagePromptTemplate`. --------- Co-authored-by: Vadym Barda <[email protected]>
@@ -1 +1,2 @@ | |||
jinja2>=3,<4 | |||
mustache>=0.1.4,<1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this added? we vendor the implementation of mustache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing here #27629
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i added this because extended tests were failing for me https://github.com/langchain-ai/langchain/actions/runs/11448833821/job/31853195056
Fixes #27411
Description: Adds
template_format
to theImagePromptTemplate
class and updates passing in thetemplate_format
parameter from ChatPromptTemplate instead of the hardcoded "f-string".Also updated docs and typing related to
template_format
to be more up-to-date and specific.Dependencies: None
Add tests and docs: Added unit tests to validate fix. Needed to update
test_chat
snapshot due to adding new attributetemplate_format
inImagePromptTemplate
.