-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathconfig.yaml
More file actions
368 lines (349 loc) · 13.4 KB
/
Copy pathconfig.yaml
File metadata and controls
368 lines (349 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# Fallback LLM for text generation and visual analysis. Image generation and
# speech use their own task-specific defaults; step-level `model` values still
# override this one. This can also be changed in Studio under Settings > Models.
default_model: "openai:gpt-5.4"
default_image_generation_model: "openai:gpt-image-2"
default_speech_generation_model: "gpt-4o-mini-tts"
structure_types:
group: >
Generic container used to bind sibling text leaves that form one visual
unit (e.g. multi-sentence paragraphs, groups of labels). Use this whenever
two or more text leaves belong together visually but none of the more
specific containers applies.
heading: A heading block — contains one or more leaf nodes that together form a single heading.
paragraph: >
A prose paragraph. Children are text leaves (usually role "text") in reading order.
list: An ordered or unordered list. Children are list_item containers.
list_item: One item of a list. Children are the leaf(s) making up that item.
table: A data table. Children are table_row containers, in top-to-bottom order.
table_row: One row of a table. Children are table_cell containers, in left-to-right order.
table_cell: >
One cell of a table. May be empty (no children) to preserve column alignment
for visually blank cells. When non-empty, children are the leaves or
containers inside the cell.
sidebar: >
A visually separated callout, tip box, or aside. Children are the leaves
and containers inside the sidebar.
panel: >
A generic bordered or visually separated panel that is not a sidebar
(e.g. a decorated info panel or a full-page boxed layout).
activity: >
A complete activity or exercise block. Children include any introductory
leaves (activity_number / activity_instruction / activity_question) and
one or more activity_option containers.
activity_option: >
One option or answer choice within an activity. Always a container, even
when it holds a single text leaf — never use a bare leaf as an option.
image_group: >
A container that binds an image to its associated content — a caption,
label, or overlay text. MUST have as its first child a leaf with role
`image` whose `image_id` references one of the listed extracted images,
followed by one or more caption/label/overlay leaves. Only use this
when the image has associated content; a standalone image with no
associated content is emitted as a bare `role: "image"` leaf instead.
preformatted: >
A block of preformatted text where line breaks matter (poetry stanzas,
code samples, ASCII layouts). Children are the text leaves, one per line.
role_types:
heading: A heading-level leaf (chapter, section, or subheading text).
text: Ordinary prose or narrative text.
math: A mathematical expression (use LaTeX notation).
image: >
An image leaf referencing an extracted image. Carries `image_id`
(one of the IDs listed in the input). Has no `text`. Emit as a bare
leaf in reading order when the image stands alone; wrap in an
`image_group` container only when the image has associated content
(caption, label, or overlay text).
caption: A caption tied to an image or figure.
label: A short label, tag, or annotation.
activity_number: Numbering for an activity (e.g. "1.", "A)").
activity_instruction: A general instruction for the learner at the activity level.
activity_question: The question or prompt of the activity.
activity_fill_in_the_blank: Text with blanks to fill in (use ___ for blanks).
page_number: A page number.
header: A running header.
footer: A running footer.
quote: A quoted passage.
book_metadata: Publisher, copyright, ISBN, edition, or author metadata.
section_types:
front_cover: >
The very first page of the book showing the title, author, and cover artwork.
Only the first page qualifies — interior title pages do not.
inside_cover: >
A page immediately after the front cover or before the back cover,
typically containing publisher info, ISBN, copyright, or edition details.
back_cover: >
The very last page of the book, often with a summary, barcode, or publisher logo.
Only the final page qualifies.
separator: >
A divider page between major sections of the book. Contains minimal content —
usually just a title, chapter number, or decorative element. No substantive text or activities.
credits: >
A page listing contributors, acknowledgements, photo credits, or funding sources.
Distinct from inside_cover (which has publisher/ISBN info).
foreword: >
An introductory page such as a preface, author's note, or "about this book" section.
Appears before the main content begins.
table_of_contents: >
A page listing chapter or section titles with their corresponding page numbers.
boxed_text: >
Text presented inside a visible box, border, or colored callout area that
visually separates it from the surrounding content. Used for tips, definitions,
key facts, or highlighted information.
text_only: >
A reading section that contains only text — no images, no activities.
Paragraphs, headings, and prose passages.
text_and_single_image: >
A reading section that contains text accompanied by exactly one image.
The image supports or illustrates the text.
text_and_images: >
A reading section that contains text accompanied by two or more images.
images_only: >
A section that contains only images with no meaningful text content.
Captions or labels alone do not count as text.
activity_matching: >
Match items in a strict one-to-one relationship.
Each item on one side corresponds to exactly one item on the other side,
and both sides have the same number of elements.
activity_fill_in_a_table: >
Complete a table by filling in missing cells.
The structure is a grid with rows and columns, and learners must enter
information into specific cells.
activity_multiple_choice: >
Select the correct answer from a list of predefined options.
Each question presents one or more possible answers, and the learner
chooses the best option.
activity_multi_select: >
Select all options that apply from a list of predefined options.
More than one option per question may be correct, and the learner must
pick every option that satisfies the prompt (a "check all that apply"
or "mark every X" task). Use checkboxes, not radios.
activity_underline_text: >
Underline one or more words, phrases, or sentences directly in the text.
The learner selects inline text segments instead of separate option cards,
and the correct answer may be one segment or multiple segments.
activity_true_false: >
Decide whether each statement is true or false.
The learner evaluates given statements and selects between two options:
true or false.
activity_open_ended_answer: >
Provide a free-form response without predefined options.
The learner must generate their own answer, typically as a sentence,
explanation, or short text.
activity_fill_in_the_blank: >
Complete sentences or phrases by filling in missing words or values.
The learner supplies the missing information directly in the blanks.
activity_sorting: >
Group multiple items into categories.
There are more items than categories, and each category contains
multiple items (many-to-one classification).
activity_other: >
An interactive activity or exercise that does not fit any of the specific
activity types above. Use this ONLY when the underlying learning mechanic
is truly unique (e.g., free drawing, crafts, physical movement).
Do NOT use this just because the physical action is circling, coloring,
or underlining — classify based on the cognitive task, not the action.
other: >
Any section that does not clearly fit any of the above types.
Use this only as a last resort.
metadata:
prompt: metadata_extraction
page_sectioning:
prompt: page_sectioning
max_refinements: 0
image_meaningfulness:
prompt: image_meaningfulness
image_cropping:
prompt: image_cropping
default_render_strategy: two_column
render_strategies:
llm:
render_type: llm
config:
prompt: web_generation_html
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
llm-overlay:
render_type: llm
config:
prompt: web_generation_html_overlay
max_retries: 25
timeout: 180
visual_refinement:
enabled: true
two_column:
render_type: template
config:
template: two_column_render
two_column_story:
render_type: template
config:
template: two_column_story
one_column:
render_type: template
config:
template: one_column_render
fixed_layout:
render_type: fixed_layout
activity_multiple_choice:
render_type: activity
config:
prompt: activity_multiple_choice
answer_prompt: activity_multiple_choice_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_multi_select:
render_type: activity
config:
prompt: activity_multi_select
answer_prompt: activity_multi_select_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_underline_text:
render_type: activity
config:
prompt: activity_underline_text
answer_prompt: activity_underline_text_answers
model: openai:gpt-5.4
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_true_false:
render_type: activity
config:
prompt: activity_true_false
answer_prompt: activity_true_false_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_fill_in_the_blank:
render_type: activity
config:
prompt: activity_fill_in_the_blank
answer_prompt: activity_fill_in_the_blank_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_fill_in_a_table:
render_type: activity
config:
prompt: activity_fill_in_a_table
answer_prompt: activity_fill_in_a_table_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_matching:
render_type: activity
config:
prompt: activity_matching
answer_prompt: activity_matching_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_sorting:
render_type: activity
config:
prompt: activity_sorting
answer_prompt: activity_sorting_answers
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
activity_open_ended_answer:
render_type: activity
config:
prompt: activity_open_ended_answer
max_retries: 5
timeout: 180
visual_refinement:
enabled: true
section_render_strategies:
activity_multiple_choice: activity_multiple_choice
activity_multi_select: activity_multi_select
activity_underline_text: activity_underline_text
activity_true_false: activity_true_false
activity_fill_in_the_blank: activity_fill_in_the_blank
activity_fill_in_a_table: activity_fill_in_a_table
activity_matching: activity_matching
activity_sorting: activity_sorting
activity_open_ended_answer: activity_open_ended_answer
quiz_generation:
# Style quizzes to match the book (typography + colors derived from the book).
match_book_style: true
quiz_section_types:
- boxed_text
- text_only
- text_and_single_image
- text_and_images
- images_only
pruned_role_types:
- header
- footer
- page_number
pruned_section_types:
- back_cover
- credits
- inside_cover
concurrency: 32
image_filters:
min_side: 100
max_side: 5000
min_stddev: 2
meaningfulness: true
cropping: true
# rate_limit:
# requests_per_minute: 60
# Text-to-speech (read-aloud) settings. `default_provider` and per-language
# `providers` routing decide which engine synthesizes each language.
#
# Gemini defaults to the faster gemini-2.5-flash-preview-tts model; set `model`
# to switch to Pro (higher quality, slower, lower throughput).
#
# `rate_limit` controls the adaptive request limiter for Gemini TTS:
# - requests_per_minute: auto → start at the model's documented ceiling
# (flash 150 / pro 125) and automatically back off on 429s, then recover.
# This is the default when omitted.
# - requests_per_minute: 30 → pin the starting ceiling to a fixed number
# (still backs off on 429s).
# - min_/max_requests_per_minute → override the adaptive floor/ceiling.
#
# speech:
# default_provider: gemini
# providers:
# gemini:
# model: gemini-2.5-flash-preview-tts # or gemini-2.5-pro-preview-tts
# languages: [en, es, fr, pt-BR, sq]
# rate_limit:
# requests_per_minute: auto
# min_requests_per_minute: 3
# max_requests_per_minute: 150
# Reader-customization defaults and locks applied to the exported web ADT.
# `default_settings` seeds the reader's starting values (only overrides
# localStorage when the corresponding key is locked).
# `locked_settings` hides those controls from the reader's settings panel.
#
# Example:
# default_settings:
# dock_layout:
# width: full # compact | full
# position: bottom # top | bottom
# align: spread # center | spread
# theme: dark # light | dark | system
# icon_size: md # sm | md | lg
# reduce_motion: false
locked_settings:
- dockLayout
- theme
- iconSize
- reduceMotion