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

fix: skip langchain prompt formatting for non-langfuse variables #682

Merged
merged 1 commit into from
May 14, 2024

Conversation

hassiebp
Copy link
Contributor

When users have Jinja2 templates in their prompts, these will also get transformed to langchain variables when calling get_langchain_prompt on the langfuse prompt. This PR fixes the behavior to only transform variables that are langfuse prompt variables (alphabetical characters or underscores).

@hassiebp hassiebp enabled auto-merge (squash) May 14, 2024 11:20
@hassiebp hassiebp force-pushed the hassieb/lfe-935-langchain-jinja2-support-in-prompts branch from 913f478 to 7e1ca62 Compare May 14, 2024 11:35
@hassiebp hassiebp merged commit 4d91426 into main May 14, 2024
11 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-935-langchain-jinja2-support-in-prompts branch May 14, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: prompts with JinJa2 templates get their format changed
2 participants