Skip to content

Conversation

jba
Copy link
Contributor

@jba jba commented May 20, 2024

Attempt to make the dotprompt API a little more user-friendly.

The main change is to replace the exported Frontmatter type
with a type (called Config) that is easier to write a literal for.

Miscellaneous other changes:

  • Unexport the Prompt.Hash field.

  • Add New to create a prompt without registering it,
    and use Define to mean create + register, as it does elsewhere.

  • Remove the generator as an argument; I believe it would only be
    used for tests.

Attempt to make the dotprompt API a little more user-friendly.

The main change is to replace the exported Frontmatter type
with a type (called Config) that is easier to write a literal for.

Miscellaneous other changes:

- Unexport the Prompt.Hash field.

- Add `New` to create a prompt without registering it,
  and use `Define` to mean create + register, as it does elsewhere.

- Remove the generator as an argument; I believe it would only be
  used for tests.
@jba jba requested review from randall77 and ianlancetaylor May 20, 2024 17:07
Copy link
Contributor

@ianlancetaylor ianlancetaylor left a comment

Choose a reason for hiding this comment

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

Thanks!

@jba jba merged commit 23b246d into main May 21, 2024
@jba jba deleted the jba-dotprompt-api branch May 21, 2024 19:49
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