internal/infra/inference
github.com/ensera-ai/taisce/internal/infra/inference · 7 files · 1471 lines · 72 tests · source
Package inference reaches a chat model over the OpenAI-compatible HTTP interface.
One interface rather than one per vendor, because the shape is the same everywhere it matters and the differences are in fields this package does not send. What that buys is the ability to change where inference happens — a hosted provider, a gateway, a model on the same machine — without any of it reaching the extractor, which is the only place the correctness argument lives.
Where it sits
Imports: internal/compaction, internal/domain, internal/extract, internal/report
Imported by: cmd/taisce
Files
| File | Lines | Declarations | What it is for |
|---|---|---|---|
| config.go | 241 | 9 | Carries the package documentation. |
| embedder.go | 229 | 7 | Defensive ceilings bound serialization, response allocation and numeric work. |
| extractor.go | 317 | 13 | Model proposes claims by asking a chat model. |
| identity.go | 70 | 5 | Include request fencing, response parsing and prompt composition in the configuration identity. |
| prompt.go | 185 | 10 | The extraction prompt is a file because it is prose, and prose is reviewed as prose. |
| reporter.go | 250 | 11 | The report prompt is a file for the same reasons the extraction prompt is, and compiled in for the same reason: a report is what a thematic question is answered from, so a prompt the filesystem can change is a path by which whoever can write next to the binary changes what this system says about somebody's memory. |
| summariser.go | 179 | 12 | The compaction prompt is a file for the same reasons the report prompt is, and compiled in for the same reason: a segment stands in for somebody's history, so a prompt the filesystem can change is a path by which whoever can write next to the binary changes what an agent is told happened. |
72 tests hold this package's behaviour; the list is named for what each one proves.
Files it carries
Not Go, and part of what the package is: embedded, rendered or read at build time.