ai: allow selecting chatgpt-compatible chatbot provider (#152)

This commit is contained in:
end-4
2024-02-27 11:27:47 +07:00
parent 71a6ceacc8
commit 7cd77e3168
11 changed files with 295 additions and 98 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ const { execAsync, exec } = Utils;
import { setupCursorHover, setupCursorHoverInfo } from '../.widgetutils/cursorhover.js';
import { contentStack } from './sideleft.js';
// APIs
import ChatGPT from '../../services/chatgpt.js';
import ChatGPT from '../../services/gpt.js';
import Gemini from '../../services/gemini.js';
import { geminiView, geminiCommands, sendMessage as geminiSendMessage, geminiTabIcon } from './apis/gemini.js';
import { chatGPTView, chatGPTCommands, sendMessage as chatGPTSendMessage, chatGPTTabIcon } from './apis/chatgpt.js';
@@ -26,12 +26,12 @@ const APIS = [
placeholderText: 'Message Gemini...',
},
{
name: 'Assistant (ChatGPT 3.5)',
name: 'Assistant (GPTs)',
sendCommand: chatGPTSendMessage,
contentWidget: chatGPTView,
commandBar: chatGPTCommands,
tabIcon: chatGPTTabIcon,
placeholderText: 'Message ChatGPT...',
placeholderText: 'Message the model...',
},
{
name: 'Waifus',