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

Request: JSON schema for promptfooconfig.yaml #726

Open
jamesbraza opened this issue Apr 29, 2024 · 0 comments
Open

Request: JSON schema for promptfooconfig.yaml #726

jamesbraza opened this issue Apr 29, 2024 · 0 comments

Comments

@jamesbraza
Copy link
Contributor

It would be cool to publish a JSON schema for promptfooconfig.yaml. Then within an IDE one can:

  • Hover over fields and get a description of them
  • Rely on IDE warnings to iterate on mistakes in a promptfooconfig.yaml

For example PyCharm natively supports JSON schema integrations: https://www.jetbrains.com/guide/dotnet/tips/json-schema/

Then for bonus points the JSON schema could be registered in the JSON Schema Store: https://www.schemastore.org/json/ --> https://github.com/SchemaStore/schemastore/tree/master/src/schemas/json


For reference, here's how I personally make JSON schemas:

  1. Express schema as Pydantic BaseModel
  2. Export a JSON schema via BaseModel.model_json_schema()
  3. Add the JSON schema to PyCharm for the file name (e.g. promptfooconfig.yaml)
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

No branches or pull requests

1 participant