Skip to content

Commit e6cda44

Browse files
committed
Use ChatCompletion instead of Completion
It appears that in release builds only the Completion API is producing an error. Moving to ChatCompletion to work around. Workaround for #60
1 parent ce1cf74 commit e6cda44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AiQuery.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function AiSectionWithQuery({prompt, intent, id, onResponse}: AiSectionWithQuery
3939
return;
4040
}
4141
CallOpenAi({
42-
api: OpenAiApi.Completion,
42+
api: OpenAiApi.ChatCompletion,
4343
apiKey: settingsContext.apiKey,
4444
instructions: `You are an intuitive assistant helping the user with a project. Your only job is need to determine the primary intent of the user's last prompt.
4545
If and only if you are absolutely certain the user's primary intent is to see an image, respond with exactly the string "${imageIntentSentinel}". Otherwise, respond with your description of their intent.`,

0 commit comments

Comments
 (0)