response

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerResponse

type ConsumerResponse struct {
	ID              ids.ConsumerID           `json:"id"`
	GatewayID       ids.GatewayID            `json:"gateway_id"`
	Name            string                   `json:"name"`
	Type            string                   `json:"type"`
	Slug            string                   `json:"slug"`
	RoutingMode     string                   `json:"routing_mode"`
	LBConfig        *LBConfigResponse        `json:"lb_config,omitempty"`
	Headers         map[string]string        `json:"headers,omitempty"`
	Active          bool                     `json:"active"`
	RegistryIDs     []ids.RegistryID         `json:"registry_ids"`
	RegistryWeights []RegistryWeightResponse `json:"registry_weights,omitempty"`
	RoleIDs         []ids.RoleID             `json:"role_ids"`
	AuthIDs         []ids.AuthID             `json:"auth_ids"`
	Fallback        *FallbackResponse        `json:"fallback,omitempty"`
	ModelPolicies   []ModelPolicyResponse    `json:"model_policies,omitempty"`
	Toolkit         []ToolkitEntryResponse   `json:"toolkit,omitempty"`
	FailMode        string                   `json:"fail_mode,omitempty"`
	CreatedAt       time.Time                `json:"created_at"`
	UpdatedAt       time.Time                `json:"updated_at"`
}

func FromConsumer

func FromConsumer(c *domain.Consumer) ConsumerResponse

type EmbeddingAuthResponse

type EmbeddingAuthResponse struct {
	APIKey        string `json:"api_key,omitempty"` // #nosec G117
	HeaderName    string `json:"header_name,omitempty"`
	HeaderValue   string `json:"header_value,omitempty"`
	ParamName     string `json:"param_name,omitempty"`
	ParamValue    string `json:"param_value,omitempty"`
	ParamLocation string `json:"param_location,omitempty"`
}

type EmbeddingConfigResponse

type EmbeddingConfigResponse struct {
	Provider string                 `json:"provider"`
	Model    string                 `json:"model"`
	Auth     *EmbeddingAuthResponse `json:"auth,omitempty"`
}

type FallbackBudgetResponse

type FallbackBudgetResponse struct {
	MaxAttempts       int   `json:"max_attempts"`
	MaxTotalLatencyMs int64 `json:"max_total_latency_ms,omitempty"`
}

type FallbackResponse

type FallbackResponse struct {
	Enabled  bool                   `json:"enabled"`
	Triggers []string               `json:"triggers,omitempty"`
	Budget   FallbackBudgetResponse `json:"budget"`
	Chain    []ids.RegistryID       `json:"chain"`
}

type LBConfigResponse

type LBConfigResponse struct {
	Enabled         bool                     `json:"enabled"`
	Algorithm       string                   `json:"algorithm,omitempty"`
	PoolAlias       string                   `json:"pool_alias,omitempty"`
	Members         []LBPoolMemberResponse   `json:"members,omitempty"`
	EmbeddingConfig *EmbeddingConfigResponse `json:"embedding_config,omitempty"`
}

type LBPoolMemberResponse

type LBPoolMemberResponse struct {
	RegistryID ids.RegistryID `json:"registry_id"`
	Models     []string       `json:"models,omitempty"`
}

type ListConsumerResponse

type ListConsumerResponse struct {
	Items []ConsumerResponse `json:"items"`
	Page  int                `json:"page"`
	Size  int                `json:"size"`
	Total int                `json:"total"`
}

type ModelPolicyResponse

type ModelPolicyResponse struct {
	RegistryID ids.RegistryID `json:"registry_id"`
	Allowed    []string       `json:"allowed,omitempty"`
	Default    string         `json:"default,omitempty"`
}

type RegistryWeightResponse

type RegistryWeightResponse struct {
	RegistryID ids.RegistryID `json:"registry_id"`
	Weight     int            `json:"weight"`
}

type ToolkitEntryResponse

type ToolkitEntryResponse struct {
	RegistryID ids.RegistryID `json:"registry_id"`
	Tool       string         `json:"tool,omitempty"`
	Prompt     string         `json:"prompt,omitempty"`
	Resource   string         `json:"resource,omitempty"`
	ExposeAs   string         `json:"expose_as,omitempty"`
}

Jump to

Keyboard shortcuts

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