Skip to content

If no API key configured, prompt the user to provide one #11

@simonw

Description

@simonw

I use this trick for datasette-enrichments-gpt and I like it - it means I can share public demos of the plugin without needing to bake a paid API key into the demo.

I'll switch the configuration around to use the {"$env": "..."} plugin configuration mechanism. Then I'll have the query page know that if it hasn't been configured it should provide a password field for the user to enter an API key instead.

I'll persist that key in localStorage for them, like I do on https://tools.simonwillison.net/haiku

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions