settings

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxContextLoadTime = 24 * 60
	DefaultMaxInboxItems      = 50
	DefaultLanguage           = "auto"
	DefaultReasoningEffort    = "medium"
)

Variables

View Source
var ErrInvalidModelRef = errors.New("invalid model reference")
View Source
var ErrModelIDAmbiguous = errors.New("model_id is ambiguous across providers")
View Source
var ErrPersonalBotGuestAccessUnsupported = errors.New("personal bots do not support guest access")

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(log *slog.Logger, queries *sqlc.Queries) *Service

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, botID string) error

func (*Service) GetBot

func (s *Service) GetBot(ctx context.Context, botID string) (Settings, error)

func (*Service) UpsertBot

func (s *Service) UpsertBot(ctx context.Context, botID string, req UpsertRequest) (Settings, error)

type Settings

type Settings struct {
	ChatModelID        string `json:"chat_model_id"`
	MemoryModelID      string `json:"memory_model_id"`
	EmbeddingModelID   string `json:"embedding_model_id"`
	SearchProviderID   string `json:"search_provider_id"`
	MaxContextLoadTime int    `json:"max_context_load_time"`
	MaxContextTokens   int    `json:"max_context_tokens"`
	MaxInboxItems      int    `json:"max_inbox_items"`
	Language           string `json:"language"`
	AllowGuest         bool   `json:"allow_guest"`
	ReasoningEnabled   bool   `json:"reasoning_enabled"`
	ReasoningEffort    string `json:"reasoning_effort"`
}

type UpsertRequest

type UpsertRequest struct {
	ChatModelID        string  `json:"chat_model_id,omitempty"`
	MemoryModelID      string  `json:"memory_model_id,omitempty"`
	EmbeddingModelID   string  `json:"embedding_model_id,omitempty"`
	SearchProviderID   string  `json:"search_provider_id,omitempty"`
	MaxContextLoadTime *int    `json:"max_context_load_time,omitempty"`
	MaxContextTokens   *int    `json:"max_context_tokens,omitempty"`
	MaxInboxItems      *int    `json:"max_inbox_items,omitempty"`
	Language           string  `json:"language,omitempty"`
	AllowGuest         *bool   `json:"allow_guest,omitempty"`
	ReasoningEnabled   *bool   `json:"reasoning_enabled,omitempty"`
	ReasoningEffort    *string `json:"reasoning_effort,omitempty"`
}

Jump to

Keyboard shortcuts

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