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

[Py]Prompt Parsing and Rendering #69

Open
tanyasingh1902 opened this issue Feb 20, 2025 · 0 comments
Open

[Py]Prompt Parsing and Rendering #69

tanyasingh1902 opened this issue Feb 20, 2025 · 0 comments

Comments

@tanyasingh1902
Copy link
Collaborator

Implement parse method.
Parse a prompt template string into a ParsedPrompt object using the parseDocument function from the parse module.

Implement render method.
Take a prompt template, data, and options as input.
Call compile to get a rendering function.
Execute the rendering function and return the result.

Implement compile method.
Take a prompt template (string or ParsedPrompt) and optional metadata.
Resolve partials.
Compile the Handlebars template.
Create and return a rendering function that fills in variables and applies transformations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant