Documentation
¶
Overview ¶
Package tui is a terminal interface to chat in a session, which is a throwaway, until there's a better one
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chat ¶
Chat runs the interface to chat in the session with the identifier, until it's quit, with escape or control-c: its messages are shown, and what's typed is sent, with enter, and the model's reply is shown as it's generated, with that it's thinking, or, when debugging, its thinking, and the tools it calls, and their results. The changes which others make to the session, such as in another window, are shown as they're made, and whether someone is typing, or the model is replying, and the server is told when someone is typing.
Types ¶
type Client ¶
type Client interface {
GetDetails(ctx context.Context) (*memoryschema.Details, error)
GetSession(ctx context.Context, id uuid.UUID) (*schema.Session, error)
ListSessionMessages(ctx context.Context, id uuid.UUID, req schema.MessageListRequest) (*schema.MessageList, error)
Chat(ctx context.Context, id uuid.UUID, req schema.ChatRequest, stream llm.GeneratorStreamFn) (*schema.ChatResponse, error)
SetSessionStatus(ctx context.Context, id uuid.UUID, status schema.SessionStatus) (*schema.Session, error)
WatchEvents(ctx context.Context, fn func(eventschema.Event) error) error
}
Client is what the interface chats in a session with, and watches the changes to it with, which others make, such as in another window, and gets the memory's details with, such as the names of the person and the assistant