Revert gemini-pro-vision to use gemini-pro

An error 400 always occurs through gemini-pro-vision, so gemini-pro might work better.

There's no need to change the message structure.
This commit is contained in:
buzz-lightsnack-2007 2024-04-15 14:25:57 +08:00
parent beca6c6b9c
commit fba38ba823

View file

@ -80,7 +80,7 @@ export default class product {
if ((this.analysis && this.analysis != null && this.analysis != undefined) ? !((typeof this.analysis).contains(`obj`) && !Array.isArray(this.analysis)) : true) { if ((this.analysis && this.analysis != null && this.analysis != undefined) ? !((typeof this.analysis).contains(`obj`) && !Array.isArray(this.analysis)) : true) {
// Analyze the data. // Analyze the data.
const gemini = (await import(chrome.runtime.getURL("scripts/AI/gemini.js"))).default; const gemini = (await import(chrome.runtime.getURL("scripts/AI/gemini.js"))).default;
let analyzer = new gemini (await secretariat.read([`settings`,`analysis`,`api`,`key`]), `gemini-pro-vision`); let analyzer = new gemini (await secretariat.read([`settings`,`analysis`,`api`,`key`]), `gemini-pro`);
// Analyze the data. // Analyze the data.
let PROMPT = []; let PROMPT = [];