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

Improving dotprompt plugin #231

Merged
merged 2 commits into from
May 23, 2024
Merged

Improving dotprompt plugin #231

merged 2 commits into from
May 23, 2024

Conversation

maxl0rd
Copy link
Contributor

@maxl0rd maxl0rd commented May 23, 2024

Addresses friction with defineDotprompt and ESM modules.

  • Use of defineDotprompt() no longer requires installing the plugin
  • The plugin still needs to be installed to load prompt files
  • Validated compatibility with projects built as ESM modules

- defineDotprompt() no longer requires plugin loading
- plugin still needs to be loaded for prompt files
- new registry path for code-defined prompts
- validated compatibility with esm modules
@@ -2,7 +2,7 @@
"name": "menu",
"version": "1.0.0",
"description": "A Genkit test app for understanding a restaurant menu",
"main": "lib/index.js",
"main": "./lib/src/index.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly because we are importing some json modules, it creates lib/data and lib/src.

@maxl0rd maxl0rd merged commit 952b305 into main May 23, 2024
4 checks passed
@maxl0rd maxl0rd deleted the ml_dotprompt_esm branch May 23, 2024 16:57
ianlancetaylor added a commit that referenced this pull request May 28, 2024
ianlancetaylor added a commit that referenced this pull request May 28, 2024
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.

2 participants