diff --git a/website/src/components/Dashboard/TaskOption.tsx b/website/src/components/Dashboard/TaskOption.tsx index c2c86bd1..e782fa8c 100644 --- a/website/src/components/Dashboard/TaskOption.tsx +++ b/website/src/components/Dashboard/TaskOption.tsx @@ -5,10 +5,6 @@ import { TaskTypes } from "../Tasks/TaskTypes"; const displayTaskCategories = ["create", "evaluate"]; -function capitalize(text: string) { - return text.charAt(0).toUpperCase() + text.slice(1); -} - export const TaskOption = () => { const backgroundColor = useColorModeValue("white", "gray.700"); @@ -16,7 +12,9 @@ export const TaskOption = () => { {displayTaskCategories.map((category, categoryIndex) => (
- {capitalize(category)} + + {category} + {TaskTypes.filter((task) => task.category == category).map((item, itemIndex) => ( diff --git a/website/src/components/Tasks/CreateTask.tsx b/website/src/components/Tasks/CreateTask.tsx index 6fe75acb..057177d2 100644 --- a/website/src/components/Tasks/CreateTask.tsx +++ b/website/src/components/Tasks/CreateTask.tsx @@ -4,7 +4,7 @@ import { TaskControls } from "src/components/Survey/TaskControls"; import { TrackedTextarea } from "src/components/Survey/TrackedTextarea"; import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards"; -export const CreateTask = ({ tasks, trigger, mutate, mainBgClasses }) => { +export const CreateTask = ({ tasks, taskType, trigger, mutate, mainBgClasses }) => { const task = tasks[0].task; const [inputText, setInputText] = useState(""); @@ -33,12 +33,12 @@ export const CreateTask = ({ tasks, trigger, mutate, mainBgClasses }) => {
<> -
Reply as the assistant
-

Given the following conversation, provide an adequate reply

+
{taskType.label}
+

{taskType.overview}

{task.conversation ? : null} <> -
Provide the assistant`s reply
+
{taskType.instruction}
{ const task = tasks[0].task; function taskTypeComponent(type) { - const category = TaskTypes.find((taskType) => taskType.type === type).category; - + const taskType = TaskTypes.find((taskType) => taskType.type === type); + const category = taskType.category; switch (category) { case "create": - return ; + return ( + + ); case "evaluate": return ; } diff --git a/website/src/components/Tasks/TaskTypes.tsx b/website/src/components/Tasks/TaskTypes.tsx index 5117c662..4f48d043 100644 --- a/website/src/components/Tasks/TaskTypes.tsx +++ b/website/src/components/Tasks/TaskTypes.tsx @@ -5,6 +5,8 @@ export const TaskTypes = [ category: "create", pathname: "/create/initial_prompt", type: "initial_prompt", + overview: "Create an initial message to send to the assistant", + instruction: "Provide the initial prompt", }, { label: "Reply as User", @@ -12,6 +14,8 @@ export const TaskTypes = [ category: "create", pathname: "/create/user_reply", type: "prompter_reply", + overview: "Given the following conversation, provide an adequate reply", + instruction: "Provide the user`s reply", }, { label: "Reply as Assistant", @@ -19,6 +23,8 @@ export const TaskTypes = [ category: "create", pathname: "/create/assistant_reply", type: "assistant_reply", + overview: "Given the following conversation, provide an adequate reply", + instruction: "Provide the assistant`s reply", }, { label: "Rank User Replies",