spec

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MPL-2.0 Imports: 3 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 inferencegoSpec.ProviderName `path:"provider" required:"true"`
	Body     *AddProviderRequestBody
}

type AddProviderRequestBody

type AddProviderRequestBody struct {
	SDKType                  inferencegoSpec.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 inferencegoSpec.ProviderName `path:"provider" 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 *inferencegoSpec.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"`
}

type CompletionResponse

type CompletionResponse struct {
	Body *CompletionResponseBody
}

type CompletionResponseBody

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

type DeleteProviderRequest

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

type DeleteProviderResponse

type DeleteProviderResponse struct{}

type SetProviderAPIKeyRequest

type SetProviderAPIKeyRequest struct {
	Provider inferencegoSpec.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