Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatedEvent ¶
func NewCreatedEvent ¶
type DeletedEvent ¶
func NewDeletedEvent ¶
func NewDeletedEvent(ctx context.Context, result Dialogue) (*DeletedEvent, error)
type Dialogue ¶
type Dialogue struct { Id int64 UserID uint Label string Messages Messages `gorm:"type:jsonb"` CreatedAt time.Time UpdatedAt time.Time }
func (*Dialogue) AddMessage ¶
func (d *Dialogue) AddMessage(msg openai.ChatCompletionMessage)
type Messages ¶
type Messages []openai.ChatCompletionMessage
type Repository ¶
type Repository interface { Count(ctx context.Context) (int64, error) GetAll(ctx context.Context) ([]*Dialogue, error) GetPaginated(ctx context.Context, limit, offset int, sortBy []string) ([]*Dialogue, error) GetByID(ctx context.Context, id int64) (*Dialogue, error) GetByUserID(ctx context.Context, userID int64) ([]*Dialogue, error) Create(ctx context.Context, upload *Dialogue) error Update(ctx context.Context, upload *Dialogue) error Delete(ctx context.Context, id int64) error }
type Start ¶
func NewDialogue ¶
Click to show internal directories.
Click to hide internal directories.