1use crate::{
2 LanguageTag, ModelCapability, ModelId, ProviderId, SlotId, StrategyId, StyleProfileId,
3 TemplateId,
4};
5
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
7pub enum TextDirection {
8 LeftToRight,
9 RightToLeft,
10}
11
12#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
13pub enum WritingRegister {
14 Neutral,
15 Formal,
16 Colloquial,
17 Literary,
18 Academic,
19}
20
21#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
22pub enum StyleStrength {
23 Light,
24 Medium,
25 Strong,
26}
27
28#[derive(Debug, Clone, PartialEq, Eq)]
29pub enum StyleInspiration {
30 Neutral,
31 EraInspired { era_label: String },
32 PublicDomainAuthorInspired { author_label: String },
33 RegisterOnly,
34}
35
36#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
37pub enum SlotRole {
38 Subject,
39 Verb,
40 DirectObject,
41 IndirectObject,
42 Adjective,
43 Adverb,
44 Time,
45 Location,
46 Connector,
47 Determiner,
48 Particle,
49}
50
51#[derive(Debug, Clone, PartialEq, Eq)]
52pub struct LanguageDescriptor {
53 pub tag: LanguageTag,
54 pub display_name: String,
55 pub direction: TextDirection,
56}
57
58#[derive(Debug, Clone, PartialEq, Eq)]
59pub struct StrategyDescriptor {
60 pub id: StrategyId,
61 pub display_name: String,
62 pub required_capabilities: Vec<ModelCapability>,
63}
64
65#[derive(Debug, Clone, PartialEq, Eq)]
66pub struct ModelDescriptor {
67 pub provider: ProviderId,
68 pub model: ModelId,
69 pub display_name: String,
70 pub supported_languages: Vec<LanguageTag>,
71 pub capabilities: Vec<ModelCapability>,
72}
73
74#[derive(Debug, Clone, PartialEq, Eq)]
75pub struct StyleProfileDescriptor {
76 pub id: StyleProfileId,
77 pub language: LanguageTag,
78 pub display_name: String,
79 pub register: WritingRegister,
80 pub strength: StyleStrength,
81 pub inspiration: StyleInspiration,
82}
83
84#[derive(Debug, Clone, PartialEq, Eq)]
85pub struct TemplateSlotDescriptor {
86 pub id: SlotId,
87 pub role: SlotRole,
88 pub required: bool,
89}
90
91#[derive(Debug, Clone, PartialEq, Eq)]
92pub enum TemplateToken {
93 Literal(String),
94 Slot(SlotId),
95}
96
97#[derive(Debug, Clone, PartialEq, Eq)]
98pub struct RealizationTemplateDescriptor {
99 pub id: TemplateId,
100 pub language: LanguageTag,
101 pub display_name: String,
102 pub slots: Vec<TemplateSlotDescriptor>,
103 pub tokens: Vec<TemplateToken>,
104}