Skip to content

Commit 7907692

Browse files
docs/compose: update docker-compose and .env for image features
Signed-off-by: Hrushikesh Patil <[email protected]>
1 parent b238344 commit 7907692

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.env.ollama

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ CHAT_MODEL=qwen2.5:0.5b
22
THINKING_MODEL=qwen3:1.7b
33
COMPLETION_MODEL=qwen2.5:0.5b
44
EMBEDDINGS_MODEL=all-minilm:33m
5+
IMAGE_GENERATION_MODEL=dall-e-2

cmd/aigw/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ Here are values we use for Ollama:
5656
```
5757

5858
- MCP (Model Context Protocol) tool call:
59+
5960
```bash
6061
docker compose run --rm mcp
6162
```
63+
6264
This calls the kiwi MCP server through aigw's MCP Gateway at `/mcp`.
6365
6466
- Image generation:
@@ -72,14 +74,15 @@ Here are values we use for Ollama:
7274
-X POST http://localhost:1975/v1/images/generations \
7375
-H "Authorization: Bearer unused" \
7476
-H "Content-Type: application/json" \
75-
-d '{"model":"gpt-image-1","prompt":"A watercolor painting of a red fox in a birch forest","size":"512x512"}' \
77+
-d '{"model":"dall-e-2","prompt":"A watercolor painting of a red fox in a birch forest","size":"512x512"}' \
7678
| jq -r '.data[0].b64_json' | base64 -d > image.png
7779
```
7880
7981
4. **Create embeddings**:
8082
8183
The `create-embeddings` service uses `curl` to send an embeddings request
8284
to the AI Gateway CLI (aigw) which routes it to Ollama.
85+
8386
```bash
8487
docker compose run --rm create-embeddings
8588
```

cmd/aigw/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
image: alpine/ollama
2323
container_name: ollama-pull
2424
environment:
25-
OLLAMA_HOST: localhost:11434 # intentionally not 127.0.0.1
25+
OLLAMA_HOST: localhost:11434 # intentionally not 127.0.0.1
2626
env_file:
2727
- ../../.env.ollama
2828
entrypoint: sh
@@ -152,6 +152,6 @@ services:
152152
-X POST http://aigw:1975/v1/images/generations \
153153
-H "Authorization: Bearer unused" \
154154
-H "Content-Type: application/json" \
155-
-d "{\"model\":\"$$CHAT_MODEL\",\"prompt\":\"A watercolor painting of a red fox in a birch forest\",\"size\":\"256x256\"}"
155+
-d "{\"model\":\"$$IMAGE_GENERATION_MODEL\",\"prompt\":\"A watercolor painting of a red fox in a birch forest\",\"size\":\"256x256\"}"
156156
extra_hosts: # localhost:host-gateway trick doesn't work with aigw
157157
- "host.docker.internal:host-gateway"

0 commit comments

Comments
 (0)