Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatRanker ¶
type ChatRanker struct {
// contains filtered or unexported fields
}
func NewChatRanker ¶
func NewChatRanker(cfg config.OpenAIConfig, prompt string) (*ChatRanker, error)
func (*ChatRanker) Rank ¶
func (r *ChatRanker) Rank(user *data.User, feedback []*FeedbackItem, items []*data.Item) ([]string, error)
type FeedbackItem ¶
type ItemToItem ¶
type ItemToItem interface {
Timestamp() time.Time
Items() []*data.Item
Push(item *data.Item, feedback []int32)
PopAll(i int) []cache.Score
Pool() parallel.Pool
}
func NewItemToItem ¶
func NewItemToItem(cfg config.ItemToItemConfig, n int, timestamp time.Time, opts *ItemToItemOptions) (ItemToItem, error)
type ItemToItemOptions ¶
type ItemToItemOptions struct {
TagsIDF []float32
UsersIDF []float32
OpenAIConfig config.OpenAIConfig
}
type MatrixFactorization ¶
type MatrixFactorization struct {
// contains filtered or unexported fields
}
func NewMatrixFactorization ¶
func NewMatrixFactorization(timestamp time.Time) *MatrixFactorization
type NonPersonalized ¶
func NewNonPersonalized ¶
func NewNonPersonalized(cfg config.NonPersonalizedConfig, n int, timestamp time.Time) (*NonPersonalized, error)
func NewPopular ¶
func (*NonPersonalized) Name ¶
func (l *NonPersonalized) Name() string
func (*NonPersonalized) PopAll ¶
func (l *NonPersonalized) PopAll() []cache.Score
func (*NonPersonalized) Push ¶
func (l *NonPersonalized) Push(item data.Item, feedback []data.Feedback)
func (*NonPersonalized) Timestamp ¶
func (l *NonPersonalized) Timestamp() time.Time
type UserToUser ¶
type UserToUser interface {
Users() []*data.User
Push(user *data.User, feedback []int32)
PopAll(i int) []cache.Score
Timestamp() time.Time
}
func NewUserToUser ¶
func NewUserToUser(cfg config.UserToUserConfig, n int, timestamp time.Time, opts *UserToUserOptions) (UserToUser, error)
type UserToUserOptions ¶
Click to show internal directories.
Click to hide internal directories.