| 362 | /** | 362 | /** |
| 363 | * Convert a prompt from the ChatML objects to the format used by Google MakerSuite models. | 363 | * Convert a prompt from the ChatML objects to the format used by Google MakerSuite models. |
| 364 | * @param {object[]} messages Array of messages | 364 | * @param {object[]} messages Array of messages |
| 365 | * @param {string} model Model name | 365 | * @param {string} _model Model name |
| 366 | * @param {boolean} useSysPrompt Use system prompt | 366 | * @param {boolean} useSysPrompt Use system prompt |
| 367 | * @param {PromptNames} names Prompt names | 367 | * @param {PromptNames} names Prompt names |
| 368 | * @returns {{contents: *[], system_instruction: {parts: {text: string}[]}}} Prompt for Google MakerSuite models | 368 | * @returns {{contents: *[], system_instruction: {parts: {text: string}[]}}} Prompt for Google MakerSuite models |
| 369 | */ | 369 | */ |
| 370 | export function convertGooglePrompt(messages, model, useSysPrompt, names) { | 370 | export function convertGooglePrompt(messages, _model, useSysPrompt, names) { |
| 371 | const visionSupportedModelPrefix = [ | | |
| 372 | 'gemini-1.5', | | |
| 373 | 'gemini-2.0', | | |
| 374 | 'gemini-2.5', | | |
| 375 | 'gemini-exp-1114', | | |
| 376 | 'gemini-exp-1121', | | |
| 377 | 'gemini-exp-1206', | | |
| 378 | ]; | | |
| 379 | | | |
| 380 | const isMultimodal = visionSupportedModelPrefix.some(prefix => model.startsWith(prefix)); | | |
| 381 | const sysPrompt = []; | 371 | const sysPrompt = []; |
| 382 | | 372 | |
| 383 | if (useSysPrompt) { | 373 | if (useSysPrompt) { |