spec

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddProviderRequest

type AddProviderRequest struct {
	Provider inferenceSpec.ProviderName `path:"provider" required:"true"`
	Body     *AddProviderRequestBody
}

type AddProviderRequestBody

type AddProviderRequestBody struct {
	SDKType                  inferenceSpec.ProviderSDKType `json:"sdkType"`
	Origin                   string                        `json:"origin"`
	ChatCompletionPathPrefix string                        `json:"chatCompletionPathPrefix"`
	APIKeyHeaderKey          string                        `json:"apiKeyHeaderKey"`
	DefaultHeaders           map[string]string             `json:"defaultHeaders"`
}

type AddProviderResponse

type AddProviderResponse struct{}

type CompletionRequest

type CompletionRequest struct {
	Provider      inferenceSpec.ProviderName    `path:"provider"      required:"true"`
	ModelPresetID modelpresetSpec.ModelPresetID `path:"modelPresetID" required:"true"`

	Body *CompletionRequestBody

	OnStreamText     func(text string) error     `json:"-"`
	OnStreamThinking func(thinking string) error `json:"-"`
}

type CompletionRequestBody

type CompletionRequestBody struct {
	// Model configuration for this *call*. If nil, the aggregator can fall
	// back to the last non-nil ModelParam from History.
	ModelParam *inferenceSpec.ModelParam `json:"modelParam,omitempty"`

	// Past turns of the conversation, already persisted.
	History []conversationSpec.ConversationMessage `json:"history"`

	// New user turn to complete. Must have Role=user. Typically will have:
	//   - Attachments (ref attachments),
	//   - either:
	//       * pre-built InputUnion(s) in Inputs, or
	//       * just Messages + Attachments and let the aggregator build
	//         the InputUnion for this turn.
	Current conversationSpec.ConversationMessage `json:"current"`

	// ToolStoreChoices is the set of tool-store handles that should be enabled
	// for *this call*.
	//
	// The aggregator always hydrates ToolChoices from tool-store based on this
	// slice; it does NOT infer tools from History[i].ToolChoices or Current.ToolChoices.
	// (Those are persisted for UI/analytics only.)
	ToolStoreChoices []toolSpec.ToolStoreChoice `json:"toolStoreChoices,omitempty"`

	MCPContext     *mcpSpec.MCPConversationContext `json:"mcpContext,omitempty"`
	SkillSessionID string                          `json:"skillSessionID,omitempty"`
}

type CompletionResponse

type CompletionResponse struct {
	Body *CompletionResponseBody
}

type CompletionResponseBody

type CompletionResponseBody struct {
	InferenceResponse     *inferenceSpec.FetchCompletionResponse `json:"inferenceResponse,omitempty"`
	HydratedCurrentInputs []inferenceSpec.InputUnion             `json:"hydratedCurrentInputs,omitempty"`
}

type DeleteProviderRequest

type DeleteProviderRequest struct {
	Provider inferenceSpec.ProviderName `path:"provider" required:"true"`
}

type DeleteProviderResponse

type DeleteProviderResponse struct{}

type SetProviderAPIKeyRequest

type SetProviderAPIKeyRequest struct {
	Provider inferenceSpec.ProviderName `path:"provider" required:"true"`
	Body     *SetProviderAPIKeyRequestBody
}

type SetProviderAPIKeyRequestBody

type SetProviderAPIKeyRequestBody struct {
	APIKey string `json:"apiKey" required:"true"`
}

type SetProviderAPIKeyResponse

type SetProviderAPIKeyResponse struct{}

Jump to

Keyboard shortcuts

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