mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-11 11:13:12 +08:00
Added random task and moved other tasks to /tasks/all
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { Box, Flex, GridItem, Heading, SimpleGrid, Text, useColorModeValue } from "@chakra-ui/react";
|
||||
import Link from "next/link";
|
||||
|
||||
import { TaskCategory, TaskTypes } from "../Tasks/TaskTypes";
|
||||
import { TaskTypes } from "../Tasks/TaskTypes";
|
||||
|
||||
const displayTaskCategories = [TaskCategory.Create, TaskCategory.Evaluate, TaskCategory.Label];
|
||||
|
||||
export const TaskOption = () => {
|
||||
export const TaskOption = ({ displayTaskCategories }) => {
|
||||
const backgroundColor = useColorModeValue("white", "gray.700");
|
||||
|
||||
return (
|
||||
|
||||
@@ -24,7 +24,10 @@ export const LabelTask = ({
|
||||
const onSliderChange = (values: number[]) => {
|
||||
console.assert(valid_labels.length === sliderValues.length);
|
||||
const labels = Object.fromEntries(valid_labels.map((label, i) => [label, sliderValues[i]]));
|
||||
onReplyChanged({ content: { labels, text: task.reply, message_id: task.message_id }, state: "VALID" });
|
||||
onReplyChanged({
|
||||
content: { labels, text: task.reply || task.prompt, message_id: task.message_id },
|
||||
state: "VALID",
|
||||
});
|
||||
setSliderValues(values);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export enum TaskCategory {
|
||||
Tasks = "Tasks",
|
||||
Create = "Create",
|
||||
Evaluate = "Evaluate",
|
||||
Label = "Label",
|
||||
@@ -18,6 +19,15 @@ export interface TaskInfo {
|
||||
}
|
||||
|
||||
export const TaskTypes: TaskInfo[] = [
|
||||
// general/random
|
||||
{
|
||||
label: "Grab a task",
|
||||
desc: "Help us improve Open Assistant by grabbing a task ...",
|
||||
category: TaskCategory.Tasks,
|
||||
pathname: "/tasks/random",
|
||||
type: "random",
|
||||
update_type: "random",
|
||||
},
|
||||
// create
|
||||
{
|
||||
label: "Create Initial Prompts",
|
||||
|
||||
Reference in New Issue
Block a user