From 3f6a168b2916ccac707cf5ea1e4ef898a470d7d1 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 13 Feb 2025 23:27:42 -0500 Subject: lots of cleanup in GPTpopup. --- src/client/apis/gpt/GPT.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/client/apis/gpt') diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts index dc4607b94..066510a6a 100644 --- a/src/client/apis/gpt/GPT.ts +++ b/src/client/apis/gpt/GPT.ts @@ -1,6 +1,14 @@ import { ChatCompletionMessageParam, Image } from 'openai/resources'; import { openai } from './setup'; +export enum GPTTypeStyle { + AssignTags = 1, + Filter = 2, + DocInfo = 3, + ChooseDoc = 4, + GeneralInfo = 5, + SortDocs = 6, +} enum GPTCallType { SUMMARY = 'summary', COMPLETION = 'completion', @@ -127,12 +135,12 @@ const callTypeMap: { [type: string]: GPTCallOpts } = { temp: 0, prompt: `I'm going to provide you with a question. Based on the question, is the user asking you to - 1. Assigns docs with tags(like star / heart etc)/labels, - 2. Filter docs, - 3. Provide information about a specific doc - 4. Provide a specific doc based on a question/information - 5. Provide general information - 6. Put cards in a specific order. + ${GPTTypeStyle.AssignTags}. Assigns docs with tags(like star / heart etc)/labels, + ${GPTTypeStyle.ChooseDoc}. Filter docs, + ${GPTTypeStyle.DocInfo}. Provide information about a specific doc + ${GPTTypeStyle.Filter}. Provide a specific doc based on a question/information + ${GPTTypeStyle.GeneralInfo}. Provide general information + ${GPTTypeStyle.SortDocs}. Put cards in a specific order. Answer with only the number for 2-6. For number one, provide the number (1) and the appropriate tag`, }, subset: { -- cgit v1.2.3-70-g09d2