You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
dosubotbot
added
Ɑ: core
Related to langchain-core
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
labels
Oct 17, 2024
That is another way of demonstrating the problem. By removing the braces and spaces, you turned the prompt template into f-string format (rather than jinja2), but despite specifying template_format='jinja2', the template is parsed as f-strings. This behavior is incorrect.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
The above code outputs:
Rather than the expected output:
It looks like the template_format parameter is not being respected here ("f-string" is hard-coded):
langchain/libs/core/langchain_core/prompts/chat.py
Line 556 in 0ebddab
Also, ImagePromptTemplate seems to be using string.format():
langchain/libs/core/langchain_core/prompts/image.py
Line 88 in 0ebddab
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: