Skip to content
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

Class ChatPromptTemplate > def from_messages > template_format bug #23929

Closed
5 tasks done
AkyLim opened this issue Jul 6, 2024 · 0 comments · Fixed by #24144
Closed
5 tasks done

Class ChatPromptTemplate > def from_messages > template_format bug #23929

AkyLim opened this issue Jul 6, 2024 · 0 comments · Fixed by #24144
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@AkyLim
Copy link

AkyLim commented Jul 6, 2024

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

    template = ChatPromptTemplate.from_messages(
        messages= messages,
        template_format= "jinja2"
    )

Error Message and Stack Trace (if applicable)

Warning: Literal type does not include "jinja2".

Description

The from_messages method has a type error for the template_format parameter. When setting template_format to "jinja2", a warning is displayed even though "jinja2" works without any problem. It seems that "jinja2" is implemented internally, so the type definition should be modified to include it.

System Info

python-versions = "^3.11"

@dosubot dosubot bot added the 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant