From f2edc087acaea57afb4b89c28e9e07b3670a9003 Mon Sep 17 00:00:00 2001 From: joe-prosser Date: Thu, 25 Jan 2024 13:30:49 +0000 Subject: [PATCH] fix(api): fix fetch & advance stream requests (#251) --- CHANGELOG.md | 4 ++++ api/src/lib.rs | 1 + api/src/resources/comment.rs | 2 +- cli/src/commands/get/comments.rs | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1530a08..e93deda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# unreleaswed +- Fix a bug where stream responses were not correctly parsed +- Fix a bug where streams were not correctly advanced + # v0.21.4 - Add messages filters - Fixes `required` field error when interacting with datasets diff --git a/api/src/lib.rs b/api/src/lib.rs index 5380cda..9d57da2 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -1439,6 +1439,7 @@ impl Endpoints { &stream_name.dataset.0, "streams", &stream_name.stream.0, + "advance", ], ) } diff --git a/api/src/resources/comment.rs b/api/src/resources/comment.rs index 60e2795..3db7997 100644 --- a/api/src/resources/comment.rs +++ b/api/src/resources/comment.rs @@ -624,7 +624,7 @@ pub struct Label { #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] pub struct PredictedLabel { - pub name: LabelName, + pub name: Vec, #[serde(skip_serializing_if = "Option::is_none")] pub sentiment: Option>, pub probability: NotNan, diff --git a/cli/src/commands/get/comments.rs b/cli/src/commands/get/comments.rs index 0294039..02f7b8e 100644 --- a/cli/src/commands/get/comments.rs +++ b/cli/src/commands/get/comments.rs @@ -613,7 +613,7 @@ fn get_comments_from_uids( auto_threshold_labels .iter() .map(|auto_threshold_label| PredictedLabel { - name: LabelName(auto_threshold_label.name.join(" > ")), + name: auto_threshold_label.name.to_owned(), sentiment: None, probability: auto_threshold_label.probability, auto_thresholds: Some(