Documentation ¶
Index ¶
- type ConversationHandler
- func (c *ConversationHandler) CloseSession(ctx context.Context, userId string) error
- func (c *ConversationHandler) CreateMessage(ctx context.Context, session *conversation.Session, ...) (*conversation.Message, error)
- func (c *ConversationHandler) CreateSession(ctx context.Context, userId string) (*conversation.Session, error)
- func (c *ConversationHandler) CreateSpouseMessage(ctx context.Context, session *conversation.Session, ...) (*conversation.Message, error)
- func (c *ConversationHandler) GetLatestActiveSession(ctx context.Context, userId string) (*conversation.Session, error)
- func (c *ConversationHandler) ListLatestMessagesWithSpouse(ctx context.Context, session *conversation.Session, userId string, turns int) ([]*conversation.Message, error)
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)
Click to show internal directories.
Click to hide internal directories.