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
// This is free and unencumbered software released into the public domain.
//! Language-model inference: the prompter marker trait, formats, and model selection.
use crateExecute;
use ;
use Builder;
/// A language-model inference provider that turns a prompt into a response.
///
/// The default contract is UTF-8 text in and out. It does not standardize chat
/// roles, conversation delimiters, or tool calls; programs assigning those
/// meanings to text must document their conventions. Structured formats require
/// explicitly selected tokens and compatible profiles.
///
/// # Command-line contract
///
/// `PROGRAM [OPTIONS] [INPUT-FILE [OUTPUT-FILE]]`
///
/// Input and output default to stdin and stdout. A single operand selects
/// input; two select input then output, with `-` denoting a standard stream.
/// [`PrompterOptions`] selects formats (both default to `text`) and an inference
/// model (default `auto`). Repeated invocations need not be deterministic.
/// Response whitespace and newlines are part of the result and are preserved.
///
/// `T` is the implementation's response representation. See [`crate::programs`]
/// for links to concrete execution behavior and the
/// [prompter specification][spec].
///
/// [spec]: https://asimov-specs.github.io/program-patterns/#prompter
/// Prompt/response formats and inference-model selection for a [`Prompter`].
///
/// `Default` leaves every optional field unset and `other` empty, requesting
/// the program's defaults. Values are forwarded without capability checks;
/// model identifiers and any nonstandard format tokens belong to the selected
/// provider. The example uses an illustrative provider-specific model name.
///
/// # Examples
///
/// ```rust
/// use asimov_patterns::PrompterOptions;
///
/// let options = PrompterOptions::builder()
/// .input("text")
/// .output("text")
/// .model("gemma3:1b")
/// .build();
/// ```