ent

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversationHandler

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

func New

func New(client *chatent.Client) *ConversationHandler

func (*ConversationHandler) CloseSession added in v0.1.2

func (c *ConversationHandler) CloseSession(ctx context.Context, userId string) error

func (*ConversationHandler) CreateMessage

func (c *ConversationHandler) CreateMessage(ctx context.Context, session *conversation.Session, fromUserId, toUserId, content string) (*conversation.Message, error)

func (*ConversationHandler) CreateSession

func (c *ConversationHandler) CreateSession(ctx context.Context, userId string) (*conversation.Session, error)

func (*ConversationHandler) CreateSpouseMessage

func (c *ConversationHandler) CreateSpouseMessage(ctx context.Context, session *conversation.Session, fromUserId, toUserId, content string, spouse *conversation.Message) (*conversation.Message, error)

func (*ConversationHandler) GetLatestActiveSession

func (c *ConversationHandler) GetLatestActiveSession(ctx context.Context, userId string) (*conversation.Session, error)

func (*ConversationHandler) ListLatestMessagesWithSpouse

func (c *ConversationHandler) ListLatestMessagesWithSpouse(ctx context.Context, session *conversation.Session, userId string, turns int) ([]*conversation.Message, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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