Models-Phi-8B/docs/diagrams/03-generator-components.mmd

38 lines
1.8 KiB
Plaintext

flowchart LR
data[("Catalog and pattern files")]
lm["LM Studio API"]
sql[("SQL Server")]
subgraph generator["RLHF.Generator.Api + RLHF.Generator"]
routes["HTTP Endpoints<br/>Program.cs<br/>Validation, contracts,<br/>status mapping"]
reader["TrainingDataReader<br/>Validates and parses subjects,<br/>categories, and patterns"]
generation["TrainingGenerationService<br/>Plans, fingerprints, resumes,<br/>parallelizes, orders, validates,<br/>and checkpoints"]
lmclient["LmStudioClient<br/>Local token resolution,<br/>prompt construction,<br/>HTTP completion"]
keyword["Keyword Services<br/>Load canonical values/variants;<br/>dry-run or apply unique backfill"]
reset["TrainingItemResetService<br/>Clears generated rows<br/>and run checkpoints"]
db["RlhfGeneratorDbContext<br/>EF Core mappings, seeds, indexes,<br/>relationships, and transactions"]
options["Options<br/>GenerationOptions<br/>LmStudioOptions<br/>SentenceTenses"]
routes -->|Dispatches| generation
routes -->|Dispatches| keyword
routes -->|Dispatches| reset
generation -->|Reads definitions| reader
generation -->|Normalizes| lmclient
generation -->|Persists batches| db
keyword -->|Uses| db
reset -->|Uses| db
options -->|Configures| generation
options -->|Configures| lmclient
end
data -->|Reads| reader
lmclient -->|HTTP chat completion| lm
db -->|EF Core SQL| sql
classDef component fill:#85bbf0,stroke:#0b4884,color:#000;
classDef primary fill:#1168bd,stroke:#0b4884,color:#fff;
classDef external fill:#e1d5e7,stroke:#9673a6,color:#000;
class routes,reader,lmclient,keyword,reset,db,options component;
class generation primary;
class data,lm,sql external;