Crates.io | gorse_rs |
lib.rs | gorse_rs |
version | 0.4.1 |
source | src |
created_at | 2022-11-20 23:52:32.631973 |
updated_at | 2022-11-24 15:08:11.149905 |
description | Rust SDK for gorse recommender system |
homepage | https://gorse.io |
repository | https://github.com/gorse-io/gorse-rs |
max_upload_size | |
id | 719504 |
size | 39,834 |
Rust SDK for gorse recommender system
[dependencies]
gorse_rs = "0.4.1"
use gorse_rs::{Feedback, Gorse};
let client = Gorse::new("http://127.0.0.1:8087", "api_key");
let feedback = vec![
Feedback::new("star", "bob", "vuejs:vue", "2022-02-24"),
Feedback::new("star", "bob", "d3:d3", "2022-02-25"),
Feedback::new("star", "bob", "dogfalo:materialize", "2022-02-26"),
Feedback::new("star", "bob", "mozilla:pdf.js", "2022-02-27"),
Feedback::new("star", "bob", "moment:moment", "2022-02-28")
];
client.insert_feedback(&feedback).await;
client.get_recommend("100").await;
use gorse_rs::Feedback;
use gorse_rs::blocking::Gorse;
let client = Gorse::new("http://127.0.0.1:8087", "api_key");
let feedback = vec![
Feedback::new("star", "bob", "vuejs:vue", "2022-02-24"),
Feedback::new("star", "bob", "d3:d3", "2022-02-25"),
Feedback::new("star", "bob", "dogfalo:materialize", "2022-02-26"),
Feedback::new("star", "bob", "mozilla:pdf.js", "2022-02-27"),
Feedback::new("star", "bob", "moment:moment", "2022-02-28")
];
client.insert_feedback(&feedback);
client.get_recommend("100");