MCPcopy Create free account
hub / github.com/Xyntopia/taskyon / defaultTaskState

Function defaultTaskState

src/modules/chat.ts:70–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68// this state stores all information which
69// should be stored e.g. in browser LocalStorage
70export function defaultTaskState() {
71 return {
72 Tasks: {} as Record<string, LLMTask>,
73 // this refers to the task chain that we have selected. We select one task and then
74 // put the chain together by following the parentIds.
75 selectedTaskId: undefined as string | undefined,
76 openrouterAIModel: 'mistralai/mistral-7b-instruct', //model which is generally chosen for a task if not explicitly specified
77 openAIModel: 'gpt-3.5-turbo',
78 openAIAssistant: '',
79 openAIApiKey: '',
80 openRouterAIApiKey: '',
81 useOpenAIAssistants: false,
82 enableOpenAiTools: false,
83 siteUrl: 'https://taskyon.xyntopia.com',
84 summaryModel: 'Xenova/distilbart-cnn-6-6',
85 baseURL: getBackendUrls('openrouter'),
86 databasePath: 'taskyon.sqlite3',
87 maxTasks: 3,
88 taskChatTemplates: {
89 constraints: `CONSTRAINTS:
90
91{constraints}`,
92 instruction: `You are a helpful assistant tasked with accurately completing the given task by producing valid YAML code when requested. When responding with YAML, ensure that the syntax is correct, properly indented,
93and adheres to YAML standards. Do not include explanatory text in your YAML responses.
94
95You can make use of the following Tools: {toolList}
96
97Remember, the focus is on the precision and correctness of the YAML output.`,
98 objective: 'OVERALL OBJECTIVE:\n\n{objective}\n',
99 tools: `AVAILABLE TOOLS TO CALL:
100
101{tools}`,
102 previousTasks: 'PREVIOUSLY COMPLETED TASKS:\n\n{previousTasks}\n',
103 context: 'TAKE INTO ACCOUNT THIS CONTEXT:\n\n{context}\n',
104 toolResult: `THE RESULT OF THE TOOL/FUNCTION WHICH WAS CALLED BY THE SYSTEM IS:
105
106{toolResult}
107
108Provide only the precise information requested without context,
109Make sure we can parse the entire response as {format}.
110
111COMMENT THE RESULT VERY STRICTLY FOLLOWING SCHEMA ({format}):
112
113# keys with '?' are optional
114{resultSchema}`,
115 task: `
116COMPLETE THE FOLLOWING TASK:
117
118{taskContent}
119
120Provide only the precise information requested without context,
121Make sure we can parse the response as {format}.
122
123FORMAT THE RESULT WITH THE FOLLOWING SCHEMA VERY STRICT ({format}):
124
125# keys with '?' are optional
126{schema}`,
127 },

Callers 1

taskyonState.tsFile · 0.90

Calls 1

getBackendUrlsFunction · 0.85

Tested by

no test coverage detected