diff options
| author | Pjotr Prins | 2026-03-29 10:15:42 +0200 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-29 10:15:42 +0200 |
| commit | b3ef15eca284f98ff0e7d2259c5d79cac0724119 (patch) | |
| tree | 9c90b9dd99e60de8d0a6f843aeac84839de0dd18 /README.md | |
| parent | db9974a1b64c643a760c67e30d3787d47cd28a34 (diff) | |
| download | genecup-b3ef15eca284f98ff0e7d2259c5d79cac0724119.tar.gz | |
Move API key into credentials file [AI]
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/README.md b/README.md index 1897704..7c09004 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,22 @@ Live searches are conducted through PubMed to get relevant PMIDs, which are then You can use the [guix.scm](./guix.scm) container to run genecup: ```sh -env GEMINI_API_KEY="AIzaSy**" `guix build -L . genecup-gemini`/server.py --port 4201 +`guix build -L . genecup-gemini`/bin/genecup --port 4201 ``` Note that the build includes minipubmed and punkt for testing! +## Gemini API credentials + +For stress classification via Gemini, create a credentials file: + +```sh +mkdir -p ~/.config/gemini +echo "YOUR_API_KEY_HERE" > ~/.config/gemini/credentials +``` + +The server reads the API key from `~/.config/gemini/credentials` on startup. + # Run a production server ## Install local mirror of PubMed @@ -44,22 +55,21 @@ Following the instruction provided by NCBI: https://www.nlm.nih.gov/dataguide/ed Point environment variables to this dir and run in the local source tree: ``` -env EDIRECT_PUBMED_MASTER=/export GEMINI_API_KEY="AIzaSy**" `guix build -L . genecup-gemini`/server.py --port 4201 +env EDIRECT_PUBMED_MASTER=/export/PubMed `guix build -L . genecup-gemini`/bin/genecup --port 4201 ``` You can run from a proper container: ``` -guix shell -L . -C -N -F genecup-gemini -- env GEMINI_API_KEY="AIzaSy**" genecup --port 4201 +guix shell -L . -C -N -F genecup-gemini -- genecup --port 4201 ``` Environment variables used: ``` -EDIRECT_PUBMED_MASTER: PubMed datadir (defaults to ./minipubmed) -GEMINI_API_KEY: LLM access key +EDIRECT_PUBMED_MASTER: PubMed datadir (defaults to built-in minipubmed) GENECUP_DATADIR: SQLITE DB directory (default .) -NLTK_DATA: punkt directory (defaults to ./minipubmed/tokenizer) +NLTK_DATA: punkt_tab directory (defaults to built-in nltk-punkt) TMPDIR (default /tmp) ``` |
