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
//! This example shows how you can customize the format of a whole chaining prompt.
//!
//! The accepted format rules for the chain is the intersection of the accepted format rules
//! of every prompt it contains. For example, if we're prompting the chain C = A + B, and the prompt
//! A accepts the rules [msg_prefix, input_prefix], and B accepts the rules [msg_prefix, repeat_prompt],
//! C will accept the rules \[msg_prefix].
//!
//! You can still customize each prompt more specifically. For example, by doing
//! `ineed::written(...).fmt(...).then(...)` instead of `ineed::written(...).then(...).fmt(...)`.
//! In such case, if you provide a custom format for a specific promptable AND for the chain, with
//! conflicting rules, then the rules used are those defined for the specific promptable,
//! as they have more precedence.
use *;