File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ CHAT_MODEL=qwen2.5:0.5b
22THINKING_MODEL=qwen3:1.7b
33COMPLETION_MODEL=qwen2.5:0.5b
44EMBEDDINGS_MODEL=all-minilm:33m
5+ IMAGE_GENERATION_MODEL=dall-e-2
Original file line number Diff line number Diff 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
79814. **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 ```
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments