Documentation
¶
Index ¶
- Constants
- func ComparisonKey(value string) string
- func ContainsTokenSequence(value string, query string) bool
- func ModelCandidateFromResponse(response contracts.StructuredCompletionResponse) (*contracts.ModelCandidate, error)
- func NormalizedTokens(value string) []string
- func PrepareChunkExtraction(ctx context.Context, req contracts.TypedExtractionRequest) (contracts.LLMInputMaterial, error)
- func PromptInputs(sourceInput contracts.LLMInputMaterial, references contracts.ReferenceSet) contracts.LLMInputSet
- func ReferenceMediaTypes() []string
- func ReferencePromptInput(slot contracts.ResolvedReferenceSlot) []byte
- func ReferencePromptMaterial(name string, slot contracts.ResolvedReferenceSlot) contracts.LLMInputMaterial
- func ReferenceSlots(descriptions ReferenceSlotDescriptions) []contracts.ReferenceSlot
- func ResolveUnitID(index source.DocumentIndex, field string, ref UnitRef) (int, error)
- func TranscriptPromptMaterial(material contracts.LLMInputMaterial) contracts.LLMInputMaterial
- type CitationResolver
- type PromptAssetManifest
- type ReferenceSlotDescriptions
- type SourceRefOrder
- type SourceRefResponse
- type UnitRef
Constants ¶
const TextComparisonPolicy = "dnd.text_comparison.v1"
TextComparisonPolicy identifies the shared D&D text-comparison semantics. A semantic change requires a new value and a review of every dependent identity, mapping, normalization, and validator policy.
Variables ¶
This section is empty.
Functions ¶
func ComparisonKey ¶ added in v0.3.0
ComparisonKey returns the D&D Unicode- and case-insensitive comparison key.
func ContainsTokenSequence ¶
ContainsTokenSequence reports whether value contains the complete normalized query token sequence as consecutive tokens.
func ModelCandidateFromResponse ¶ added in v0.4.0
func ModelCandidateFromResponse(response contracts.StructuredCompletionResponse) (*contracts.ModelCandidate, error)
ModelCandidateFromResponse returns an owned candidate for the exact validated structured response produced by the shared LLM boundary.
func NormalizedTokens ¶
NormalizedTokens returns identity-normalized alphanumeric tokens from a D&D value.
func PrepareChunkExtraction ¶
func PrepareChunkExtraction(ctx context.Context, req contracts.TypedExtractionRequest) (contracts.LLMInputMaterial, error)
PrepareChunkExtraction validates common D&D extraction prerequisites and prepares owned chunk-scoped source material for prompt inputs.
func PromptInputs ¶
func PromptInputs(sourceInput contracts.LLMInputMaterial, references contracts.ReferenceSet) contracts.LLMInputSet
func ReferenceMediaTypes ¶
func ReferenceMediaTypes() []string
func ReferencePromptInput ¶
func ReferencePromptInput(slot contracts.ResolvedReferenceSlot) []byte
func ReferencePromptMaterial ¶
func ReferencePromptMaterial(name string, slot contracts.ResolvedReferenceSlot) contracts.LLMInputMaterial
func ReferenceSlots ¶
func ReferenceSlots(descriptions ReferenceSlotDescriptions) []contracts.ReferenceSlot
func ResolveUnitID ¶
func TranscriptPromptMaterial ¶
func TranscriptPromptMaterial(material contracts.LLMInputMaterial) contracts.LLMInputMaterial
Types ¶
type CitationResolver ¶
type CitationResolver struct {
// contains filtered or unexported fields
}
CitationResolver resolves cited ranges against one source document.
func NewCitationResolver ¶
func NewCitationResolver(doc *source.SourceDocument) (*CitationResolver, error)
NewCitationResolver prepares citation resolution for doc.
type PromptAssetManifest ¶
type PromptAssetManifest struct {
ModuleDir string
ModuleFiles []promptfs.ModulePromptFile
}
PromptAssetManifest is the ordered set of assets that make up one prompt. Module files are addressed in the owning module filesystem. SharedFiles use names in sharedPromptPaths, while ExternalSharedFiles are explicit caller-owned descriptors. Both kinds are mounted beneath sharedassets.
type SourceRefOrder ¶
type SourceRefOrder struct {
// contains filtered or unexported fields
}
SourceRefOrder provides a stable snapshot of a source document's unit ordering for source-reference comparison and canonicalization.
func NewSourceRefOrder ¶
func NewSourceRefOrder(doc *source.SourceDocument) SourceRefOrder
NewSourceRefOrder captures the source identity and unit positions from doc.
func NewSourceRefOrderFromIndex ¶
func NewSourceRefOrderFromIndex(index source.DocumentIndex) SourceRefOrder
NewSourceRefOrderFromIndex captures source identity and unit positions from one document index for source-reference comparison and canonicalization.
func (SourceRefOrder) Canonicalize ¶
func (o SourceRefOrder) Canonicalize(refs []source.SourceRef) []source.SourceRef
Canonicalize returns an owned, stable-sorted, exactly de-duplicated copy of refs. It deliberately preserves invalid references for diagnostics.
func (SourceRefOrder) EarliestValid ¶
func (o SourceRefOrder) EarliestValid(refs []source.SourceRef) (int, bool)
EarliestValid returns the earliest document position among valid refs.
type SourceRefResponse ¶
type UnitRef ¶
type UnitRef struct {
// contains filtered or unexported fields
}
func UnitRefFromInt ¶
func (UnitRef) MarshalJSON ¶
func (*UnitRef) UnmarshalJSON ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package diagnostics provides bounded, safe text for deterministic D&D decisions and findings.
|
Package diagnostics provides bounded, safe text for deterministic D&D decisions and findings. |
|
Package registryresolver provides the shared reference-selection and caching mechanics used by immutable D&D registry views.
|
Package registryresolver provides the shared reference-selection and caching mechanics used by immutable D&D registry views. |