aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/gpt/GPT.ts
diff options
context:
space:
mode:
authoreleanor-park <eleanor_park@brown.edu>2024-07-11 12:08:26 -0400
committereleanor-park <eleanor_park@brown.edu>2024-07-11 12:08:26 -0400
commitb88f3a79b4558b222864b7c925fd0d5086cdcea2 (patch)
tree4f830b4a4dd96948983115e1e5bff07a1a6eb3d1 /src/client/apis/gpt/GPT.ts
parent4438e7fe202ff4091b26f073122e7866ec9abb46 (diff)
Revert "Merge branch 'eleanor-gptdraw' into master"
This reverts commit 4438e7fe202ff4091b26f073122e7866ec9abb46, reversing changes made to 59ca918ea0918b41f1e2fa4b6acb8725ca9b44af.
Diffstat (limited to 'src/client/apis/gpt/GPT.ts')
-rw-r--r--src/client/apis/gpt/GPT.ts11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts
index a7bd05a21..05007960d 100644
--- a/src/client/apis/gpt/GPT.ts
+++ b/src/client/apis/gpt/GPT.ts
@@ -12,7 +12,6 @@ enum GPTCallType {
DESCRIBE = 'describe',
MERMAID = 'mermaid',
DATA = 'data',
- DRAW = 'draw',
}
type GPTCallOpts = {
@@ -54,12 +53,6 @@ const callTypeMap: { [type: string]: GPTCallOpts } = {
temp: 0,
prompt: 'List unique differences between the content of the UserAnswer and Rubric. Before each difference, label it and provide any additional information the UserAnswer missed and explain it in second person without separating it into UserAnswer and Rubric content and additional information. If there are no differences, say correct',
},
- draw: {
- model: 'gpt-4o',
- maxTokens: 1024,
- temp: 0.5,
- prompt: 'Given an item, a level of complexity from 1-10, and a size in pixels, generate a detailed and colored line drawing representation of it. Make sure every element has the stroke field filled out. More complex drawings will have much more detail and strokes. The drawing should be in SVG format with no additional text or comments. For path coordinates, make sure you format with a comma between numbers, like M100,200 C150,250 etc. The only supported commands are line, ellipse, circle, rect, and path with M, Q, C, and L so only use those.',
- },
};
let lastCall = '';
@@ -70,10 +63,10 @@ let lastResp = '';
* @param inputText Text to process
* @returns AI Output
*/
-const gptAPICall = async (inputTextIn: string, callType: GPTCallType, prompt?: any, dontCache?: boolean) => {
+const gptAPICall = async (inputTextIn: string, callType: GPTCallType, prompt?: any) => {
const inputText = [GPTCallType.SUMMARY, GPTCallType.FLASHCARD, GPTCallType.QUIZ].includes(callType) ? inputTextIn + '.' : inputTextIn;
const opts: GPTCallOpts = callTypeMap[callType];
- if (lastCall === inputText && dontCache !== true) return lastResp;
+ if (lastCall === inputText) return lastResp;
try {
lastCall = inputText;