chatservice

package
v1.0.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactHistory

func CompactHistory(ctx context.Context, exec ChainExecutor, chain *taskengine.TaskChainDefinition, history []taskengine.Message, keep int) ([]taskengine.Message, error)

Types

type ChainExecutor

type ChainExecutor interface {
	Execute(ctx context.Context, chain *taskengine.TaskChainDefinition, input any, inputType taskengine.DataType) (any, taskengine.DataType, []taskengine.CapturedStateUnit, error)
}

type Manager

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

func NewManager

func NewManager(workspaceID string) *Manager

func (*Manager) AddInstruction

func (m *Manager) AddInstruction(ctx context.Context, tx libdb.Exec, id string, sendAt time.Time, message string) error

func (*Manager) AppendMessage

func (m *Manager) AppendMessage(_ context.Context, messages []taskengine.Message, sendAt time.Time, message string, role string) ([]taskengine.Message, error)

func (*Manager) ClearSession

func (m *Manager) ClearSession(ctx context.Context, tx libdb.Exec, sessionID string) error

func (*Manager) DeleteMessage

func (m *Manager) DeleteMessage(ctx context.Context, tx libdb.Exec, sessionID string, messageID string) error

func (*Manager) DeleteSession

func (m *Manager) DeleteSession(ctx context.Context, tx libdb.Exec, sessionID string, identity string) error

func (*Manager) ListMessages

func (m *Manager) ListMessages(ctx context.Context, tx libdb.Exec, subjectID string) ([]taskengine.Message, error)

func (*Manager) PersistDiff

func (m *Manager) PersistDiff(ctx context.Context, tx libdb.Exec, subjectID string, hist []taskengine.Message) error

func (*Manager) RenameSession

func (m *Manager) RenameSession(ctx context.Context, tx libdb.Exec, sessionID string, name string) error

Jump to

Keyboard shortcuts

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