mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-05 17:30:48 +08:00
website: Support new widget types for labelling (#966)
* website: Support new widget types for labelling Adds proper support for yes/no spam style questions as well as a simple interface for flag style labels. Also cleaned up the Task component to fix some rerender issues. * website: Fix some UI text, adjust yes/no button alignment * website: Remove left over console.log Co-authored-by: notmd <33456881+notmd@users.noreply.github.com> --------- Co-authored-by: notmd <33456881+notmd@users.noreply.github.com>
This commit is contained in:
+21
-13
@@ -33,31 +33,39 @@ export interface RankPrompterRepliesTask extends BaseTask {
|
||||
replies: string[];
|
||||
}
|
||||
|
||||
export interface LabelAssistantReplyTask extends BaseTask {
|
||||
export interface Label {
|
||||
display_text: string;
|
||||
help_text: string;
|
||||
name: string;
|
||||
widget: "flag" | "yes_no" | "likert";
|
||||
}
|
||||
|
||||
export interface BaseLabelTask extends BaseTask {
|
||||
message_id: string;
|
||||
labels: Label[];
|
||||
valid_labels: string[];
|
||||
disposition: "spam" | "quality";
|
||||
mode: "simple" | "full";
|
||||
mandatory_labels?: string[];
|
||||
}
|
||||
|
||||
export interface LabelAssistantReplyTask extends BaseLabelTask {
|
||||
type: TaskType.label_assistant_reply;
|
||||
message_id: string;
|
||||
conversation: Conversation;
|
||||
reply_message: Message;
|
||||
reply: string;
|
||||
valid_labels: string[];
|
||||
mode: "simple" | "full";
|
||||
mandatory_labels?: string[];
|
||||
}
|
||||
|
||||
export interface LabelPrompterReplyTask extends BaseTask {
|
||||
export interface LabelPrompterReplyTask extends BaseLabelTask {
|
||||
type: TaskType.label_prompter_reply;
|
||||
message_id: string;
|
||||
conversation: Conversation;
|
||||
reply_message: Message;
|
||||
reply: string;
|
||||
valid_labels: string[];
|
||||
mode: "simple" | "full";
|
||||
mandatory_labels?: string[];
|
||||
}
|
||||
|
||||
export interface LabelInitialPromptTask extends BaseTask {
|
||||
export interface LabelInitialPromptTask extends BaseLabelTask {
|
||||
type: TaskType.label_initial_prompt;
|
||||
message_id: string;
|
||||
valid_labels: string[];
|
||||
prompt: string;
|
||||
}
|
||||
|
||||
export type LabelTaskType = LabelAssistantReplyTask | LabelPrompterReplyTask | LabelInitialPromptTask;
|
||||
|
||||
Reference in New Issue
Block a user