diff options
Diffstat (limited to 'src/client/views/nodes/chatbot/tools')
4 files changed, 508 insertions, 104 deletions
diff --git a/src/client/views/nodes/chatbot/tools/CreateAnyDocTool.ts b/src/client/views/nodes/chatbot/tools/CreateAnyDocTool.ts index 5f3af8296..5cf858998 100644 --- a/src/client/views/nodes/chatbot/tools/CreateAnyDocTool.ts +++ b/src/client/views/nodes/chatbot/tools/CreateAnyDocTool.ts @@ -1,57 +1,76 @@ -import { v4 as uuidv4 } from 'uuid'; -import { BaseTool } from './BaseTool'; +import { toLower } from 'lodash'; +import { Doc } from '../../../../../fields/Doc'; +import { Id } from '../../../../../fields/FieldSymbols'; +import { DocumentOptions } from '../../../../documents/Documents'; +import { parsedDoc } from '../chatboxcomponents/ChatBox'; +import { ParametersType, ToolInfo } from '../types/tool_types'; import { Observation } from '../types/types'; -import { ParametersType, Parameter, ToolInfo } from '../types/tool_types'; -import { DocumentOptions, Docs } from '../../../../documents/Documents'; - -/** - * List of supported document types that can be created via text LLM. - */ -type supportedDocumentTypesType = 'text' | 'html' | 'equation' | 'function_plot' | 'dataviz' | 'note_taking' | 'rtf' | 'message' | 'mermaid_diagram' | 'script'; -const supportedDocumentTypes: supportedDocumentTypesType[] = ['text', 'html', 'equation', 'function_plot', 'dataviz', 'note_taking', 'rtf', 'message', 'mermaid_diagram', 'script']; +import { BaseTool } from './BaseTool'; +import { supportedDocumentTypes } from './CreateDocumentTool'; +const standardOptions = ['title', 'backgroundColor']; /** * Description of document options and data field for each type. */ -const documentTypesInfo = { - text: { - options: ['title', 'backgroundColor', 'fontColor', 'text_align', 'layout'], - dataDescription: 'The text content of the text document. Should contain all the text content.', +const documentTypesInfo: { [key in supportedDocumentTypes]: { options: string[]; dataDescription: string } } = { + [supportedDocumentTypes.flashcard]: { + options: [...standardOptions, 'fontColor', 'text_align'], + dataDescription: 'an array of two strings. the first string contains a question, and the second string contains an answer', + }, + [supportedDocumentTypes.text]: { + options: [...standardOptions, 'fontColor', 'text_align'], + dataDescription: 'The text content of the document.', }, - html: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.html]: { + options: [], dataDescription: 'The HTML-formatted text content of the document.', }, - equation: { - options: ['title', 'backgroundColor', 'fontColor', 'layout'], + [supportedDocumentTypes.equation]: { + options: [...standardOptions, 'fontColor'], dataDescription: 'The equation content as a string.', }, - function_plot: { - options: ['title', 'backgroundColor', 'layout', 'function_definition'], + [supportedDocumentTypes.functionplot]: { + options: [...standardOptions, 'function_definition'], dataDescription: 'The function definition(s) for plotting. Provide as a string or array of function definitions.', }, - dataviz: { - options: ['title', 'backgroundColor', 'layout', 'chartType'], + [supportedDocumentTypes.dataviz]: { + options: [...standardOptions, 'chartType'], dataDescription: 'A string of comma-separated values representing the CSV data.', }, - note_taking: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.notetaking]: { + options: standardOptions, dataDescription: 'The initial content or structure for note-taking.', }, - rtf: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.rtf]: { + options: standardOptions, dataDescription: 'The rich text content in RTF format.', }, - message: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.image]: { + options: standardOptions, + dataDescription: 'The image content as an image file URL.', + }, + [supportedDocumentTypes.pdf]: { + options: standardOptions, + dataDescription: 'the pdf content as a PDF file url.', + }, + [supportedDocumentTypes.audio]: { + options: standardOptions, + dataDescription: 'The audio content as a file url.', + }, + [supportedDocumentTypes.video]: { + options: standardOptions, + dataDescription: 'The video content as a file url.', + }, + [supportedDocumentTypes.message]: { + options: standardOptions, dataDescription: 'The message content of the document.', }, - mermaid_diagram: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.mermaid]: { + options: ['title', 'backgroundColor'], dataDescription: 'The Mermaid diagram content.', }, - script: { - options: ['title', 'backgroundColor', 'layout'], + [supportedDocumentTypes.script]: { + options: ['title', 'backgroundColor'], dataDescription: 'The compilable JavaScript code. Use this for creating scripts.', }, }; @@ -60,7 +79,7 @@ const createAnyDocumentToolParams = [ { name: 'document_type', type: 'string', - description: `The type of the document to create. Supported types are: ${supportedDocumentTypes.join(', ')}`, + description: `The type of the document to create. Supported types are: ${Object.values(supportedDocumentTypes).join(', ')}`, required: true, }, { @@ -72,14 +91,11 @@ const createAnyDocumentToolParams = [ { name: 'options', type: 'string', - description: `A JSON string representing the document options. Available options depend on the document type. For example: -${supportedDocumentTypes - .map( - docType => ` -- For '${docType}' documents, options include: ${documentTypesInfo[docType].options.join(', ')}` - ) - .join('\n')}`, required: false, + description: `A JSON string representing the document options. Available options depend on the document type. For example: + ${Object.entries(documentTypesInfo).map( ([doc_type, info]) => ` +- For '${doc_type}' documents, options include: ${info.options.join(', ')}`) + .join('\n')}`, // prettier-ignore }, ] as const; @@ -87,76 +103,56 @@ type CreateAnyDocumentToolParamsType = typeof createAnyDocumentToolParams; const createAnyDocToolInfo: ToolInfo<CreateAnyDocumentToolParamsType> = { name: 'createAnyDocument', - description: `Creates any type of document (in Dash) with the provided options and data. Supported document types are: ${supportedDocumentTypes.join(', ')}. dataviz is a csv table tool, so for CSVs, use dataviz. Here are the options for each type: - <supported_document_types> - ${supportedDocumentTypes + description: + `Creates any type of document with the provided options and data. + Supported document types are: ${Object.values(supportedDocumentTypes).join(', ')}. + dataviz is a csv table tool, so for CSVs, use dataviz. Here are the options for each type: + <supported_document_types>` + + Object.entries(documentTypesInfo) .map( - docType => ` - <document_type name="${docType}"> - <data_description>${documentTypesInfo[docType].dataDescription}</data_description> - <options> - ${documentTypesInfo[docType].options.map(option => `<option>${option}</option>`).join('\n')} - </options> - </document_type> - ` + ([doc_type, info]) => + `<document_type name="${doc_type}"> + <data_description>${info.dataDescription}</data_description> + <options>` + + info.options.map(option => `<option>${option}</option>`).join('\n') + + `</options> + </document_type>` ) - .join('\n')} - </supported_document_types>`, + .join('\n') + + `</supported_document_types>`, parameterRules: createAnyDocumentToolParams, citationRules: 'No citation needed.', }; export class CreateAnyDocumentTool extends BaseTool<CreateAnyDocumentToolParamsType> { - private _addLinkedDoc: (doc_type: string, data: string | undefined, options: DocumentOptions, id: string) => void; + private _addLinkedDoc: (doc: parsedDoc) => Doc | undefined; - constructor(addLinkedDoc: (doc_type: string, data: string | undefined, options: DocumentOptions, id: string) => void) { + constructor(addLinkedDoc: (doc: parsedDoc) => Doc | undefined) { super(createAnyDocToolInfo); this._addLinkedDoc = addLinkedDoc; } async execute(args: ParametersType<CreateAnyDocumentToolParamsType>): Promise<Observation[]> { try { - const documentType: supportedDocumentTypesType = args.document_type.toLowerCase() as supportedDocumentTypesType; - let options: DocumentOptions = {}; + const documentType = toLower(args.document_type) as unknown as supportedDocumentTypes; + const info = documentTypesInfo[documentType]; - if (!supportedDocumentTypes.includes(documentType)) { - throw new Error(`Unsupported document type: ${documentType}. Supported types are: ${supportedDocumentTypes.join(', ')}.`); + if (info === undefined) { + throw new Error(`Unsupported document type: ${documentType}. Supported types are: ${Object.values(supportedDocumentTypes).join(', ')}.`); } if (!args.data) { - throw new Error(`Data is required for ${documentType} documents. ${documentTypesInfo[documentType].dataDescription}`); + throw new Error(`Data is required for ${documentType} documents. ${info.dataDescription}`); } - if (args.options) { - try { - options = JSON.parse(args.options as string) as DocumentOptions; - } catch (e) { - throw new Error('Options must be a valid JSON string.'); - } - } - - const data = args.data as string; - const id = uuidv4(); - - // Set default options if not provided - options.title = options.title || `New ${documentType.charAt(0).toUpperCase() + documentType.slice(1)} Document`; + const options: DocumentOptions = !args.options ? {} : JSON.parse(args.options); - // Call the function to add the linked document - this._addLinkedDoc(documentType, data, options, id); + // Call the function to add the linked document (add default title that can be overriden if set in options) + const doc = this._addLinkedDoc({ doc_type: documentType, data: args.data, title: `New ${documentType.charAt(0).toUpperCase() + documentType.slice(1)} Document`, ...options }); - return [ - { - type: 'text', - text: `Created ${documentType} document with ID ${id}.`, - }, - ]; + return [{ type: 'text', text: `Created ${documentType} document with ID ${doc?.[Id]}.` }]; } catch (error) { - return [ - { - type: 'text', - text: 'Error creating document: ' + (error as Error).message, - }, - ]; + return [{ type: 'text', text: 'Error creating document: ' + (error as Error).message }]; } } } diff --git a/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts new file mode 100644 index 000000000..7d6964f44 --- /dev/null +++ b/src/client/views/nodes/chatbot/tools/CreateDocumentTool.ts @@ -0,0 +1,415 @@ +import { BaseTool } from './BaseTool'; +import { Observation } from '../types/types'; +import { ParametersType, ToolInfo } from '../types/tool_types'; +import { parsedDoc } from '../chatboxcomponents/ChatBox'; + +/** + * List of supported document types that can be created via text LLM. + */ +export enum supportedDocumentTypes { + flashcard = 'flashcard', + text = 'text', + html = 'html', + equation = 'equation', + functionplot = 'functionplot', + dataviz = 'dataviz', + notetaking = 'notetaking', + audio = 'audio', + video = 'video', + pdf = 'pdf', + rtf = 'rtf', + message = 'message', + collection = 'collection', + image = 'image', + deck = 'deck', + web = 'web', + comparison = 'comparison', + mermaid = 'mermaid', + script = 'script', +} +/** + * Tthe CreateDocTool class is responsible for creating + * documents of various types (e.g., text, flashcards, collections) and organizing them in a + * structured manner. The tool supports creating dashboards with diverse document types and + * ensures proper placement of documents without overlap. + */ + +// Example document structure for various document types +const example = [ + { + doc_type: supportedDocumentTypes.equation, + title: 'quadratic', + data: 'x^2 + y^2 = 3', + width: 300, + height: 300, + x: 0, + y: 0, + }, + { + doc_type: supportedDocumentTypes.collection, + title: 'Advanced Biology', + data: [ + { + doc_type: supportedDocumentTypes.text, + title: 'Cell Structure', + data: 'Cells are the basic building blocks of all living organisms.', + width: 300, + height: 300, + x: 500, + y: 0, + }, + ], + backgroundColor: '#00ff00', + width: 600, + height: 600, + x: 600, + y: 0, + type_collection: 'tree', + }, + { + doc_type: supportedDocumentTypes.image, + title: 'experiment', + data: 'https://plus.unsplash.com/premium_photo-1694819488591-a43907d1c5cc?q=80&w=2628&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', + width: 300, + height: 300, + x: 600, + y: 300, + }, + { + doc_type: supportedDocumentTypes.deck, + title: 'Chemistry', + data: [ + { + doc_type: supportedDocumentTypes.flashcard, + title: 'Photosynthesis', + data: [ + { + doc_type: supportedDocumentTypes.text, + title: 'front_Photosynthesis', + data: 'What is photosynthesis?', + width: 300, + height: 300, + x: 100, + y: 600, + }, + { + doc_type: supportedDocumentTypes.text, + title: 'back_photosynthesis', + data: 'The process by which plants make food.', + width: 300, + height: 300, + x: 100, + y: 700, + }, + ], + backgroundColor: '#00ff00', + width: 300, + height: 300, + x: 300, + y: 1000, + }, + { + doc_type: supportedDocumentTypes.flashcard, + title: 'Photosynthesis', + data: [ + { + doc_type: supportedDocumentTypes.text, + title: 'front_Photosynthesis', + data: 'What is photosynthesis?', + width: 300, + height: 300, + x: 200, + y: 800, + }, + { + doc_type: supportedDocumentTypes.text, + title: 'back_photosynthesis', + data: 'The process by which plants make food.', + width: 300, + height: 300, + x: 100, + y: -100, + }, + ], + backgroundColor: '#00ff00', + width: 300, + height: 300, + x: 10, + y: 70, + }, + ], + backgroundColor: '#00ff00', + width: 600, + height: 600, + x: 200, + y: 800, + }, + { + doc_type: supportedDocumentTypes.web, + title: 'Brown University Wikipedia', + data: 'https://en.wikipedia.org/wiki/Brown_University', + width: 300, + height: 300, + x: 1000, + y: 2000, + }, + { + doc_type: supportedDocumentTypes.comparison, + title: 'WWI vs. WWII', + data: [ + { + doc_type: supportedDocumentTypes.text, + title: 'WWI', + data: 'From 1914 to 1918, fighting took place across several continents, at sea and, for the first time, in the air.', + width: 300, + height: 300, + x: 100, + y: 100, + }, + { + doc_type: supportedDocumentTypes.text, + title: 'WWII', + data: 'A devastating global conflict spanning from 1939 to 1945, saw the Allied powers fight against the Axis powers.', + width: 300, + height: 300, + x: 100, + y: 100, + }, + ], + width: 300, + height: 300, + x: 100, + y: 100, + }, + { + doc_type: supportedDocumentTypes.collection, + title: 'Science Collection', + data: [ + { + doc_type: supportedDocumentTypes.flashcard, + title: 'Photosynthesis', + data: [ + { + doc_type: supportedDocumentTypes.text, + title: 'front_Photosynthesis', + data: 'What is photosynthesis?', + width: 300, + height: 300, + }, + { + doc_type: supportedDocumentTypes.text, + title: 'back_photosynthesis', + data: 'The process by which plants make food.', + width: 300, + height: 300, + }, + ], + backgroundColor: '#00ff00', + width: 300, + height: 300, + }, + { + doc_type: supportedDocumentTypes.web, + title: 'Brown University Wikipedia', + data: 'https://en.wikipedia.org/wiki/Brown_University', + width: 300, + height: 300, + x: 1100, + y: 1100, + }, + { + doc_type: supportedDocumentTypes.text, + title: 'Water Cycle', + data: 'The continuous movement of water on, above, and below the Earth’s surface.', + width: 300, + height: 300, + x: 1500, + y: 500, + }, + { + doc_type: supportedDocumentTypes.collection, + title: 'Advanced Biology', + data: [ + { + doc_type: 'text', + title: 'Cell Structure', + data: 'Cells are the basic building blocks of all living organisms.', + width: 300, + height: 300, + }, + ], + backgroundColor: '#00ff00', + width: 600, + height: 600, + x: 1100, + y: 500, + type_collection: 'freeform', + }, + ], + width: 600, + height: 600, + x: 500, + y: 500, + type_collection: 'freeform', + }, +]; + +// Stringify the entire structure for transmission if needed +const finalJsonString = JSON.stringify(example); + +// Instructions for creating various document types +const docInstructions: [supportedDocumentTypes, string | { description: string; example: string }][] = [ + [ supportedDocumentTypes.collection, + { description: `A recursive collection of documents as a stringified array. Each document can be a ${Object.keys(supportedDocumentTypes).map(key => '"' + key + '"').join(',')}.`, + example: finalJsonString }, + ], // prettier-ignore + [supportedDocumentTypes.text, 'Provide text content as a plain string. Example: "This is a standalone text document."'], + [supportedDocumentTypes.flashcard, 'Two text documents with content for the front and back.'], + [supportedDocumentTypes.deck, 'A decks data is an array of flashcards.'], + [supportedDocumentTypes.comparison, 'two documents of any kind that can be compared.'], + [supportedDocumentTypes.image, `A url string that must end with '.png', '.jpeg', '.gif', or '.jpg'`], + [supportedDocumentTypes.web, 'A URL to a webpage. Example: https://en.wikipedia.org/wiki/Brown_University'], + [supportedDocumentTypes.equation, 'Create an equation document, not a text document. Data is math equation.'], + [supportedDocumentTypes.notetaking, 'Create a noteboard document'], + [supportedDocumentTypes.audio, 'A url to an audio recording. Example: '], +] as const; + +// Parameters for creating individual documents +const createDocToolParams = [ + { + name: 'data', + type: 'string', // Accepts either string or array, supporting individual and nested data + description: + typeof docInstructions === 'string' + ? docInstructions + : docInstructions.reduce( + (prev, [type, data]) => { + prev[type] = data; + return prev; + }, + {} as { [key: string]: string | { description: string; example: string } } + ), + required: true, + }, + { + name: 'doc_type', + type: 'string', + description: 'The type of the document. Options: "collection", "text", "flashcard", "web".', + required: true, + }, + { + name: 'title', + type: 'string', + description: 'The title of the document.', + required: true, + }, + { + name: 'x', + type: 'number', + description: 'The x location of the document; 0 <= x.', + required: true, + }, + { + name: 'y', + type: 'number', + description: 'The y location of the document; 0 <= y.', + required: true, + }, + { + name: 'backgroundColor', + type: 'string', + description: 'The background color of the document as a hex string.', + required: false, + }, + { + name: 'fontColor', + type: 'string', + description: 'The font color of the document as a hex string.', + required: false, + }, + { + name: 'width', + type: 'number', + description: 'The width of the document in pixels.', + required: true, + }, + { + name: 'height', + type: 'number', + description: 'The height of the document in pixels.', + required: true, + }, + { + name: 'type_collection', + type: 'string', + description: 'Either freeform, card, carousel, 3d-carousel, multicolumn, multirow, linear, map, notetaking, schema, stacking, grid, tree, or masonry.', + required: false, + }, +] as const; + +// Parameters for creating a list of documents +const createListDocToolParams = [ + { + name: 'docs', + type: 'string', + description: + 'Array of documents in stringified JSON format. Each item in the array should be an individual stringified JSON object. Each document can be of type "text", "flashcard", "comparison", "web", or "collection" (for nested documents). ' + + 'Use this structure for nesting collections within collections. Each document should follow the structure in ' + + createDocToolParams + + '. Example: ' + + finalJsonString, + required: true, + }, +] as const; + +type CreateListDocToolParamsType = typeof createListDocToolParams; + +type CreateDocumentToolParamsType = typeof createDocToolParams; + +const createDocToolInfo: ToolInfo<CreateDocumentToolParamsType> = { + name: 'createAnyDocument', + description: `Creates one or more documents that best fit the user’s request. + If the user requests a "dashboard," first call the search tool and then generate a variety of document types individually, with absolutely a minimum of 20 documents + with two stacks of flashcards that are small and it should have a couple nested freeform collections of things, each with different content and color schemes. + For example, create multiple individual documents like "text," "deck," "web", "equation," and "comparison." + Use decks instead of flashcards for dashboards. Decks should have at least three flashcards. + Really think about what documents are useful to the user. If they ask for a dashboard about the skeletal system, include flashcards, as they would be helpful. + Arrange the documents in a grid layout, ensuring that the x and y coordinates are calculated so no documents overlap but they should be directly next to each other with 20 padding in between. + Take into account the width and height of each document, spacing them appropriately to prevent collisions. + Use a systematic approach, such as placing each document in a grid cell based on its order, where cell dimensions match the document dimensions plus a fixed margin for spacing. + Do not nest all documents within a single collection unless explicitly requested by the user. + Instead, create a set of independent documents with diverse document types. Each type should appear separately unless specified otherwise. + Use the "data" parameter for document content and include title, color, and document dimensions. + Ensure web documents use URLs from the search tool if relevant. Each document in a dashboard should be unique and well-differentiated in type and content, + without repetition of similar types in any single collection. + When creating a dashboard, ensure that it consists of a broad range of document types. + Include a variety of documents, such as text, web, deck, comparison, image, simulation, and equation documents, + each with distinct titles and colors, following the user’s preferences. + Do not overuse collections or nest all document types within a single collection; instead, represent document types individually. Use this example for reference: + ${finalJsonString} . + Which documents are created should be random with different numbers of each document type and different for each dashboard. + Must use search tool before creating a dashboard.`, + parameterRules: createDocToolParams, + citationRules: 'No citation needed.', +}; + +// Tool class for creating documents +export class CreateDocTool extends BaseTool<CreateListDocToolParamsType> { + private _addLinkedDoc: (doc: parsedDoc) => void; + + constructor(addLinkedDoc: (doc: parsedDoc) => void) { + super(createDocToolInfo); + this._addLinkedDoc = addLinkedDoc; + } + + // Executes the tool logic for creating documents + async execute(args: ParametersType<CreateListDocToolParamsType>): Promise<Observation[]> { + try { + const parsedDocs = JSON.parse(args.docs) as parsedDoc[]; + parsedDocs.forEach(doc => this._addLinkedDoc({ ...doc, _layout_fitWidth: false, _layout_autoHeight: true })); + return [{ type: 'text', text: 'Created document.' }]; + } catch (error) { + return [{ type: 'text', text: 'Error creating text document, ' + error }]; + } + } +} diff --git a/src/client/views/nodes/chatbot/tools/CreateTextDocumentTool.ts b/src/client/views/nodes/chatbot/tools/CreateTextDocumentTool.ts index 487fc951d..16dc938bb 100644 --- a/src/client/views/nodes/chatbot/tools/CreateTextDocumentTool.ts +++ b/src/client/views/nodes/chatbot/tools/CreateTextDocumentTool.ts @@ -1,11 +1,7 @@ -import { v4 as uuidv4 } from 'uuid'; -import { Networking } from '../../../../Network'; -import { BaseTool } from './BaseTool'; -import { Observation } from '../types/types'; +import { parsedDoc } from '../chatboxcomponents/ChatBox'; import { ParametersType, ToolInfo } from '../types/tool_types'; -import { DocumentOptions } from '../../../../documents/Documents'; -import { RTFCast, StrCast } from '../../../../../fields/Types'; - +import { Observation } from '../types/types'; +import { BaseTool } from './BaseTool'; const createTextDocToolParams = [ { name: 'text_content', @@ -43,17 +39,16 @@ const createTextDocToolInfo: ToolInfo<CreateTextDocToolParamsType> = { }; export class CreateTextDocTool extends BaseTool<CreateTextDocToolParamsType> { - private _addLinkedDoc: (doc_type: string, data: string, options: DocumentOptions, id: string) => void; + private _addLinkedDoc: (doc: parsedDoc) => void; - constructor(addLinkedDoc: (text_content: string, data: string, options: DocumentOptions, id: string) => void) { + constructor(addLinkedDoc: (doc: parsedDoc) => void) { super(createTextDocToolInfo); this._addLinkedDoc = addLinkedDoc; } async execute(args: ParametersType<CreateTextDocToolParamsType>): Promise<Observation[]> { try { - console.log(RTFCast(args.text_content)); - this._addLinkedDoc('text', args.text_content, { title: args.title }, uuidv4()); + this._addLinkedDoc({ doc_type: 'text', data: args.text_content, title: args.title }); return [{ type: 'text', text: 'Created text document.' }]; } catch (error) { return [{ type: 'text', text: 'Error creating text document, ' + error }]; diff --git a/src/client/views/nodes/chatbot/tools/ImageCreationTool.ts b/src/client/views/nodes/chatbot/tools/ImageCreationTool.ts index ba1aa987a..177552c5c 100644 --- a/src/client/views/nodes/chatbot/tools/ImageCreationTool.ts +++ b/src/client/views/nodes/chatbot/tools/ImageCreationTool.ts @@ -1,12 +1,10 @@ import { v4 as uuidv4 } from 'uuid'; +import { RTFCast } from '../../../../../fields/Types'; +import { DocumentOptions } from '../../../../documents/Documents'; import { Networking } from '../../../../Network'; -import { BaseTool } from './BaseTool'; -import { Observation } from '../types/types'; import { ParametersType, ToolInfo } from '../types/tool_types'; -import { DocumentOptions } from '../../../../documents/Documents'; -import { ClientUtils } from '../../../../../ClientUtils'; -import { DashUploadUtils } from '../../../../../server/DashUploadUtils'; -import { RTFCast, StrCast } from '../../../../../fields/Types'; +import { Observation } from '../types/types'; +import { BaseTool } from './BaseTool'; const imageCreationToolParams = [ { |
