Skip to content

Commit

Permalink
fix: update authentication logic for LLM prompts to prioritize emailA… (
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshpokar authored Nov 22, 2024
1 parent 80c00a8 commit c60f5ca
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ class Menu {
<p id="email_auth_key_container" class="multi_container">
<input type="email" size="50" id="email_auth_key" aria-label="Enter your email address">
<button aria-label="Delete Email Address" title="Delete Email Address" id="delete_email_key" class="invis_button">&times;</button>
<label for="gemini_auth_key">Email Authentication</label>
<label for="email_authentication">Email Authentication</label>
<button type="button" id="verify">Verify</button>
</p>
<p id="openai_auth_key_container" class="multi_container hidden">
Expand Down Expand Up @@ -2093,31 +2093,31 @@ class ChatLLM {
if (firsttime) {
img = await this.ConvertSVGtoJPG(singleMaidr.id, 'openai');
}
if (constants.openAIAuthKey) {
chatLLM.OpenAIPrompt(text, img);
} else {
if (constants.emailAuthKey) {
chatLLM.OpenAIPromptAPI(text, img);
} else {
chatLLM.OpenAIPrompt(text, img);
}
}
if ('gemini' in constants.LLMModels) {
if (firsttime) {
img = await this.ConvertSVGtoJPG(singleMaidr.id, 'gemini');
}
if (constants.geminiAuthKey) {
chatLLM.GeminiPrompt(text, img);
} else {
if (constants.emailAuthKey) {
chatLLM.GeminiPromptAPI(text, img);
} else {
chatLLM.GeminiPrompt(text, img);
}
}

if ('claude' in constants.LLMModels) {
if (firsttime) {
img = await this.ConvertSVGtoJPG(singleMaidr.id, 'claude');
}
if (constants.claudeAuthKey) {
chatLLM.ClaudePrompt(text, img);
} else {
if (constants.emailAuthKey) {
chatLLM.ClaudePromptAPI(text, img);
} else {
chatLLM.ClaudePrompt(text, img);
}
}
}
Expand Down

0 comments on commit c60f5ca

Please sign in to comment.