chatmessagehistory

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoDB

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

func NewDynamoDB

func NewDynamoDB(client *dynamodb.Client, tableName, sessionID string) *DynamoDB

func (*DynamoDB) AddAIMessage

func (mh *DynamoDB) AddAIMessage(text string) error

func (*DynamoDB) AddMessage

func (mh *DynamoDB) AddMessage(message schema.ChatMessage) error

func (*DynamoDB) AddUserMessage

func (mh *DynamoDB) AddUserMessage(text string) error

func (*DynamoDB) Clear

func (mh *DynamoDB) Clear() error

func (*DynamoDB) Messages

func (mh *DynamoDB) Messages() (schema.ChatMessages, error)

type InMemory

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

func NewInMemory

func NewInMemory() *InMemory

func NewInMemoryWithMessages

func NewInMemoryWithMessages(messages []schema.ChatMessage) *InMemory

func (*InMemory) AddAIMessage

func (mh *InMemory) AddAIMessage(text string) error

func (*InMemory) AddMessage

func (mh *InMemory) AddMessage(message schema.ChatMessage) error

func (*InMemory) AddUserMessage

func (mh *InMemory) AddUserMessage(text string) error

func (*InMemory) Clear

func (mh *InMemory) Clear() error

func (*InMemory) Messages

func (mh *InMemory) Messages() (schema.ChatMessages, error)

Jump to

Keyboard shortcuts

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