diff options
| author | bobzel <zzzman@gmail.com> | 2024-04-19 11:02:05 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-04-19 11:02:05 -0400 |
| commit | b6229b0a6141afbfd0e78e3ec870218187864def (patch) | |
| tree | 26c6e752e4512abe42b92dcefd1a3b42df529494 /src/client/apis/gpt/GPT.ts | |
| parent | 2a313f28fcb8675223708b0657de7517a3281095 (diff) | |
fixed text search highlighting. fixed first typed characfter of note to have marks.
Diffstat (limited to 'src/client/apis/gpt/GPT.ts')
| -rw-r--r-- | src/client/apis/gpt/GPT.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts index 63563cb79..e3e87e017 100644 --- a/src/client/apis/gpt/GPT.ts +++ b/src/client/apis/gpt/GPT.ts @@ -27,9 +27,9 @@ const callTypeMap: { [type: string]: GPTCallOpts } = { */ let lastCall = ''; let lastResp = ''; -const gptAPICall = async (inputText: string, callType: GPTCallType) => { - if (callType === GPTCallType.SUMMARY) inputText += '.'; - const opts: GPTCallOpts = callTypeMap[callType]; +const gptAPICall = async (inputTextIn: string, callType: GPTCallType) => { + const inputText = callType === GPTCallType.SUMMARY ? inputTextIn + '.' : inputTextIn; + const opts = callTypeMap[callType]; if (lastCall === inputText) return lastResp; try { const configuration: ClientOptions = { @@ -69,8 +69,8 @@ const gptImageCall = async (prompt: string, n?: number) => { // return response.data.data[0].url; } catch (err) { console.error(err); - return; } + return undefined; }; export { gptAPICall, gptImageCall, GPTCallType }; |
