k33g/demo-mini-me-structured-outputpublic Fork
⑂ fc9ff98
Commits
⬇ Clone ▾
git clone https://git.rickub.com/k33g/demo-mini-me-structured-output.git
git clone ssh://git@rickub.com/k33g/demo-mini-me-structured-output.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

🛟 Updated.

k33g committed 2026-10-16T07:27:45+02:00 Browse files
fc9ff98
added .gitignore +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1+tmp
2+blog
3+docs
new file mode 100644
@@ -0,0 +1,3 @@
1+tmp
2+blog
3+docs
added README.md +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+# Structured output with Mini Me 🍍🍕
new file mode 100644
@@ -0,0 +1 @@
1+# Structured output with Mini Me 🍍🍕
added agent.pizza.yaml +46 -0
new file mode 100644
@@ -0,0 +1,46 @@
1+# llmman pull hf.co/unsloth/gemma-4-E4B-it-GGUF:Q4_K_M
2+# cd demos/structured-output-pizza
3+# mm -p "hawaiian pizza" | jq .
4+provider: llmman
5+model: hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M
6+baseUrl: http://127.0.0.1:17434/v1
7+# From a Docker sandbox, the daemon runs on the host.
8+fallback: http://host.docker.internal:17434/v1
9+
10+bashTool: false
11+editTools: false
12+planTool: false
13+fetchContentTool: false
14+askUserTool: false
15+
16+acp:
17+ name: pizza
18+ title: 🍕 Pizza (JSON)
19+
20+system: |
21+ You are a pizzaiolo.
22+ For the pizza the user names, list its ingredients for one 30 cm pizza.
23+
24+structuredOutput: |
25+ // One ingredient of the pizza.
26+ type Ingredient struct {
27+ Name string `json:"name"` // the ingredient's name, in the user's language
28+ Quantity float64 `json:"quantity"` // amount for one pizza
29+ Unit string `json:"unit"` // "g", "ml", "piece", "pinch" or "to taste"
30+ Category string `json:"category"` // "base", "sauce", "cheese", "meat", "vegetable", "herb" or "other"
31+ Optional bool `json:"optional"`
32+ }
33+
34+ type Pizza struct {
35+ Name string `json:"name"`
36+ Vegetarian bool `json:"vegetarian"`
37+ Ingredients []Ingredient `json:"ingredients"`
38+ BakingTime *int `json:"bakingTime"` // minutes, null when unknown
39+ }
40+
41+ var Recipe Pizza
42+
43+sampling:
44+ temperature: 0.0
45+ chat_template_kwargs:
46+ enable_thinking: false
new file mode 100644
@@ -0,0 +1,46 @@
1+# llmman pull hf.co/unsloth/gemma-4-E4B-it-GGUF:Q4_K_M
2+# cd demos/structured-output-pizza
3+# mm -p "hawaiian pizza" | jq .
4+provider: llmman
5+model: hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M
6+baseUrl: http://127.0.0.1:17434/v1
7+# From a Docker sandbox, the daemon runs on the host.
8+fallback: http://host.docker.internal:17434/v1
9+
10+bashTool: false
11+editTools: false
12+planTool: false
13+fetchContentTool: false
14+askUserTool: false
15+
16+acp:
17+ name: pizza
18+ title: 🍕 Pizza (JSON)
19+
20+system: |
21+ You are a pizzaiolo.
22+ For the pizza the user names, list its ingredients for one 30 cm pizza.
23+
24+structuredOutput: |
25+ // One ingredient of the pizza.
26+ type Ingredient struct {
27+ Name string `json:"name"` // the ingredient's name, in the user's language
28+ Quantity float64 `json:"quantity"` // amount for one pizza
29+ Unit string `json:"unit"` // "g", "ml", "piece", "pinch" or "to taste"
30+ Category string `json:"category"` // "base", "sauce", "cheese", "meat", "vegetable", "herb" or "other"
31+ Optional bool `json:"optional"`
32+ }
33+
34+ type Pizza struct {
35+ Name string `json:"name"`
36+ Vegetarian bool `json:"vegetarian"`
37+ Ingredients []Ingredient `json:"ingredients"`
38+ BakingTime *int `json:"bakingTime"` // minutes, null when unknown
39+ }
40+
41+ var Recipe Pizza
42+
43+sampling:
44+ temperature: 0.0
45+ chat_template_kwargs:
46+ enable_thinking: false
added agent.yaml +43 -0
new file mode 100644
@@ -0,0 +1,43 @@
1+provider: llmman
2+model: hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M
3+baseUrl: http://127.0.0.1:17434/v1
4+fallback: http://host.docker.internal:17434/v1
5+
6+# The agents Bob can ask with the `ask_agent` tool.
7+# Its answer — the JSON — comes back to him as the tool's result.
8+mmConfigs:
9+ pizza:
10+ path: agent.pizza.yaml
11+ description: All about pizzas.
12+
13+# Bob reads and writes files (read_file, write_file, edit_file); no shell.
14+bashTool: false
15+editTools: true
16+# planTool: false
17+# skillsDir: no-skills
18+
19+yolo: true
20+
21+acp:
22+ name: bob
23+ title: 🤓 Bob (coordinator)
24+
25+system: |
26+ Your name is Bob. You coordinate one agent that answered in JSON, through your `ask_agent` tool:
27+ - `pizza` for pizza recipes;
28+ When a question is about pizza, call `pizza` agent,
29+ Call the agent, then work from its JSON.
30+
31+ To read a file, use `read_file`; to create one, `write_file`.
32+
33+sampling:
34+ temperature: 0.0
35+ parallel_tool_calls: false
36+ max_tokens: 8192
37+ chat_template_kwargs:
38+ enable_thinking: true
39+ reasoning_effort: low
40+
41+maxTurns: 20
42+watchdogTimeout: 2m
43+firstTokenTimeout: 3m
new file mode 100644
@@ -0,0 +1,43 @@
1+provider: llmman
2+model: hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M
3+baseUrl: http://127.0.0.1:17434/v1
4+fallback: http://host.docker.internal:17434/v1
5+
6+# The agents Bob can ask with the `ask_agent` tool.
7+# Its answer — the JSON — comes back to him as the tool's result.
8+mmConfigs:
9+ pizza:
10+ path: agent.pizza.yaml
11+ description: All about pizzas.
12+
13+# Bob reads and writes files (read_file, write_file, edit_file); no shell.
14+bashTool: false
15+editTools: true
16+# planTool: false
17+# skillsDir: no-skills
18+
19+yolo: true
20+
21+acp:
22+ name: bob
23+ title: 🤓 Bob (coordinator)
24+
25+system: |
26+ Your name is Bob. You coordinate one agent that answered in JSON, through your `ask_agent` tool:
27+ - `pizza` for pizza recipes;
28+ When a question is about pizza, call `pizza` agent,
29+ Call the agent, then work from its JSON.
30+
31+ To read a file, use `read_file`; to create one, `write_file`.
32+
33+sampling:
34+ temperature: 0.0
35+ parallel_tool_calls: false
36+ max_tokens: 8192
37+ chat_template_kwargs:
38+ enable_thinking: true
39+ reasoning_effort: low
40+
41+maxTurns: 20
42+watchdogTimeout: 2m
43+firstTokenTimeout: 3m
added git.sh +136 -0
new file mode 100755
@@ -0,0 +1,136 @@
1+#!/bin/bash
2+message=""
3+case $1 in
4+
5+ # 🎨: art
6+ art)
7+ message="Improve structure / format of the code"
8+ emoji="🎨"
9+ ;;
10+
11+ # 🐛: bug
12+ bug|fix)
13+ message="Fix a bug"
14+ emoji="🐛"
15+ ;;
16+
17+ # 🤓: geek
18+ human|human-fixed)
19+ message="Human Fixed"
20+ emoji="🤓"
21+ ;;
22+
23+ # 🤖: robot
24+ ai|ai-generated)
25+ message="AI generated"
26+ emoji="🤖"
27+ ;;
28+
29+ # ✨: sparkles
30+ sparkles|feature)
31+ message="Introduce new feature(s)"
32+ emoji="✨"
33+ ;;
34+
35+ # 🧩: jigsaw
36+ jigsaw|example|examples|demo|demos)
37+ message="Introduce new example(s)"
38+ emoji="🧩"
39+ ;;
40+
41+
42+ # 📝: memo
43+ memo|doc|documentation)
44+ message="Add or update documentation"
45+ emoji="📝"
46+ ;;
47+
48+ # 🌸: cherry_blossom
49+ gardening|garden|clean|cleaning)
50+ message="Gardening"
51+ emoji="🌸"
52+ ;;
53+
54+ # 🚀: rocket
55+ rocket|deploy)
56+ message="Deploy stuff"
57+ emoji="🚀"
58+ ;;
59+
60+ # 🎉: tada
61+ tada|first)
62+ message="Begin a project"
63+ emoji="🎉"
64+ ;;
65+
66+ # 🚧: construction
67+ construction|wip)
68+ message="Work in progress"
69+ emoji="🚧"
70+ ;;
71+
72+ # 📦️: package
73+ package|build)
74+ message="Add or update compiled files or packages"
75+ emoji="📦️"
76+ ;;
77+
78+ # 📦️: package
79+ release)
80+ message="Create a release"
81+ emoji="📦️"
82+ ;;
83+
84+ # 👽️: alien
85+ alien|api)
86+ message="Update code due to external API changes"
87+ emoji="👽️"
88+ ;;
89+
90+ # 🐳: whale
91+ docker|container)
92+ message="Docker"
93+ emoji="🐳"
94+ ;;
95+
96+ # 🍊: tangerine
97+ gitpod|gitpodify)
98+ message="Gitpodify"
99+ emoji="🍊"
100+ ;;
101+
102+ # 🧪: test tube
103+ alembic|experiments|experiment|xp)
104+ message="Perform experiments"
105+ emoji="🧪"
106+ ;;
107+
108+ # ✅: check mark
109+ test|tests|testing)
110+ message="Add or update tests"
111+ emoji="✅"
112+ ;;
113+
114+ # 💾: floppy-disk
115+ save)
116+ message="Saved"
117+ emoji="💾"
118+ ;;
119+
120+ *)
121+ message="Updated"
122+ emoji="🛟"
123+ ;;
124+
125+esac
126+
127+find . -name '.DS_Store' -type f -delete
128+
129+if [ -z "$2" ]
130+then
131+ # empty
132+ git add .; git commit -m "$emoji $message."; git push
133+else
134+ # not empty
135+ git add .; git commit -m "$emoji $message: $2"; git push
136+fi
new file mode 100755
@@ -0,0 +1,136 @@
1+#!/bin/bash
2+message=""
3+case $1 in
4+
5+ # 🎨: art
6+ art)
7+ message="Improve structure / format of the code"
8+ emoji="🎨"
9+ ;;
10+
11+ # 🐛: bug
12+ bug|fix)
13+ message="Fix a bug"
14+ emoji="🐛"
15+ ;;
16+
17+ # 🤓: geek
18+ human|human-fixed)
19+ message="Human Fixed"
20+ emoji="🤓"
21+ ;;
22+
23+ # 🤖: robot
24+ ai|ai-generated)
25+ message="AI generated"
26+ emoji="🤖"
27+ ;;
28+
29+ # ✨: sparkles
30+ sparkles|feature)
31+ message="Introduce new feature(s)"
32+ emoji="✨"
33+ ;;
34+
35+ # 🧩: jigsaw
36+ jigsaw|example|examples|demo|demos)
37+ message="Introduce new example(s)"
38+ emoji="🧩"
39+ ;;
40+
41+
42+ # 📝: memo
43+ memo|doc|documentation)
44+ message="Add or update documentation"
45+ emoji="📝"
46+ ;;
47+
48+ # 🌸: cherry_blossom
49+ gardening|garden|clean|cleaning)
50+ message="Gardening"
51+ emoji="🌸"
52+ ;;
53+
54+ # 🚀: rocket
55+ rocket|deploy)
56+ message="Deploy stuff"
57+ emoji="🚀"
58+ ;;
59+
60+ # 🎉: tada
61+ tada|first)
62+ message="Begin a project"
63+ emoji="🎉"
64+ ;;
65+
66+ # 🚧: construction
67+ construction|wip)
68+ message="Work in progress"
69+ emoji="🚧"
70+ ;;
71+
72+ # 📦️: package
73+ package|build)
74+ message="Add or update compiled files or packages"
75+ emoji="📦️"
76+ ;;
77+
78+ # 📦️: package
79+ release)
80+ message="Create a release"
81+ emoji="📦️"
82+ ;;
83+
84+ # 👽️: alien
85+ alien|api)
86+ message="Update code due to external API changes"
87+ emoji="👽️"
88+ ;;
89+
90+ # 🐳: whale
91+ docker|container)
92+ message="Docker"
93+ emoji="🐳"
94+ ;;
95+
96+ # 🍊: tangerine
97+ gitpod|gitpodify)
98+ message="Gitpodify"
99+ emoji="🍊"
100+ ;;
101+
102+ # 🧪: test tube
103+ alembic|experiments|experiment|xp)
104+ message="Perform experiments"
105+ emoji="🧪"
106+ ;;
107+
108+ # ✅: check mark
109+ test|tests|testing)
110+ message="Add or update tests"
111+ emoji="✅"
112+ ;;
113+
114+ # 💾: floppy-disk
115+ save)
116+ message="Saved"
117+ emoji="💾"
118+ ;;
119+
120+ *)
121+ message="Updated"
122+ emoji="🛟"
123+ ;;
124+
125+esac
126+
127+find . -name '.DS_Store' -type f -delete
128+
129+if [ -z "$2" ]
130+then
131+ # empty
132+ git add .; git commit -m "$emoji $message."; git push
133+else
134+ # not empty
135+ git add .; git commit -m "$emoji $message: $2"; git push
136+fi
added hawaiian.pizza.json +49 -0
new file mode 100644
@@ -0,0 +1,49 @@
1+{
2+ "bakingTime": 12,
3+ "ingredients": [
4+ {
5+ "category": "base",
6+ "name": "Pizza Dough",
7+ "optional": false,
8+ "quantity": 250,
9+ "unit": "g"
10+ },
11+ {
12+ "category": "sauce",
13+ "name": "Tomato Sauce",
14+ "optional": false,
15+ "quantity": 150,
16+ "unit": "g"
17+ },
18+ {
19+ "category": "cheese",
20+ "name": "Mozzarella Cheese",
21+ "optional": false,
22+ "quantity": 150,
23+ "unit": "g"
24+ },
25+ {
26+ "category": "meat",
27+ "name": "Ham",
28+ "optional": false,
29+ "quantity": 100,
30+ "unit": "g"
31+ },
32+ {
33+ "category": "vegetable",
34+ "name": "Pineapple Chunks",
35+ "optional": false,
36+ "quantity": 50,
37+ "unit": "g"
38+ },
39+ {
40+ "category": "herb",
41+ "name": "Oregano",
42+ "optional": true,
43+ "quantity": 1,
44+ "unit": "pinch"
45+ }
46+ ],
47+ "name": "Hawaiian Pizza",
48+ "vegetarian": false
49+}
new file mode 100644
@@ -0,0 +1,49 @@
1+{
2+ "bakingTime": 12,
3+ "ingredients": [
4+ {
5+ "category": "base",
6+ "name": "Pizza Dough",
7+ "optional": false,
8+ "quantity": 250,
9+ "unit": "g"
10+ },
11+ {
12+ "category": "sauce",
13+ "name": "Tomato Sauce",
14+ "optional": false,
15+ "quantity": 150,
16+ "unit": "g"
17+ },
18+ {
19+ "category": "cheese",
20+ "name": "Mozzarella Cheese",
21+ "optional": false,
22+ "quantity": 150,
23+ "unit": "g"
24+ },
25+ {
26+ "category": "meat",
27+ "name": "Ham",
28+ "optional": false,
29+ "quantity": 100,
30+ "unit": "g"
31+ },
32+ {
33+ "category": "vegetable",
34+ "name": "Pineapple Chunks",
35+ "optional": false,
36+ "quantity": 50,
37+ "unit": "g"
38+ },
39+ {
40+ "category": "herb",
41+ "name": "Oregano",
42+ "optional": true,
43+ "quantity": 1,
44+ "unit": "pinch"
45+ }
46+ ],
47+ "name": "Hawaiian Pizza",
48+ "vegetarian": false
49+}