gorse-io / gorse

Gorse open source recommender system engine
https://gorse.io
Apache License 2.0
8.49k stars 778 forks source link

categories []string 不生效啊 项目不在维护了么? #837

Open simanlx opened 4 months ago

simanlx commented 4 months ago

func (c *GorseClient) GetItemRecommend(ctx context.Context, userId string, categories []string, writeBackType, writeBackDelay string, n, offset int) ([]string, error) { var queryCategories string if len(categories) > 0 { queryCategories = "&category=" + strings.Join(categories, "&category=") } return request[[]string, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/recommend/%s?write-back-type=%s&write-back-delay=%s&n=%d&offset=%d%s", userId, writeBackType, writeBackDelay, n, offset, queryCategories), nil) }

categories []string 获取的并非分类下的Item

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


func (c *GorseClient) GetItemRecommend(ctx context.Context, userId string, categories []string, writeBackType, writeBackDelay string, n, offset int) ([]string, error) { var queryCategories string if len(categories) > 0 { queryCategories = "&category=" + strings.Join(categories, "&category=") } return request[[]string, any](ctx, c, "GET", c.entryPoint+fmt.Sprintf("/api/recommend/%s?write-back-type=%s&write-back-delay=%s&n =%d&offset=%d%s", userId, writeBackType, writeBackDelay, n, offset, queryCategories), nil) }

categories []string obtains items other than categories.

Tobi-Tr commented 5 days ago

Same here