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

datasette-secrets integration #11

Merged
merged 4 commits into from
Apr 27, 2024
Merged

datasette-secrets integration #11

merged 4 commits into from
Apr 27, 2024

Conversation

simonw
Copy link
Contributor

@simonw simonw commented Apr 27, 2024

Refs:

TODO:

  • Manual testing
  • Update README to talk about new configuration options with datasette-secrets

@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2024

Testing manually, first:

export DATASETTE_SECRETS_OPENAI_API_KEY=$(cat "$(llm keys path)" | jq .openai -r)

Then:

datasette museums.db --root -p 8045 --secret 1

That ran an enrichment fine.

Then I ran this, such that it would show me a field to enter the key:

export DATASETTE_SECRETS_OPENAI_API_KEY=''

CleanShot 2024-04-27 at 14 55 21@2x

... and got the weirdest bug, it segfaulted when I submitted the form with the secret is!

INFO:     127.0.0.1:56557 - "POST /-/enrich/museums/museums/gpt?_search=hearst HTTP/1.1" 302 Found
zsh: segmentation fault  datasette museums.db --root -p 8045 --secret 1

It's repeatable, I've seen it do that twice now.

@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2024

@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2024

After that fix my manual test of what happens if you enter an API key as part of the form itself passed.

@simonw simonw merged commit c20758d into main Apr 27, 2024
20 checks passed
@simonw simonw deleted the secrets branch April 27, 2024 22:17
@simonw simonw changed the title WIP datasette-secrets integration datasette-secrets integration Apr 27, 2024
@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2024

This now has a test as well thanks to:

1 similar comment
@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2024

This now has a test as well thanks to:

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.

1 participant