Skip to content

Commit cf6e3a6

Browse files
committed
feat: update search functionality and documentation for VFB Connect integration
1 parent 95f4574 commit cf6e3a6

5 files changed

Lines changed: 589 additions & 96 deletions

File tree

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VFB Chat is a Next.js chat interface for exploring Virtual Fly Brain (VFB) data
55
## What Changed
66

77
- Native `web_search` has been removed from the model toolset.
8-
- Search is limited to approved `virtualflybrain.org` and `neurofly.org` pages plus reviewed `flybase.org` pages through server-side, domain-restricted tools.
8+
- Search is limited to approved `virtualflybrain.org`, `neurofly.org`, and `vfb-connect.readthedocs.io` pages plus reviewed `flybase.org` pages through server-side, domain-restricted tools.
99
- Outbound links are sanitized server-side to approved domains only.
1010
- Raw IP-based security logs are retained for up to 30 days under `/logs/security`.
1111
- Aggregated analytics and structured feedback are retained under `/logs/analytics` and `/logs/feedback`.
@@ -36,7 +36,7 @@ The app now uses a 3-layer logging model rooted at `LOG_ROOT_DIR`:
3636
The reviewed documentation search path uses two server-side sources:
3737

3838
- a seed index from `config/reviewed-docs-index.json`
39-
- a domain-restricted discovery path for approved `virtualflybrain.org` and `neurofly.org` pages using configured sitemap and robots sources
39+
- a domain-restricted discovery path for approved `virtualflybrain.org`, `neurofly.org`, and `vfb-connect.readthedocs.io` pages using configured sitemap and robots sources
4040

4141
This keeps search scoped to approved domains while avoiding a hand-maintained list of every VFB news or documentation page.
4242

@@ -52,13 +52,16 @@ Environment variable:
5252

5353
Required for production:
5454

55-
- `OPENAI_API_KEY`
56-
- `OPENAI_BASE_URL` or `APPROVED_ELM_BASE_URL`
57-
- `OPENAI_MODEL` or `APPROVED_ELM_MODEL`
55+
- `ELM_API_KEY` (or `OPENAI_API_KEY` as backward-compatible fallback)
56+
- `ELM_BASE_URL` (or `OPENAI_BASE_URL`) or `APPROVED_ELM_BASE_URL`
57+
- `ELM_MODEL` (or `OPENAI_MODEL`) or `APPROVED_ELM_MODEL`
5858
- `LOG_ROOT_DIR=/logs`
5959

6060
Optional:
6161

62+
- `OPENAI_API_KEY`
63+
- `OPENAI_BASE_URL`
64+
- `OPENAI_MODEL`
6265
- `APPROVED_ELM_BASE_URL`
6366
- `APPROVED_ELM_MODEL`
6467
- `RATE_LIMIT_PER_IP`
@@ -68,21 +71,21 @@ Optional:
6871
- `GA_MEASUREMENT_ID`
6972
- `GA_API_SECRET`
7073

71-
When `APPROVED_ELM_BASE_URL` and/or `APPROVED_ELM_MODEL` are provided, production enforces that they exactly match the active `OPENAI_*` values. If they are omitted, the app uses the active gateway/model as the approved baseline so existing single-config deployments continue to work.
74+
When `APPROVED_ELM_BASE_URL` and/or `APPROVED_ELM_MODEL` are provided, production enforces that they exactly match the active configured gateway/model (resolved from `ELM_*` first, then `OPENAI_*`). If they are omitted, the app uses the active gateway/model as the approved baseline so existing single-config deployments continue to work.
7275

7376
Default allow-lists:
7477

75-
- Search allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`
76-
- Outbound allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `doi.org`, `pubmed.ncbi.nlm.nih.gov`, `biorxiv.org`, `medrxiv.org`
78+
- Search allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `vfb-connect.readthedocs.io`
79+
- Outbound allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `vfb-connect.readthedocs.io`, `doi.org`, `pubmed.ncbi.nlm.nih.gov`, `biorxiv.org`, `medrxiv.org`
7780

7881
## Local Development
7982

8083
Create `.env.local` with explicit values:
8184

8285
```bash
83-
OPENAI_API_KEY=your-key-here
84-
OPENAI_BASE_URL=https://your-elm-gateway.example/v1
85-
OPENAI_MODEL=your-approved-model
86+
ELM_API_KEY=elm-xxxxxxxx-xxxxxxxxxxxxxxxx
87+
ELM_BASE_URL=https://elm.edina.ac.uk/api/v1
88+
ELM_MODEL=meta-llama/Llama-3.3-70B-Instruct
8689
LOG_ROOT_DIR=./logs
8790
```
8891

0 commit comments

Comments
 (0)