rewrite converting the photos to a list if they aren't

This commit is contained in:
buzz-lightsnack-2007 2024-05-11 22:54:17 +08:00
parent 0e8da31b9a
commit 1cc23ec2ec

View file

@ -94,9 +94,9 @@ export default class gemini {
// Convert the photos to a list if it isn't set to be one. // Convert the photos to a list if it isn't set to be one.
if (PROMPT[REQUEST[`contents`].length][`images`] ? !Array.isArray(PROMPT[REQUEST[`contents`].length][`images`]) : false) { (PROMPT[REQUEST[`contents`].length][`images`] ? !Array.isArray(PROMPT[REQUEST[`contents`].length][`images`]) : false)
PROMPT[REQUEST[`contents`].length][`images`] = [PROMPT[REQUEST[`contents`].length][`images`]]; ? PROMPT[REQUEST[`contents`].length][`images`] = [PROMPT[REQUEST[`contents`].length][`images`]]
} : false;
// Add the photos, which are already in the blob format. // Add the photos, which are already in the blob format.
while ((PROMPT[REQUEST[`contents`].length][`images`]) ? (MESSAGE[`parts`].length < PROMPT[REQUEST[`contents`].length][`images`].length) : false) { while ((PROMPT[REQUEST[`contents`].length][`images`]) ? (MESSAGE[`parts`].length < PROMPT[REQUEST[`contents`].length][`images`].length) : false) {