adviser

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package adviser contains AI-driven tea recommendation helpers and models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adviser

type Adviser interface {
	RecommendTea(ctx context.Context, teas []common.Tea, weather common.Weather, feelings string) (string, error)
	RecommendTeaStream(ctx context.Context, teas []common.Tea, weather common.Weather, feelings string, res chan<- string) error
	ContextScores(ctx context.Context, teas []string, weather common.Weather, day time.Weekday) (map[string]int, error)
	LoadPrompt() error
}

Adviser defines AI-powered tea recommendation and scoring capabilities.

func NewService

func NewService(client *openai.Client, log *logrus.Entry) Adviser

NewService constructs a new Adviser service.

type Feelings

type Feelings string

Feelings represent optional free-form feelings input that affects recommendations.

func (Feelings) NotEmpty

func (f Feelings) NotEmpty() bool

NotEmpty reports whether feelings string is not empty.

type Template

type Template struct {
	Teas      []common.Tea
	Additives []common.Tea
	Weather   common.Weather
	TimeOfDay string
	Feelings  Feelings
}

Template is a data container passed into prompt templates for AI requests.

Jump to

Keyboard shortcuts

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