diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/apis/gpt/Summarization.ts | 2 | ||||
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/client/apis/gpt/Summarization.ts b/src/client/apis/gpt/Summarization.ts index b65736237..0d9b5dfcd 100644 --- a/src/client/apis/gpt/Summarization.ts +++ b/src/client/apis/gpt/Summarization.ts @@ -14,7 +14,7 @@ type GPTCallOpts = { const callTypeMap: { [type: string]: GPTCallOpts } = { summary: { model: 'text-davinci-003', maxTokens: 100, temp: 0.5, prompt: 'Summarize this text: ' }, - completion: { model: 'text-davinci-003', maxTokens: 100, temp: 0.5, prompt: '' }, + completion: { model: 'text-davinci-003', maxTokens: 256, temp: 0.5, prompt: '' }, }; /** diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 5f9420a54..4f6fcb11a 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -36,7 +36,6 @@ import { PinProps, PresBox } from './trails'; import './WebBox.scss'; import React = require('react'); import { DragManager } from '../../util/DragManager'; -import { gptAPICall, GPTCallType } from '../../apis/gpt/Summarization'; import { GPTPopup } from '../pdf/GPTPopup'; const { CreateImage } = require('./WebBoxRenderer'); const _global = (window /* browser */ || global) /* node */ as any; @@ -60,19 +59,6 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps private _searchRef = React.createRef<HTMLInputElement>(); private _searchString = ''; - // GPT Additions - private _summaryText: string = ''; - setSummaryText = async () => { - try { - const summary = await gptAPICall(this.selectionText(), GPTCallType.SUMMARY); - this._summaryText = `Summary: ${summary}`; - } catch (err) { - console.log(err); - this._summaryText = 'Failed to fetch summary.'; - } - }; - summaryText = () => this._summaryText; - private get _getAnchor() { return AnchorMenu.Instance?.GetAnchor; } |