ai

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 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

View Source
var FileList = &fileList{
	ToolInfo: schema.ToolInfo{
		Name: "file_list",
		Desc: "List files in the provided directory or the current working directory if none is provided." +
			"Returns a JSON representation of the files, including their names and metadata.",
		ParamsOneOf: schema.NewParamsOneOfByParams(map[string]*schema.ParameterInfo{
			"directory": {
				Type:     schema.String,
				Desc:     "The directory to list files from. If not provided, the current working directory will be used.",
				Required: false,
			},
		}),
	},
}

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(llm model.ToolCallingChatModel, cfg *config.Config) *Ai

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) 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