Documentation ¶
Index ¶
- Variables
- func Load(conf *recconf.RecommendConfig)
- type CallBackService
- func (r *CallBackService) LoadFeatures(context *context.RecommendContext)
- func (r *CallBackService) LoadUserFeatures(context *context.RecommendContext)
- func (r *CallBackService) Rank(context *context.RecommendContext)
- func (r *CallBackService) Recommend(context *context.RecommendContext)
- func (r *CallBackService) RecordLog(context *context.RecommendContext, msg string) error
- func (r *CallBackService) RecordLogList(context *context.RecommendContext, messages []map[string]interface{}) error
- func (r *CallBackService) RecordToDatahub(name string, msg string) error
- func (r *CallBackService) RecordToDatahubList(name string, messages []map[string]interface{}) error
- func (r *CallBackService) RecordToKafka(kafka_name string, msg string) error
- func (r *CallBackService) RecordToKafkaList(kafka_name string, messages []map[string]interface{}) error
- type Category
- type EmbeddingService
- type FeatureReplyService
- type RecallService
- type RecommendService
- func (s *RecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
- func (s *RecommendService) GetUID(context *context.RecommendContext) module.UID
- func (s *RecommendService) PreSort(items []*module.Item, context *context.RecommendContext) []*module.Item
- func (s *RecommendService) Sort(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
- type Scene
- type UserRecallService
- type UserRecommendService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( User_Embedding_Module = "user" Item_Embedding_Module = "item" )
Functions ¶
func Load ¶
func Load(conf *recconf.RecommendConfig)
Types ¶
type CallBackService ¶
type CallBackService struct { User *module.User Items []*module.Item // contains filtered or unexported fields }
func NewCallBackService ¶
func NewCallBackService() *CallBackService
func (*CallBackService) LoadFeatures ¶
func (r *CallBackService) LoadFeatures(context *context.RecommendContext)
func (*CallBackService) LoadUserFeatures ¶
func (r *CallBackService) LoadUserFeatures(context *context.RecommendContext)
func (*CallBackService) Rank ¶
func (r *CallBackService) Rank(context *context.RecommendContext)
func (*CallBackService) Recommend ¶
func (r *CallBackService) Recommend(context *context.RecommendContext)
func (*CallBackService) RecordLog ¶
func (r *CallBackService) RecordLog(context *context.RecommendContext, msg string) error
func (*CallBackService) RecordLogList ¶
func (r *CallBackService) RecordLogList(context *context.RecommendContext, messages []map[string]interface{}) error
func (*CallBackService) RecordToDatahub ¶
func (r *CallBackService) RecordToDatahub(name string, msg string) error
func (*CallBackService) RecordToDatahubList ¶
func (r *CallBackService) RecordToDatahubList(name string, messages []map[string]interface{}) error
func (*CallBackService) RecordToKafka ¶
func (r *CallBackService) RecordToKafka(kafka_name string, msg string) error
func (*CallBackService) RecordToKafkaList ¶
func (r *CallBackService) RecordToKafkaList(kafka_name string, messages []map[string]interface{}) error
type Category ¶
type Category struct { CategoryName string // contains filtered or unexported fields }
func NewCategory ¶
func (*Category) GetRecallNames ¶
func (*Category) GetRecalls ¶
func (*Category) Init ¶
func (c *Category) Init(config recconf.CategoryConfig)
type EmbeddingService ¶ added in v2.2.5
type EmbeddingService struct { RecommendService // contains filtered or unexported fields }
func NewEmbeddingService ¶ added in v2.2.5
func NewEmbeddingService() *EmbeddingService
func (*EmbeddingService) Rank ¶ added in v2.2.5
func (r *EmbeddingService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext) (embeddings []float32, err error)
func (*EmbeddingService) Recommend ¶ added in v2.2.5
func (r *EmbeddingService) Recommend(context *context.RecommendContext) ([]float32, error)
type FeatureReplyService ¶
type FeatureReplyService struct {
RecommendService
}
func NewFeatureReplyService ¶
func NewFeatureReplyService() *FeatureReplyService
func (*FeatureReplyService) FeatureReply ¶
func (r *FeatureReplyService) FeatureReply(userFeatures string, itemFeatures, itemids []string, context *context.RecommendContext)
type RecallService ¶
type RecallService struct { }
func (*RecallService) GetItems ¶
func (s *RecallService) GetItems(user *module.User, context *context.RecommendContext) (ret []*module.Item)
type RecommendService ¶
type RecommendService struct { }
func (*RecommendService) Filter ¶
func (s *RecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
func (*RecommendService) GetUID ¶
func (s *RecommendService) GetUID(context *context.RecommendContext) module.UID
func (*RecommendService) PreSort ¶
func (s *RecommendService) PreSort(items []*module.Item, context *context.RecommendContext) []*module.Item
type Scene ¶
func (*Scene) AddCategory ¶
func (*Scene) Init ¶
func (s *Scene) Init(config recconf.SceneConfig)
type UserRecallService ¶
type UserRecallService struct { RecommendService // contains filtered or unexported fields }
func NewUserRecallService ¶
func NewUserRecallService() *UserRecallService
func (*UserRecallService) Recommend ¶
func (r *UserRecallService) Recommend(context *context.RecommendContext) []*module.Item
type UserRecommendService ¶
type UserRecommendService struct { RecommendService // contains filtered or unexported fields }
func NewUserRecommendService ¶
func NewUserRecommendService() *UserRecommendService
func (*UserRecommendService) Recommend ¶
func (r *UserRecommendService) Recommend(context *context.RecommendContext) []*module.Item
Source Files ¶
Click to show internal directories.
Click to hide internal directories.