ai

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ai provides a simple interface to interact with AI models. TODO: This is an early stage PoC package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ai

type Ai struct {
	Input  chan api.Message
	Output chan Notification
	// contains filtered or unexported fields
}

func New

func New(inferenceProvider api.InferenceProvider, tools []*api.Tool) *Ai

func (*Ai) InferenceAttributes added in v0.0.9

func (a *Ai) InferenceAttributes() api.InferenceAttributes

func (*Ai) Reset

func (a *Ai) Reset()

Reset resets the AI session, keeping the system prompt intact.

func (*Ai) Run

func (a *Ai) Run(ctx context.Context) (err error)

func (*Ai) Session

func (a *Ai) Session() *Session

type Notification

type Notification struct{}

type Session

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

func (*Session) HasMessages

func (s *Session) HasMessages() bool

func (*Session) IsRunning

func (s *Session) IsRunning() bool

func (*Session) Messages

func (s *Session) Messages() []api.Message

func (*Session) SystemPrompt

func (s *Session) SystemPrompt() api.Message

Jump to

Keyboard shortcuts

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