aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts')
-rw-r--r--src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts82
1 files changed, 76 insertions, 6 deletions
diff --git a/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
index b14a57779..ebe0448aa 100644
--- a/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
+++ b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
@@ -6,16 +6,85 @@ import { DocumentOptions } from '../../../../documents/Documents';
const example = [
{
+ doc_type: 'deck',
+ title: 'Chemistry',
+ data: [
+ {
+ doc_type: 'flashcard',
+ title: 'Photosynthesis',
+ data: [
+ {
+ doc_type: 'text',
+ title: 'front_Photosynthesis',
+ data: 'What is photosynthesis?',
+ width: 300,
+ height: 300,
+ },
+ {
+ doc_type: 'text',
+ title: 'back_photosynthesis',
+ data: 'The process by which plants make food.',
+ width: 300,
+ height: 300,
+ },
+ ],
+ backgroundColor: '#00ff00',
+ width: 300,
+ height: 300,
+ },
+ {
+ doc_type: 'flashcard',
+ title: 'Photosynthesis',
+ data: [
+ {
+ doc_type: 'text',
+ title: 'front_Photosynthesis',
+ data: 'What is photosynthesis?',
+ width: 300,
+ height: 300,
+ },
+ {
+ doc_type: 'text',
+ title: 'back_photosynthesis',
+ data: 'The process by which plants make food.',
+ width: 300,
+ height: 300,
+ },
+ ],
+ backgroundColor: '#00ff00',
+ width: 300,
+ height: 300,
+ },
+ ],
+ backgroundColor: '#00ff00',
+ width: 600,
+ height: 600,
+ },
+ {
+ doc_type: 'web',
+ title: 'Brown University Wikipedia',
+ data: 'https://en.wikipedia.org/wiki/Brown_University',
+ width: 300,
+ height: 300,
+ },
+ {
doc_type: 'collection',
title: 'Science Collection',
data: [
{
+ doc_type: 'web',
+ title: 'Brown University Wikipedia',
+ data: 'https://en.wikipedia.org/wiki/Brown_University',
+ width: 300,
+ height: 300,
+ },
+ {
doc_type: 'flashcard',
title: 'Photosynthesis',
data: [
{
doc_type: 'text',
- title: 'Front Photosynthesis',
+ title: 'front_Photosynthesis',
data: 'What is photosynthesis?',
width: 300,
height: 300,
@@ -72,9 +141,9 @@ const docInstructions = {
},
text: 'Provide text content as a plain string. Example: "This is a standalone text document."',
flashcard: 'Two text documents with content for the front and back.',
- flashcardDeck: 'A collection of flashcards under a common theme.',
+ deck: 'A decks data is an array of flashcards.',
image: 'A URL to an image for data. Example: "https://example.com/image.jpg"',
- web: 'A URL to a webpage. Example: "https://example.com"',
+ web: 'A URL to a webpage. Example: https://en.wikipedia.org/wiki/Brown_University',
equation: 'Create a equation document.',
noteboard: 'Create a noteboard document',
comparison: 'Create a comparison document',
@@ -148,12 +217,13 @@ export class CreateDocTool extends BaseTool<CreateListDocToolParamsType> {
constructor(addLinkedDoc: (doc_type: string, data: string, options: DocumentOptions, id: string) => void) {
super(
'createDoc',
- 'Creates one or more documents that best fit users request',
+ 'Creates one or more documents that best fit users request with input following the example below. Or creates a dashboard of many documents/collections.',
createListDocToolParams,
- 'Modify the data parameter and include title (and optionally color) for the document.',
+ 'Modify the data parameter and include title (and optionally color) for the document. Web doc data type must be url from search tool.',
'Creates one or more documents represented by an array of strings with the provided content based on the instructions ' +
docInstructions +
- 'Use if the user wants to create something that aligns with a document type in dash like a flashcard, flashcard deck/stack, or textbox or text document of some sort. Can use after a search or other tool to save information.'
+ 'Use if the user wants to create something that aligns with a document type in dash like a flashcard, flashcard deck/stack, or textbox or text document of some sort. Can use after the search tool to save information.' +
+ 'When user asks for dashboard, create many documents/collections with different colors and texts while listening to their preferences, after using search tool to create a dashboard.'
);
this._addLinkedDoc = addLinkedDoc;
}