Skip to content

Commit ff3ea48

Browse files
committed
Add Docker usage instructions for Mini-A web UI with AWS and OpenAI configurations
1 parent f51d657 commit ff3ea48

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

USAGE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,50 @@ Optional flags when starting the server:
113113

114114
Endpoints used by the UI (served by `mini-a-web.yaml`): `/prompt`, `/result`, `/clear`, and `/ping`.
115115

116+
### Web UI via Docker
117+
118+
Run the Mini‑A browser UI inside a container by passing the proper `OAF_MODEL` configuration for your LLM provider and exposing port `12345`. The following examples mount a `history/` directory from the host so conversation transcripts persist across runs.
119+
120+
> **Tip:** Replace secrets like API keys or session tokens with values from your shell environment or a secure secret manager. The `OPACKS` and `libs` flags load the provider- and Mini‑A-specific OpenAF packs and helper scripts.
121+
122+
#### AWS Bedrock (Mistral 7B Instruct)
123+
124+
```bash
125+
docker run --rm -ti \
126+
-e OPACKS=aws,mini-a \
127+
-e OAF_MODEL="(type: bedrock, timeout: 900000, options: (model: 'mistral.mistral-7b-instruct-v0:2', region: eu-west-1, temperature: 0.7, params: ('top_p': 0.9, 'max_tokens': 8192)))" \
128+
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
129+
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
130+
-e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
131+
-v $(pwd)/history:/tmp/history \
132+
-e OJOB=mini-a/mini-a-web.yaml \
133+
-p 12345:12345 \
134+
openaf/oaf:edge \
135+
onport=12345 chatbotmode=true \
136+
usehistory=true historykeep=true historypath=/tmp/history \
137+
useattach=true \
138+
libs="@AWS/aws.js"
139+
```
140+
141+
#### OpenAI (GPT‑5 Mini)
142+
143+
```bash
144+
docker run --rm -ti \
145+
-e OPACKS=aws,mini-a \
146+
-e OAF_MODEL="(type: openai, model: gpt-5-mini, key: 'your-openai-key', temperature: 1, timeout: 900000)" \
147+
-v $(pwd)/history:/tmp/history \
148+
-e OJOB=mini-a/mini-a-web.yaml \
149+
-p 12345:12345 \
150+
openaf/oaf:edge \
151+
onport=12345 chatbotmode=true \
152+
usehistory=true historykeep=true historypath=/tmp/history \
153+
useattach=true
154+
```
155+
156+
#### Custom Providers
157+
158+
Adapt the examples above by changing the `OAF_MODEL` tuple to match your provider (e.g., Anthropic, Azure OpenAI, Together). If the provider requires extra SDKs or credentials, extend the `OPACKS` list, add new `libs`, and export the relevant environment variables as `-e` flags.
159+
116160
### Attaching files in the browser UI
117161

118162
> **Prerequisite:** start the web server with `useattach=true` to display the paperclip control.

0 commit comments

Comments
 (0)