titlegen

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package titlegen generates short product-facing session titles through the independently configured utility-model route.

Index

Constants

View Source
const (
	CodeUnavailable   = "utility_model_unavailable"
	CodeTimeout       = "title_generation_timeout"
	CodeRequestFailed = "title_request_failed"
	CodeInvalidOutput = "invalid_title_output"
)

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) string

func PublicError

func PublicError(code string) string

Types

type Generator

type Generator interface {
	Generate(context.Context, string) (Result, error)
}

type Result

type Result struct {
	Title    string
	Provider string
	Model    string
}

type Service

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

func New

func New(providers *provider.Store) *Service

func (*Service) Generate

func (s *Service) Generate(ctx context.Context, prompt string) (Result, error)

Jump to

Keyboard shortcuts

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