Documentation
¶
Index ¶
- func ErrorWithSecretsRedacted(err error, secrets []string) error
- func HashAssets(parts []AssetHashPart) (string, error)
- func NewScheduledClient(client contracts.StructuredLLMClient, scheduler *Scheduler) contracts.StructuredLLMClient
- func PromptKitLocalBackendOption(cfg PromptKitLocalBackendConfig) promptkit.Option
- func RedactSecrets(message string, secrets []string) string
- type AssetHashPart
- type AssetRegistry
- func (r *AssetRegistry) FallbackProfileDigest() (string, error)
- func (r *AssetRegistry) FallbackProfileFS() (fs.FS, error)
- func (r *AssetRegistry) PromptFS() (fs.FS, error)
- func (r *AssetRegistry) PromptKitOptions() ([]promptkit.Option, error)
- func (r *AssetRegistry) RegisterFallbackProfileFS(fsys fs.FS, root string) error
- func (r *AssetRegistry) RegisterPromptFS(fsys fs.FS, root string) error
- func (r *AssetRegistry) RegisterSchemaFS(fsys fs.FS, root string) error
- func (r *AssetRegistry) SchemaFS() (fs.FS, error)
- type AssetSource
- type CheckpointFingerprint
- type CheckpointFingerprintProvider
- type LLMProfileRecorder
- type PromptKitClient
- func (c *PromptKitClient) CompleteStructured(ctx context.Context, req contracts.StructuredCompletionRequest, out any) (contracts.StructuredCompletionResponse, error)
- func (c *PromptKitClient) LLMCheckpointFingerprints() ([]CheckpointFingerprint, error)
- func (c *PromptKitClient) LLMProfileManifests() []artifacts.LLMProfileManifest
- type PromptKitClientConfig
- type PromptKitLocalBackendConfig
- type PromptKitProfileInspection
- type PromptKitProfileInspectionError
- type PromptKitProfileInspector
- type PromptKitProfileInspectorConfig
- type PromptKitProfileSourceConfig
- type ResponseSchema
- type ResponseSchemaDefinition
- type ResponseSchemaKey
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorWithSecretsRedacted ¶
ErrorWithSecretsRedacted returns an error with known secret values removed from its message.
func HashAssets ¶ added in v0.2.0
func HashAssets(parts []AssetHashPart) (string, error)
func NewScheduledClient ¶
func NewScheduledClient(client contracts.StructuredLLMClient, scheduler *Scheduler) contracts.StructuredLLMClient
func PromptKitLocalBackendOption ¶ added in v0.2.0
func PromptKitLocalBackendOption(cfg PromptKitLocalBackendConfig) promptkit.Option
func RedactSecrets ¶
RedactSecrets replaces configured secret values in diagnostics.
Types ¶
type AssetHashPart ¶ added in v0.2.0
type AssetRegistry ¶ added in v0.2.0
type AssetRegistry struct {
// contains filtered or unexported fields
}
func NewAssetRegistry ¶ added in v0.2.0
func NewAssetRegistry() *AssetRegistry
func (*AssetRegistry) FallbackProfileDigest ¶ added in v0.2.0
func (r *AssetRegistry) FallbackProfileDigest() (string, error)
FallbackProfileDigest returns a deterministic, non-secret identity for the flattened fallback profile assets.
func (*AssetRegistry) FallbackProfileFS ¶ added in v0.2.0
func (r *AssetRegistry) FallbackProfileFS() (fs.FS, error)
func (*AssetRegistry) PromptKitOptions ¶ added in v0.2.0
func (r *AssetRegistry) PromptKitOptions() ([]promptkit.Option, error)
func (*AssetRegistry) RegisterFallbackProfileFS ¶ added in v0.2.0
func (r *AssetRegistry) RegisterFallbackProfileFS(fsys fs.FS, root string) error
RegisterFallbackProfileFS registers profile assets that PromptKit uses only when an operator-configured source does not provide a matching profile.
func (*AssetRegistry) RegisterPromptFS ¶ added in v0.2.0
func (r *AssetRegistry) RegisterPromptFS(fsys fs.FS, root string) error
func (*AssetRegistry) RegisterSchemaFS ¶ added in v0.2.0
func (r *AssetRegistry) RegisterSchemaFS(fsys fs.FS, root string) error
type AssetSource ¶ added in v0.2.0
type CheckpointFingerprint ¶ added in v0.2.0
CheckpointFingerprint is a stable, non-secret semantic identity contributed by the LLM runtime before pipeline execution.
type CheckpointFingerprintProvider ¶ added in v0.2.0
type CheckpointFingerprintProvider interface {
LLMCheckpointFingerprints() ([]CheckpointFingerprint, error)
}
CheckpointFingerprintProvider exposes LLM-runtime identities that must participate in checkpoint composition.
type LLMProfileRecorder ¶ added in v0.2.0
type LLMProfileRecorder struct {
// contains filtered or unexported fields
}
func NewLLMProfileRecorder ¶ added in v0.2.0
func NewLLMProfileRecorder() *LLMProfileRecorder
func (*LLMProfileRecorder) Manifests ¶ added in v0.2.0
func (r *LLMProfileRecorder) Manifests() []artifacts.LLMProfileManifest
func (*LLMProfileRecorder) Record ¶ added in v0.2.0
func (r *LLMProfileRecorder) Record(profile artifacts.LLMProfileManifest)
type PromptKitClient ¶ added in v0.2.0
type PromptKitClient struct {
// contains filtered or unexported fields
}
func NewPromptKitClient ¶ added in v0.2.0
func NewPromptKitClient(cfg PromptKitClientConfig) (*PromptKitClient, error)
func (*PromptKitClient) CompleteStructured ¶ added in v0.2.0
func (c *PromptKitClient) CompleteStructured(ctx context.Context, req contracts.StructuredCompletionRequest, out any) (contracts.StructuredCompletionResponse, error)
func (*PromptKitClient) LLMCheckpointFingerprints ¶ added in v0.2.0
func (c *PromptKitClient) LLMCheckpointFingerprints() ([]CheckpointFingerprint, error)
func (*PromptKitClient) LLMProfileManifests ¶ added in v0.2.0
func (c *PromptKitClient) LLMProfileManifests() []artifacts.LLMProfileManifest
type PromptKitClientConfig ¶ added in v0.2.0
type PromptKitClientConfig struct {
ProfileDir string
ProfileFile string
TransientRetries *int
LocalBackend *PromptKitLocalBackendConfig
Assets *AssetRegistry
Timeout time.Duration
HTTPClient *http.Client
EngineOptions []promptkit.Option
Recorder *LLMProfileRecorder
ReasoningEffort *string
}
type PromptKitLocalBackendConfig ¶ added in v0.2.0
type PromptKitProfileInspection ¶ added in v0.2.0
type PromptKitProfileInspectionError ¶ added in v0.2.0
type PromptKitProfileInspectionError struct {
ProfileID string
// contains filtered or unexported fields
}
func (*PromptKitProfileInspectionError) Error ¶ added in v0.2.0
func (e *PromptKitProfileInspectionError) Error() string
func (*PromptKitProfileInspectionError) Unwrap ¶ added in v0.2.0
func (e *PromptKitProfileInspectionError) Unwrap() error
type PromptKitProfileInspector ¶ added in v0.2.0
type PromptKitProfileInspector struct {
// contains filtered or unexported fields
}
func NewPromptKitProfileInspector ¶ added in v0.2.0
func NewPromptKitProfileInspector(cfg PromptKitProfileInspectorConfig) (*PromptKitProfileInspector, error)
func (*PromptKitProfileInspector) InspectProfile ¶ added in v0.2.0
func (i *PromptKitProfileInspector) InspectProfile(ctx context.Context, profileID string) (PromptKitProfileInspection, error)
type PromptKitProfileInspectorConfig ¶ added in v0.2.0
type PromptKitProfileInspectorConfig struct {
Source PromptKitProfileSourceConfig
Assets *AssetRegistry
}
type PromptKitProfileSourceConfig ¶ added in v0.2.0
type PromptKitProfileSourceConfig struct {
ProfileDir string
ProfileFile string
LocalBackend *PromptKitLocalBackendConfig
}
type ResponseSchema ¶
type ResponseSchema struct {
Key ResponseSchemaKey `json:"key"`
ID string `json:"id"`
Version string `json:"version"`
Name string `json:"name"`
JSONSchema json.RawMessage `json:"json_schema"`
SHA256 string `json:"sha256"`
}
ResponseSchema describes one registered structured response schema.
func LoadResponseSchema ¶
func LoadResponseSchema(fsys fs.FS, def ResponseSchemaDefinition) (ResponseSchema, error)
LoadResponseSchema loads a structured response schema from a caller-owned filesystem.
func LookupResponseSchema ¶
func LookupResponseSchema(key ResponseSchemaKey) (ResponseSchema, bool)
LookupResponseSchema returns a copy of the schema for key.
func MustLookupResponseSchema ¶
func MustLookupResponseSchema(key ResponseSchemaKey) ResponseSchema
MustLookupResponseSchema returns a copy of the schema for key and panics when missing.
func RegisteredResponseSchemas ¶
func RegisteredResponseSchemas() []ResponseSchema
RegisteredResponseSchemas returns all registered response schemas sorted by key.
func (ResponseSchema) DiagnosticsMap ¶
func (s ResponseSchema) DiagnosticsMap() map[string]any
DiagnosticsMap returns schema metadata without raw schema content.
type ResponseSchemaDefinition ¶
type ResponseSchemaDefinition struct {
Key ResponseSchemaKey
ID string
Version string
Name string
AssetPath string
}
ResponseSchemaDefinition identifies a caller-owned structured response schema asset.
type ResponseSchemaKey ¶
type ResponseSchemaKey string
ResponseSchemaKey identifies one structured response schema.
const ( TestArtifactSchemaKey ResponseSchemaKey = "test_artifact" TestValidatorDecisionSchemaKey ResponseSchemaKey = "test_validator_decision" )
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler bounds concurrent LLM backend calls.
func NewScheduler ¶
NewScheduler creates a scheduler with a fixed concurrency limit.