chat

package
v0.0.0-...-d80aada Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package chat provides improved chat functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller provides a cleaner terminal chat experience

func NewController

func NewController(session Session, output io.Writer) (*Controller, error)

NewController creates a chat controller

func (*Controller) Run

func (c *Controller) Run() error

Run starts the chat interface

type Session

type Session interface {
	// Chat operations - what we actually need from the assistant
	Chat(ctx context.Context, req assistant.Request) (*assistant.Response, error)
	Stream(ctx context.Context, req assistant.Request) (<-chan assistant.StreamChunk, error)

	// Conversation management
	ConversationID() uuid.UUID
	SetConversationUUID(id uuid.UUID)
	SetConversationID(idStr string) error
	OwnerName() string

	// Configuration
	GetTemperature() float32
	SetTemperature(float32)
	GetMaxTokens() int
	SetMaxTokens(int)

	// Capability checks - specific methods instead of interface{}
	HasMemoryCapability() bool
	HasDatabase() bool
}

Session defines the interface for session operations

type SessionWithConversation

type SessionWithConversation interface {
	Session
	GetConversationManager() *conversation.Manager
}

SessionWithConversation is an optional interface that sessions can implement to provide conversation management functionality

Jump to

Keyboard shortcuts

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