Skip to main content

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

FileLinesDeclarationsWhat it is for
config.go2419Carries the package documentation.
embedder.go2297Defensive ceilings bound serialization, response allocation and numeric work.
extractor.go31713Model proposes claims by asking a chat model.
identity.go705Include request fencing, response parsing and prompt composition in the configuration identity.
prompt.go18510The extraction prompt is a file because it is prose, and prose is reviewed as prose.
reporter.go25011The 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.go17912The 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.