knowlapi

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package knowlapi contains generated public HTTP transport bindings for Knowl.

Package knowlapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type Citation

type Citation struct {
	Kind      CitationKind `json:"kind"`
	PageId    *string      `json:"page_id,omitempty"`
	Path      *string      `json:"path,omitempty"`
	Reference string       `json:"reference"`
	SourceRef *string      `json:"source_ref,omitempty"`
	Untrusted bool         `json:"untrusted"`
}

Citation defines model for Citation.

type CitationKind

type CitationKind string

CitationKind defines model for Citation.Kind.

const (
	Raw  CitationKind = "raw"
	Wiki CitationKind = "wiki"
)

Defines values for CitationKind.

type ContextBudget added in v0.6.0

type ContextBudget struct {
	IncludedCount DiagnosticCount `json:"included_count"`
	MaxBytes      int             `json:"max_bytes"`

	// OmittedCount Actual candidates omitted by the request byte budget; pending candidates are not counted.
	OmittedCount DiagnosticCount `json:"omitted_count"`

	// UsedBytes Serialized accepted request bytes, or last measured accepted prefix on partial failure. Absent when preflight stopped exact measurement; measured required overflow can exceed max_bytes.
	UsedBytes *DiagnosticCount `json:"used_bytes,omitempty"`
}

ContextBudget defines model for ContextBudget.

type ContextPage added in v0.6.0

type ContextPage struct {
	Disposition ContextPageDisposition `json:"disposition"`

	// PageId Canonical relative ordinary page ID, additionally limited to 2048 UTF-8 bytes.
	PageId string `json:"page_id"`

	// SelectionReason First actual selection phase; unsupported custom indexes report unknown.
	SelectionReason ContextPageSelectionReason `json:"selection_reason"`
}

ContextPage defines model for ContextPage.

type ContextPageDisposition added in v0.6.0

type ContextPageDisposition string

ContextPageDisposition defines model for ContextPage.Disposition.

const (
	BudgetOmitted ContextPageDisposition = "budget_omitted"
	Included      ContextPageDisposition = "included"
	Pending       ContextPageDisposition = "pending"
)

Defines values for ContextPageDisposition.

type ContextPageSelectionReason added in v0.6.0

type ContextPageSelectionReason string

ContextPageSelectionReason First actual selection phase; unsupported custom indexes report unknown.

const (
	ContextPageSelectionReasonHybrid   ContextPageSelectionReason = "hybrid"
	ContextPageSelectionReasonLexical  ContextPageSelectionReason = "lexical"
	ContextPageSelectionReasonNeighbor ContextPageSelectionReason = "neighbor"
	ContextPageSelectionReasonRecent   ContextPageSelectionReason = "recent"
	ContextPageSelectionReasonUnknown  ContextPageSelectionReason = "unknown"
	ContextPageSelectionReasonVector   ContextPageSelectionReason = "vector"
)

Defines values for ContextPageSelectionReason.

type DiagnosticCount added in v0.6.0

type DiagnosticCount = int

DiagnosticCount defines model for DiagnosticCount.

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse defines model for ErrorResponse.

type EvidenceItem

type EvidenceItem struct {
	DocumentId      *string           `json:"document_id,omitempty"`
	Okf             *OKFMetadata      `json:"okf,omitempty"`
	PageId          string            `json:"page_id"`
	Revision        *string           `json:"revision,omitempty"`
	Snippet         string            `json:"snippet"`
	SourceDocuments *[]SourceDocument `json:"source_documents,omitempty"`
	SourceId        *string           `json:"source_id,omitempty"`
	SourceRefs      *[]string         `json:"source_refs,omitempty"`
	Title           string            `json:"title"`
	Untrusted       bool              `json:"untrusted"`
	Uri             *string           `json:"uri,omitempty"`
}

EvidenceItem defines model for EvidenceItem.

type Failure

type Failure struct {
	Class       string `json:"class"`
	OperationId string `json:"operation_id"`

	// Reason Stable application failure code when classified; no provider error text.
	Reason *string `json:"reason,omitempty"`
}

Failure defines model for Failure.

type GetHealth200JSONResponse

type GetHealth200JSONResponse HealthResponse

func (GetHealth200JSONResponse) VisitGetHealthResponse

func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealthRequestObject

type GetHealthRequestObject struct {
}

type GetHealthResponseObject

type GetHealthResponseObject interface {
	VisitGetHealthResponse(w http.ResponseWriter) error
}

type GetOperation200JSONResponse

type GetOperation200JSONResponse OperationResult

func (GetOperation200JSONResponse) VisitGetOperationResponse

func (response GetOperation200JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation400JSONResponse

type GetOperation400JSONResponse struct {
	OperationIDBadRequestJSONResponse
}

func (GetOperation400JSONResponse) VisitGetOperationResponse

func (response GetOperation400JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation401JSONResponse

type GetOperation401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetOperation401JSONResponse) VisitGetOperationResponse

func (response GetOperation401JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation403JSONResponse

type GetOperation403JSONResponse struct {
	ScopeOverrideForbiddenJSONResponse
}

func (GetOperation403JSONResponse) VisitGetOperationResponse

func (response GetOperation403JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation404JSONResponse

type GetOperation404JSONResponse struct{ NotFoundJSONResponse }

func (GetOperation404JSONResponse) VisitGetOperationResponse

func (response GetOperation404JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation422JSONResponse

type GetOperation422JSONResponse struct{ OperationFailedJSONResponse }

func (GetOperation422JSONResponse) VisitGetOperationResponse

func (response GetOperation422JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperation503JSONResponse

type GetOperation503JSONResponse struct{ UnavailableErrorJSONResponse }

func (GetOperation503JSONResponse) VisitGetOperationResponse

func (response GetOperation503JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error

type GetOperationRequestObject

type GetOperationRequestObject struct {
	OperationId OperationID `json:"operation_id"`
}

type GetOperationResponseObject

type GetOperationResponseObject interface {
	VisitGetOperationResponse(w http.ResponseWriter) error
}

type GetReady200JSONResponse

type GetReady200JSONResponse ReadyResponse

func (GetReady200JSONResponse) VisitGetReadyResponse

func (response GetReady200JSONResponse) VisitGetReadyResponse(w http.ResponseWriter) error

type GetReady503JSONResponse

type GetReady503JSONResponse ReadyResponse

func (GetReady503JSONResponse) VisitGetReadyResponse

func (response GetReady503JSONResponse) VisitGetReadyResponse(w http.ResponseWriter) error

type GetReadyRequestObject

type GetReadyRequestObject struct {
}

type GetReadyResponseObject

type GetReadyResponseObject interface {
	VisitGetReadyResponse(w http.ResponseWriter) error
}

type HealthResponse

type HealthResponse struct {
	Service string               `json:"service"`
	Status  HealthResponseStatus `json:"status"`
}

HealthResponse defines model for HealthResponse.

type HealthResponseStatus

type HealthResponseStatus string

HealthResponseStatus defines model for HealthResponse.Status.

const (
	Ok HealthResponseStatus = "ok"
)

Defines values for HealthResponseStatus.

type IngestKnowledge200JSONResponse

type IngestKnowledge200JSONResponse IngestResult

func (IngestKnowledge200JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge200JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledge400JSONResponse

type IngestKnowledge400JSONResponse struct{ JSONBodyBadRequestJSONResponse }

func (IngestKnowledge400JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge400JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledge401JSONResponse

type IngestKnowledge401JSONResponse struct{ UnauthorizedJSONResponse }

func (IngestKnowledge401JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge401JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledge403JSONResponse

type IngestKnowledge403JSONResponse struct {
	ScopeOverrideForbiddenJSONResponse
}

func (IngestKnowledge403JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge403JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledge422JSONResponse

type IngestKnowledge422JSONResponse struct{ OperationFailedJSONResponse }

func (IngestKnowledge422JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge422JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledge503JSONResponse

type IngestKnowledge503JSONResponse struct{ UnavailableErrorJSONResponse }

func (IngestKnowledge503JSONResponse) VisitIngestKnowledgeResponse

func (response IngestKnowledge503JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error

type IngestKnowledgeJSONRequestBody

type IngestKnowledgeJSONRequestBody = IngestRequest

IngestKnowledgeJSONRequestBody defines body for IngestKnowledge for application/json ContentType.

type IngestKnowledgeRequestObject

type IngestKnowledgeRequestObject struct {
	Body *IngestKnowledgeJSONRequestBody
}

type IngestKnowledgeResponseObject

type IngestKnowledgeResponseObject interface {
	VisitIngestKnowledgeResponse(w http.ResponseWriter) error
}

type IngestRequest

type IngestRequest struct {
	// Content Text already obtained by the caller. Supply exactly one of content or uri.
	Content        *string `json:"content,omitempty"`
	IdempotencyKey *string `json:"idempotency_key,omitempty"`
	MediaType      *string `json:"media_type,omitempty"`

	// Origin Source identity hint for supplied content, such as its original URL. Not fetched.
	Origin *string `json:"origin,omitempty"`

	// Uri URI string stored as reference text, without downloading the document. Use content for document text; supply exactly one of content or uri.
	Uri *string `json:"uri,omitempty"`
}

IngestRequest defines model for IngestRequest.

type IngestResult

type IngestResult struct {
	OperationId string             `json:"operation_id"`
	Retrieval   *RetrievalStatus   `json:"retrieval,omitempty"`
	Status      IngestResultStatus `json:"status"`
}

IngestResult defines model for IngestResult.

type IngestResultStatus

type IngestResultStatus string

IngestResultStatus defines model for IngestResult.Status.

const (
	IngestResultStatusCompleted IngestResultStatus = "completed"
	IngestResultStatusFailed    IngestResultStatus = "failed"
	IngestResultStatusQueued    IngestResultStatus = "queued"
	IngestResultStatusRunning   IngestResultStatus = "running"
)

Defines values for IngestResultStatus.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type JSONBodyBadRequest

type JSONBodyBadRequest = ErrorResponse

JSONBodyBadRequest defines model for JSONBodyBadRequest.

type JSONBodyBadRequestJSONResponse

type JSONBodyBadRequestJSONResponse ErrorResponse

type MaintenanceWarning added in v0.6.0

type MaintenanceWarning struct {
	Code MaintenanceWarningCode `json:"code"`

	// Path Safe relative identifier, additionally limited to 2048 UTF-8 bytes.
	Path string `json:"path"`

	// Target Safe relative identifier when available; no URL or arbitrary message.
	Target *string `json:"target,omitempty"`
}

MaintenanceWarning defines model for MaintenanceWarning.

type MaintenanceWarningCode added in v0.6.0

type MaintenanceWarningCode string

MaintenanceWarningCode defines model for MaintenanceWarning.Code.

const (
	CatalogDependencyRejected MaintenanceWarningCode = "catalog.dependency_rejected"
	CitationUnknownSource     MaintenanceWarningCode = "citation.unknown_source"
	LinkOriginalUnresolved    MaintenanceWarningCode = "link.original_unresolved"
)

Defines values for MaintenanceWarningCode.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound = ErrorResponse

NotFound defines model for NotFound.

type NotFoundJSONResponse

type NotFoundJSONResponse ErrorResponse

type OKFAttester added in v0.3.0

type OKFAttester struct {
	Extensions *OKFExtensions `json:"extensions,omitempty"`
	Resource   string         `json:"resource"`
}

OKFAttester defines model for OKFAttester.

type OKFExecutor added in v0.3.0

type OKFExecutor struct {
	Extensions *OKFExtensions `json:"extensions,omitempty"`
	Receipt    *[]string      `json:"receipt,omitempty"`
	Resource   string         `json:"resource"`
}

OKFExecutor defines model for OKFExecutor.

type OKFExtensions added in v0.3.0

type OKFExtensions map[string]interface{}

OKFExtensions defines model for OKFExtensions.

type OKFGeneration added in v0.3.0

type OKFGeneration struct {
	At         *time.Time     `json:"at,omitempty"`
	By         string         `json:"by"`
	Extensions *OKFExtensions `json:"extensions,omitempty"`
}

OKFGeneration defines model for OKFGeneration.

type OKFMetadata added in v0.3.0

type OKFMetadata struct {
	Attester        *OKFAttester                `json:"attester,omitempty"`
	Computation     *string                     `json:"computation,omitempty"`
	Description     *string                     `json:"description,omitempty"`
	EffectiveStatus *OKFMetadataEffectiveStatus `json:"effective_status,omitempty"`
	Executor        *OKFExecutor                `json:"executor,omitempty"`
	Extensions      *OKFExtensions              `json:"extensions,omitempty"`
	Generated       *OKFGeneration              `json:"generated,omitempty"`
	Parameters      *[]OKFParameter             `json:"parameters,omitempty"`
	Resource        *string                     `json:"resource,omitempty"`
	Runtime         *string                     `json:"runtime,omitempty"`
	Sources         *[]OKFSource                `json:"sources,omitempty"`
	Stale           *bool                       `json:"stale,omitempty"`
	StaleAfter      *time.Time                  `json:"stale_after,omitempty"`
	Status          *OKFMetadataStatus          `json:"status,omitempty"`
	Tags            *[]string                   `json:"tags,omitempty"`
	Title           *string                     `json:"title,omitempty"`
	TrustTier       *OKFMetadataTrustTier       `json:"trust_tier,omitempty"`
	Type            string                      `json:"type"`
	UsageWindow     *OKFUsageWindow             `json:"usage_window,omitempty"`
	Verified        *[]OKFVerification          `json:"verified,omitempty"`
}

OKFMetadata defines model for OKFMetadata.

type OKFMetadataEffectiveStatus added in v0.3.0

type OKFMetadataEffectiveStatus string

OKFMetadataEffectiveStatus defines model for OKFMetadata.EffectiveStatus.

const (
	OKFMetadataEffectiveStatusDeprecated OKFMetadataEffectiveStatus = "deprecated"
	OKFMetadataEffectiveStatusDraft      OKFMetadataEffectiveStatus = "draft"
	OKFMetadataEffectiveStatusStable     OKFMetadataEffectiveStatus = "stable"
)

Defines values for OKFMetadataEffectiveStatus.

type OKFMetadataStatus added in v0.3.0

type OKFMetadataStatus string

OKFMetadataStatus defines model for OKFMetadata.Status.

const (
	OKFMetadataStatusDeprecated OKFMetadataStatus = "deprecated"
	OKFMetadataStatusDraft      OKFMetadataStatus = "draft"
	OKFMetadataStatusStable     OKFMetadataStatus = "stable"
)

Defines values for OKFMetadataStatus.

type OKFMetadataTrustTier added in v0.3.0

type OKFMetadataTrustTier string

OKFMetadataTrustTier defines model for OKFMetadata.TrustTier.

const (
	HumanReviewed    OKFMetadataTrustTier = "human-reviewed"
	MachineConfirmed OKFMetadataTrustTier = "machine-confirmed"
	Unverified       OKFMetadataTrustTier = "unverified"
)

Defines values for OKFMetadataTrustTier.

type OKFParameter added in v0.3.0

type OKFParameter struct {
	Extensions *OKFExtensions `json:"extensions,omitempty"`
	Name       string         `json:"name"`
	Required   bool           `json:"required"`
	Type       string         `json:"type"`
}

OKFParameter defines model for OKFParameter.

type OKFSource added in v0.3.0

type OKFSource struct {
	Author       *string         `json:"author,omitempty"`
	Extensions   *OKFExtensions  `json:"extensions,omitempty"`
	Id           *string         `json:"id,omitempty"`
	LastModified *time.Time      `json:"last_modified,omitempty"`
	Resource     string          `json:"resource"`
	Title        *string         `json:"title,omitempty"`
	UsageCount   *uint64         `json:"usage_count,omitempty"`
	UsageWindow  *OKFUsageWindow `json:"usage_window,omitempty"`
}

OKFSource defines model for OKFSource.

type OKFUsageWindow added in v0.3.0

type OKFUsageWindow struct {
	Extensions *OKFExtensions `json:"extensions,omitempty"`
	From       time.Time      `json:"from"`
	To         time.Time      `json:"to"`
}

OKFUsageWindow defines model for OKFUsageWindow.

type OKFVerification added in v0.3.0

type OKFVerification struct {
	At         time.Time      `json:"at"`
	By         string         `json:"by"`
	Extensions *OKFExtensions `json:"extensions,omitempty"`
}

OKFVerification defines model for OKFVerification.

type OperationContextReport added in v0.6.0

type OperationContextReport struct {
	Budget *ContextBudget `json:"budget,omitempty"`

	// CandidateCount Unique ordinary candidates eligible under the factual page allowance, excluding controls and duplicates. Not a wiki-wide omission count.
	CandidateCount *DiagnosticCount `json:"candidate_count,omitempty"`

	// CatalogCount Number of catalogs observed when inspection succeeded.
	CatalogCount *DiagnosticCount `json:"catalog_count,omitempty"`

	// EntriesOmitted Candidate entries omitted from this diagnostic list by its bounds; distinct from budget exclusions.
	EntriesOmitted DiagnosticCount               `json:"entries_omitted"`
	Outcome        OperationContextReportOutcome `json:"outcome"`
	Pages          *[]ContextPage                `json:"pages,omitempty"`

	// VectorProjection Check observed during the producing attempt, never current projection readiness at poll time.
	VectorProjection *VectorProjectionStatus       `json:"vector_projection,omitempty"`
	Version          OperationContextReportVersion `json:"version"`
	WorkAttempt      DiagnosticCount               `json:"work_attempt"`
}

OperationContextReport One immutable snapshot per producing work attempt; at most 32 KiB. A crash before finalization can leave it absent.

type OperationContextReportOutcome added in v0.6.0

type OperationContextReportOutcome string

OperationContextReportOutcome defines model for OperationContextReport.Outcome.

const (
	Assembled       OperationContextReportOutcome = "assembled"
	AssemblyFailed  OperationContextReportOutcome = "assembly_failed"
	SelectionFailed OperationContextReportOutcome = "selection_failed"
)

Defines values for OperationContextReportOutcome.

type OperationContextReportVersion added in v0.6.0

type OperationContextReportVersion int

OperationContextReportVersion defines model for OperationContextReport.Version.

const (
	OperationContextReportVersionN1 OperationContextReportVersion = 1
)

Defines values for OperationContextReportVersion.

type OperationCorrectionReport added in v0.6.0

type OperationCorrectionReport struct {
	Corrections    *int                                     `json:"corrections,omitempty"`
	DeadlineNanos  int64                                    `json:"deadline_nanos"`
	MaxCorrections int                                      `json:"max_corrections"`
	MaxOutputBytes int                                      `json:"max_output_bytes"`
	Outcome        OperationCorrectionReportOutcome         `json:"outcome"`
	OutputBytes    *int                                     `json:"output_bytes,omitempty"`
	Turns          *int                                     `json:"turns,omitempty"`
	ValidationCode *OperationCorrectionReportValidationCode `json:"validation_code,omitempty"`
	Version        OperationCorrectionReportVersion         `json:"version"`
	WorkAttempt    DiagnosticCount                          `json:"work_attempt"`
}

OperationCorrectionReport One immutable report per producing work attempt; at most 1 KiB. Counters measure actual generation turns and accepted-prefix output text across all turns. Unavailable counters are absent. A crash before finalization can leave the report absent.

type OperationCorrectionReportOutcome added in v0.6.0

type OperationCorrectionReportOutcome string

OperationCorrectionReportOutcome defines model for OperationCorrectionReport.Outcome.

const (
	OperationCorrectionReportOutcomeAccepted       OperationCorrectionReportOutcome = "accepted"
	OperationCorrectionReportOutcomeCanceled       OperationCorrectionReportOutcome = "canceled"
	OperationCorrectionReportOutcomeDeadline       OperationCorrectionReportOutcome = "deadline"
	OperationCorrectionReportOutcomeExhausted      OperationCorrectionReportOutcome = "exhausted"
	OperationCorrectionReportOutcomeOutputLimit    OperationCorrectionReportOutcome = "output_limit"
	OperationCorrectionReportOutcomeProviderFailed OperationCorrectionReportOutcome = "provider_failed"
	OperationCorrectionReportOutcomeUnavailable    OperationCorrectionReportOutcome = "unavailable"
)

Defines values for OperationCorrectionReportOutcome.

type OperationCorrectionReportValidationCode added in v0.6.0

type OperationCorrectionReportValidationCode string

OperationCorrectionReportValidationCode defines model for OperationCorrectionReport.ValidationCode.

const (
	HierarchyPlanInvalid    OperationCorrectionReportValidationCode = "hierarchy_plan_invalid"
	SourcePlanInvalid       OperationCorrectionReportValidationCode = "source_plan_invalid"
	StructuredOutputInvalid OperationCorrectionReportValidationCode = "structured_output_invalid"
)

Defines values for OperationCorrectionReportValidationCode.

type OperationCorrectionReportVersion added in v0.6.0

type OperationCorrectionReportVersion int

OperationCorrectionReportVersion defines model for OperationCorrectionReport.Version.

const (
	OperationCorrectionReportVersionN1 OperationCorrectionReportVersion = 1
)

Defines values for OperationCorrectionReportVersion.

type OperationDetails added in v0.6.0

type OperationDetails struct {
	// Context One immutable snapshot per producing work attempt; at most 32 KiB. A crash before finalization can leave it absent.
	Context *OperationContextReport `json:"context,omitempty"`

	// Correction One immutable report per producing work attempt; at most 1 KiB. Counters measure actual generation turns and accepted-prefix output text across all turns. Unavailable counters are absent. A crash before finalization can leave the report absent.
	Correction       *OperationCorrectionReport `json:"correction,omitempty"`
	Execution        *OperationExecutionDetails `json:"execution,omitempty"`
	Plan             *OperationPlanSummary      `json:"plan,omitempty"`
	Retrieval        *RetrievalReport           `json:"retrieval,omitempty"`
	RetrievalAttempt *DiagnosticCount           `json:"retrieval_attempt,omitempty"`
	Warnings         *[]MaintenanceWarning      `json:"warnings,omitempty"`
	WarningsOmitted  *DiagnosticCount           `json:"warnings_omitted,omitempty"`
}

OperationDetails Bounded stored facts. Missing evidence is unavailable. Reads do not rerun selection or inference. Details serialize to less than 96 KiB.

type OperationExecutionDetails added in v0.6.0

type OperationExecutionDetails struct {
	// ApplyAttempt Existing canonical apply-attempt counter, not inference calls.
	ApplyAttempt     DiagnosticCount `json:"apply_attempt"`
	ManualRetryCount DiagnosticCount `json:"manual_retry_count"`
	ReadyAt          *time.Time      `json:"ready_at,omitempty"`
	RetryAttempt     DiagnosticCount `json:"retry_attempt"`
	WorkAttempt      DiagnosticCount `json:"work_attempt"`
}

OperationExecutionDetails defines model for OperationExecutionDetails.

type OperationFailed

type OperationFailed = ErrorResponse

OperationFailed defines model for OperationFailed.

type OperationFailedJSONResponse

type OperationFailedJSONResponse ErrorResponse

type OperationID

type OperationID = string

OperationID defines model for OperationID.

type OperationIDBadRequest

type OperationIDBadRequest = ErrorResponse

OperationIDBadRequest defines model for OperationIDBadRequest.

type OperationIDBadRequestJSONResponse

type OperationIDBadRequestJSONResponse ErrorResponse

type OperationPlanSummary added in v0.6.0

type OperationPlanSummary struct {
	// Digest Stored validated/staged SHA-256 digest, without edits or rationale.
	Digest string `json:"digest"`

	// FileCount Stored number of staged files when known. Legacy digest-only rows omit it.
	FileCount *DiagnosticCount `json:"file_count,omitempty"`
}

OperationPlanSummary defines model for OperationPlanSummary.

type OperationResult

type OperationResult struct {
	// Details Bounded stored facts. Missing evidence is unavailable. Reads do not rerun selection or inference. Details serialize to less than 96 KiB.
	Details   *OperationDetails     `json:"details,omitempty"`
	Failure   *Failure              `json:"failure,omitempty"`
	Id        string                `json:"id"`
	Retrieval *RetrievalStatus      `json:"retrieval,omitempty"`
	Status    OperationResultStatus `json:"status"`
	UpdatedAt time.Time             `json:"updated_at"`
}

OperationResult defines model for OperationResult.

type OperationResultStatus

type OperationResultStatus string

OperationResultStatus defines model for OperationResult.Status.

const (
	OperationResultStatusCompleted OperationResultStatus = "completed"
	OperationResultStatusFailed    OperationResultStatus = "failed"
	OperationResultStatusQueued    OperationResultStatus = "queued"
	OperationResultStatusRunning   OperationResultStatus = "running"
)

Defines values for OperationResultStatus.

type QueryStringBadRequest

type QueryStringBadRequest = ErrorResponse

QueryStringBadRequest defines model for QueryStringBadRequest.

type QueryStringBadRequestJSONResponse

type QueryStringBadRequestJSONResponse ErrorResponse

type ReadyResponse

type ReadyResponse struct {
	// Scope Trusted scope reported only when the host is ready.
	Scope   *string             `json:"scope,omitempty"`
	Service string              `json:"service"`
	Status  ReadyResponseStatus `json:"status"`
}

ReadyResponse defines model for ReadyResponse.

type ReadyResponseStatus

type ReadyResponseStatus string

ReadyResponseStatus defines model for ReadyResponse.Status.

const (
	NotReady ReadyResponseStatus = "not_ready"
	Ready    ReadyResponseStatus = "ready"
)

Defines values for ReadyResponseStatus.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RetrievalReason added in v0.6.0

type RetrievalReason string

RetrievalReason defines model for RetrievalReason.

const (
	RetrievalReasonDeadline             RetrievalReason = "deadline"
	RetrievalReasonDimensionMismatch    RetrievalReason = "dimension_mismatch"
	RetrievalReasonInputLimit           RetrievalReason = "input_limit"
	RetrievalReasonInvalidConfiguration RetrievalReason = "invalid_configuration"
	RetrievalReasonInvalidInput         RetrievalReason = "invalid_input"
	RetrievalReasonInvalidResponse      RetrievalReason = "invalid_response"
	RetrievalReasonModelMismatch        RetrievalReason = "model_mismatch"
	RetrievalReasonProjectionCapacity   RetrievalReason = "projection_capacity"
	RetrievalReasonProjectionDrift      RetrievalReason = "projection_drift"
	RetrievalReasonProjectionNotReady   RetrievalReason = "projection_not_ready"
	RetrievalReasonResponseLimit        RetrievalReason = "response_limit"
	RetrievalReasonUnavailable          RetrievalReason = "unavailable"
)

Defines values for RetrievalReason.

type RetrievalReport added in v0.6.0

type RetrievalReport struct {
	Effective          RetrievalReportEffective `json:"effective"`
	FusedCandidates    int                      `json:"fused_candidates"`
	IndexOmittedChunks DiagnosticCount          `json:"index_omitted_chunks"`
	IndexOmittedRunes  DiagnosticCount          `json:"index_omitted_runes"`
	LexicalCandidates  int                      `json:"lexical_candidates"`

	// ModelSpace Non-secret fingerprint, without model endpoint or credentials.
	ModelSpace        *string                  `json:"model_space,omitempty"`
	QueryOmittedRunes DiagnosticCount          `json:"query_omitted_runes"`
	Reason            *RetrievalReason         `json:"reason,omitempty"`
	Requested         RetrievalReportRequested `json:"requested"`
	ScannedChunks     int                      `json:"scanned_chunks"`
	VectorCandidates  int                      `json:"vector_candidates"`
}

RetrievalReport defines model for RetrievalReport.

type RetrievalReportEffective added in v0.6.0

type RetrievalReportEffective string

RetrievalReportEffective defines model for RetrievalReport.Effective.

const (
	RetrievalReportEffectiveDegraded RetrievalReportEffective = "degraded"
	RetrievalReportEffectiveFailed   RetrievalReportEffective = "failed"
	RetrievalReportEffectiveHybrid   RetrievalReportEffective = "hybrid"
	RetrievalReportEffectiveLexical  RetrievalReportEffective = "lexical"
)

Defines values for RetrievalReportEffective.

type RetrievalReportRequested added in v0.6.0

type RetrievalReportRequested string

RetrievalReportRequested defines model for RetrievalReport.Requested.

const (
	RetrievalReportRequestedHybrid  RetrievalReportRequested = "hybrid"
	RetrievalReportRequestedLexical RetrievalReportRequested = "lexical"
)

Defines values for RetrievalReportRequested.

type RetrievalStatus added in v0.6.0

type RetrievalStatus struct {
	Effective RetrievalStatusEffective `json:"effective"`
	Reason    *RetrievalStatusReason   `json:"reason,omitempty"`
}

RetrievalStatus defines model for RetrievalStatus.

type RetrievalStatusEffective added in v0.6.0

type RetrievalStatusEffective string

RetrievalStatusEffective defines model for RetrievalStatus.Effective.

const (
	RetrievalStatusEffectiveDegraded RetrievalStatusEffective = "degraded"
	RetrievalStatusEffectiveFailed   RetrievalStatusEffective = "failed"
	RetrievalStatusEffectiveHybrid   RetrievalStatusEffective = "hybrid"
	RetrievalStatusEffectiveLexical  RetrievalStatusEffective = "lexical"
)

Defines values for RetrievalStatusEffective.

type RetrievalStatusReason added in v0.6.0

type RetrievalStatusReason string

RetrievalStatusReason defines model for RetrievalStatus.Reason.

const (
	Deadline             RetrievalStatusReason = "deadline"
	DimensionMismatch    RetrievalStatusReason = "dimension_mismatch"
	InputLimit           RetrievalStatusReason = "input_limit"
	InvalidConfiguration RetrievalStatusReason = "invalid_configuration"
	InvalidInput         RetrievalStatusReason = "invalid_input"
	InvalidResponse      RetrievalStatusReason = "invalid_response"
	ModelMismatch        RetrievalStatusReason = "model_mismatch"
	ProjectionCapacity   RetrievalStatusReason = "projection_capacity"
	ProjectionDrift      RetrievalStatusReason = "projection_drift"
	ProjectionNotReady   RetrievalStatusReason = "projection_not_ready"
	ResponseLimit        RetrievalStatusReason = "response_limit"
	Unavailable          RetrievalStatusReason = "unavailable"
)

Defines values for RetrievalStatusReason.

type RetrieveKnowledge200JSONResponse

type RetrieveKnowledge200JSONResponse RetrieveResult

func (RetrieveKnowledge200JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge200JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledge400JSONResponse

type RetrieveKnowledge400JSONResponse struct {
	QueryStringBadRequestJSONResponse
}

func (RetrieveKnowledge400JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge400JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledge401JSONResponse

type RetrieveKnowledge401JSONResponse struct{ UnauthorizedJSONResponse }

func (RetrieveKnowledge401JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge401JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledge403JSONResponse

type RetrieveKnowledge403JSONResponse struct {
	ScopeOverrideForbiddenJSONResponse
}

func (RetrieveKnowledge403JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge403JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledge422JSONResponse

type RetrieveKnowledge422JSONResponse struct{ OperationFailedJSONResponse }

func (RetrieveKnowledge422JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge422JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledge503JSONResponse

type RetrieveKnowledge503JSONResponse struct{ UnavailableErrorJSONResponse }

func (RetrieveKnowledge503JSONResponse) VisitRetrieveKnowledgeResponse

func (response RetrieveKnowledge503JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error

type RetrieveKnowledgeParams

type RetrieveKnowledgeParams struct {
	// Query Free-text retrieval query.
	Query RetrieveQuery `form:"query" json:"query"`

	// Source Optional repeatable source identity filter. Empty means all sources and curated pages.
	Source *RetrieveSource `form:"source,omitempty" json:"source,omitempty"`
}

RetrieveKnowledgeParams defines parameters for RetrieveKnowledge.

type RetrieveKnowledgeRequestObject

type RetrieveKnowledgeRequestObject struct {
	Params RetrieveKnowledgeParams
}

type RetrieveKnowledgeResponseObject

type RetrieveKnowledgeResponseObject interface {
	VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
}

type RetrieveQuery

type RetrieveQuery = string

RetrieveQuery defines model for RetrieveQuery.

type RetrieveResult

type RetrieveResult struct {
	Citations *[]Citation      `json:"citations,omitempty"`
	Evidence  []EvidenceItem   `json:"evidence"`
	Query     string           `json:"query"`
	Retrieval *RetrievalStatus `json:"retrieval,omitempty"`
}

RetrieveResult defines model for RetrieveResult.

type RetrieveSource added in v0.3.0

type RetrieveSource = []string

RetrieveSource defines model for RetrieveSource.

type ScopeOverrideForbidden

type ScopeOverrideForbidden = ErrorResponse

ScopeOverrideForbidden defines model for ScopeOverrideForbidden.

type ScopeOverrideForbiddenJSONResponse

type ScopeOverrideForbiddenJSONResponse ErrorResponse

type ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {
	// Liveness probe
	// (GET /healthz)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// Readiness probe
	// (GET /readyz)
	GetReady(w http.ResponseWriter, r *http.Request)
	// Submit supplied text or a URI reference to the trusted ingest pipeline
	// (POST /v1/ingest)
	IngestKnowledge(w http.ResponseWriter, r *http.Request)
	// Read one durable Knowl operation status
	// (GET /v1/operations/{operation_id})
	GetOperation(w http.ResponseWriter, r *http.Request, operationId OperationID)
	// Retrieve bounded evidence from the trusted Knowl scope
	// (GET /v1/retrieve)
	RetrieveKnowledge(w http.ResponseWriter, r *http.Request, params RetrieveKnowledgeParams)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetOperation

func (siw *ServerInterfaceWrapper) GetOperation(w http.ResponseWriter, r *http.Request)

GetOperation operation middleware

func (*ServerInterfaceWrapper) GetReady

func (siw *ServerInterfaceWrapper) GetReady(w http.ResponseWriter, r *http.Request)

GetReady operation middleware

func (*ServerInterfaceWrapper) IngestKnowledge

func (siw *ServerInterfaceWrapper) IngestKnowledge(w http.ResponseWriter, r *http.Request)

IngestKnowledge operation middleware

func (*ServerInterfaceWrapper) RetrieveKnowledge

func (siw *ServerInterfaceWrapper) RetrieveKnowledge(w http.ResponseWriter, r *http.Request)

RetrieveKnowledge operation middleware

type SourceDocument added in v0.3.0

type SourceDocument struct {
	DocumentId string `json:"document_id"`
	Revision   string `json:"revision"`
	SourceId   string `json:"source_id"`
	Uri        string `json:"uri"`
}

SourceDocument defines model for SourceDocument.

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Liveness probe
	// (GET /healthz)
	GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
	// Readiness probe
	// (GET /readyz)
	GetReady(ctx context.Context, request GetReadyRequestObject) (GetReadyResponseObject, error)
	// Submit supplied text or a URI reference to the trusted ingest pipeline
	// (POST /v1/ingest)
	IngestKnowledge(ctx context.Context, request IngestKnowledgeRequestObject) (IngestKnowledgeResponseObject, error)
	// Read one durable Knowl operation status
	// (GET /v1/operations/{operation_id})
	GetOperation(ctx context.Context, request GetOperationRequestObject) (GetOperationResponseObject, error)
	// Retrieve bounded evidence from the trusted Knowl scope
	// (GET /v1/retrieve)
	RetrieveKnowledge(ctx context.Context, request RetrieveKnowledgeRequestObject) (RetrieveKnowledgeResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized = ErrorResponse

Unauthorized defines model for Unauthorized.

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse struct {
	Body ErrorResponse

	Headers UnauthorizedResponseHeaders
}

type UnauthorizedResponseHeaders

type UnauthorizedResponseHeaders struct {
	WWWAuthenticate string
}

type UnavailableError

type UnavailableError = ErrorResponse

UnavailableError defines model for UnavailableError.

type UnavailableErrorJSONResponse

type UnavailableErrorJSONResponse ErrorResponse

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type VectorProjectionStatus added in v0.6.0

type VectorProjectionStatus struct {
	Reason *RetrievalReason            `json:"reason,omitempty"`
	State  VectorProjectionStatusState `json:"state"`
}

VectorProjectionStatus Check observed during the producing attempt, never current projection readiness at poll time.

type VectorProjectionStatusState added in v0.6.0

type VectorProjectionStatusState string

VectorProjectionStatusState defines model for VectorProjectionStatus.State.

const (
	VectorInvalid    VectorProjectionStatusState = "invalid"
	VectorNotChecked VectorProjectionStatusState = "not_checked"
	VectorReady      VectorProjectionStatusState = "ready"
)

Defines values for VectorProjectionStatusState.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL