From 9b42bf8ab277979194e4ef73152b6b23c479786b Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 7 Nov 2024 03:36:50 -0500 Subject: gpt text gen working for previews --- .../views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx') diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx index 4c6425f23..7d32d26d1 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx @@ -32,6 +32,22 @@ export class Template { return new DynamicField(templateInfo, 1); } + get descriptionSummary(): string { + let summary: string = ''; + this.contentFields.forEach(field => { + summary += `--- Field #${field.getID} (title: ${field.getTitle()}): ${field.getDescription ?? ''} ---`; + }); + return summary; + } + + get compiledContent(): string { + let summary: string = ''; + this.contentFields.forEach(field => { + summary += `--- Field #${field.getID} (title: ${field.getTitle()}): ${field.getContent() ?? ''} ---`; + }); + return summary; + } + renderUpdates = () => { this.allFields.forEach(field => { field.updateRenderedDoc(field.renderedDoc()); @@ -45,7 +61,6 @@ export class Template { } getMatches = (cols: Col[]): number[][] => { - console.log(this.mainField.getTitle(), this.allFields) const numFields = this.contentFields.length; if (cols.length !== numFields) return []; -- cgit v1.2.3-70-g09d2