Skip to content

core[patch]: update dict prompt template #30967

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

Merged
merged 5 commits into from
Apr 23, 2025
Merged

Conversation

baskaryan
Copy link
Collaborator

Align with JS changes made in langchain-ai/langchainjs#8043

Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2025 9:18pm

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 22, 2025
@baskaryan baskaryan requested a review from ccurme April 22, 2025 19:55
from langchain_core.runnables.config import ensure_config


class DictPromptTemplate(RunnableSerializable[dict, dict]):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: no longer inherits from BaseMessagePromptTemplate since thats not really how its used

Copy link
Collaborator

Choose a reason for hiding this comment

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

in a future minor release, if we want to use this template for all messages (as was done originally in #25674), would it be easier to keep that around?

I also sympathize for reducing complexity and just implementing when we need it, though.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 22, 2025
Copy link
Collaborator Author

@baskaryan baskaryan Apr 22, 2025

Choose a reason for hiding this comment

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

afaict this was just never deleted after it was copied to core and isn't needed anymore?

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

This should close #26701

from langchain_core.runnables.config import ensure_config


class DictPromptTemplate(RunnableSerializable[dict, dict]):
Copy link
Collaborator

Choose a reason for hiding this comment

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

in a future minor release, if we want to use this template for all messages (as was done originally in #25674), would it be easier to keep that around?

I also sympathize for reducing complexity and just implementing when we need it, though.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Apr 23, 2025
@baskaryan baskaryan merged commit d4fc734 into master Apr 23, 2025
73 checks passed
@baskaryan baskaryan deleted the bagatur/update_dict_prompt branch April 23, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants