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

Adds context and history support to Dotprompt. Fixes #418 #421

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

mbleigh
Copy link
Collaborator

@mbleigh mbleigh commented Jun 15, 2024

This adds a few new features to Dotprompt:

  1. History is now supported in myPrompt.generate(). It is inserted just before the last user message generated by the prompt by default, or wherever the {{history}} helper is provided if it is provided.
  2. The {{section "output|context"}} helper now works, allowing you to control where in the flow of your prompt output instructions or document context are injected into the prompt.

Copy link
Contributor

@maxl0rd maxl0rd left a comment

Choose a reason for hiding this comment

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

This approach looks good to me.
The build error seems unrelated.
Should documentation be updated?

@mbleigh mbleigh merged commit 8fd188a into main Jun 20, 2024
4 checks passed
@mbleigh mbleigh deleted the dotprompt-ctx-history branch June 20, 2024 21:26
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.

3 participants