aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx6
-rw-r--r--src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts29
2 files changed, 24 insertions, 11 deletions
diff --git a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
index 4a39ee388..e2508d752 100644
--- a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
+++ b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
@@ -468,6 +468,11 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
return childDocs;
};
+ // @action
+ // createSingleFlashcard = (data: any, options: DocumentOptions) => {
+
+ // }
+
@action
whichDoc = async (doc_type: string, data: string, options: DocumentOptions, id: string): Promise<Doc> => {
let doc;
@@ -476,6 +481,7 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
doc = DocCast(Docs.Create.TextDocument(data, options));
break;
case 'flashcard':
+ // doc = this.createSingleFlashcard(data, options);
doc = this.createFlashcard(data, options);
break;
case 'image':
diff --git a/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
index 0b83ff24f..7d74c3b15 100644
--- a/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
+++ b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts
@@ -12,7 +12,22 @@ const example = [
{
doc_type: 'flashcard',
title: 'Photosynthesis',
- data: { 'What is photosynthesis?': 'The process by which plants make food.' },
+ 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,
@@ -29,14 +44,6 @@ const example = [
title: 'Advanced Biology',
data: [
{
- doc_type: 'flashcard',
- title: 'Respiration',
- data: { 'What is respiration?': 'Conversion of oxygen and glucose to energy.' },
- backgroundColor: '#00ff00',
- width: 300,
- height: 300,
- },
- {
doc_type: 'text',
title: 'Cell Structure',
data: 'Cells are the basic building blocks of all living organisms.',
@@ -110,9 +117,9 @@ const docInstructions = {
// ],
},
text: 'Provide text content as a plain string. Example: "This is a standalone text document."',
- flashcard: 'A dictionary mapping the front to the back of the flashcard. Example: {"Question":"Answer"}',
+ flashcard: 'Two text documents with content for the front and back.',
flashcardDeck: 'A collection of flashcards under a common theme.',
- image: 'A URL to an image. Example: "https://example.com/image.jpg"',
+ image: 'A URL to an image for data. Example: "https://example.com/image.jpg"',
web: 'A URL to a webpage. Example: "https://example.com"',
equation: 'Create a equation document.',
noteboard: 'Create a noteboard document',