From 8fccdb8c21015eb9204de7c24a80ece82f338d8e Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Thu, 2 Nov 2023 13:10:48 -0400 Subject: gpt stylization --- src/client/views/nodes/trails/PresBox.tsx | 2 +- src/client/views/nodes/trails/PresElementBox.tsx | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 87ffb0112..19f271246 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -40,10 +40,10 @@ import ReactLoading from 'react-loading'; import { PresEffect, PresEffectDirection, PresMovement, PresStatus } from './PresEnums'; import { IconButton, Type } from 'browndash-components'; import { AiOutlineSend } from 'react-icons/ai'; -import { gptTrailSlideCustomization } from '../../../apis/gpt/GPT'; import { DictationManager } from '../../../util/DictationManager'; import { BiMicrophone, BiX } from 'react-icons/bi'; import TextareaAutosize from 'react-textarea-autosize'; +import { gptTrailSlideCustomization } from '../../../apis/gpt/customization'; export interface pinDataTypes { scrollable?: boolean; diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx index 482d38f59..37f449001 100644 --- a/src/client/views/nodes/trails/PresElementBox.tsx +++ b/src/client/views/nodes/trails/PresElementBox.tsx @@ -26,10 +26,6 @@ import './PresElementBox.scss'; import { PresMovement } from './PresEnums'; import React = require('react'); import { TreeView } from '../../collections/TreeView'; -import { BranchingTrailManager } from '../../../util/BranchingTrailManager'; -import { MultiToggle, Type } from 'browndash-components'; -import { gptTrailSlideCustomization } from '../../../apis/gpt/GPT'; -import { DictationManager } from '../../../util/DictationManager'; /** * This class models the view a document added to presentation will have in the presentation. * It involves some functionality for its buttons and options. @@ -438,25 +434,6 @@ export class PresElementBox extends ViewBoxBaseComponent() { // GPT - @action - customizeWithGPT = async (input: string) => { - const testInput = 'change title to Customized Slide, transition for 2.3s with fade in effect'; - - try { - const res = await gptTrailSlideCustomization(testInput); - if (typeof res === 'string') { - const resObj = JSON.parse(res); - console.log('Result ', resObj); - - for (let key in resObj) { - this.rootDoc[key] = resObj[key]; - } - } - } catch (err) { - console.error(err); - } - }; - @computed get presButtons() { const presBox = this.presBox; const presBoxColor = StrCast(presBox?._backgroundColor); @@ -568,7 +545,6 @@ export class PresElementBox extends ViewBoxBaseComponent() { PresBox.Instance.setChatActive(true); PresBox.Instance.slideToModify = this.rootDoc; PresBox.Instance.recordDictation(); - // this.customizeWithGPT(''); }}> e.stopPropagation()} /> -- cgit v1.2.3-70-g09d2