mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Vision models clean-up
This commit is contained in:
@@ -5098,68 +5098,36 @@ export function isImageInliningSupported() {
|
|||||||
|
|
||||||
// gultra just isn't being offered as multimodal, thanks google.
|
// gultra just isn't being offered as multimodal, thanks google.
|
||||||
const visionSupportedModels = [
|
const visionSupportedModels = [
|
||||||
|
// OpenAI
|
||||||
|
'chatgpt-4o-latest',
|
||||||
|
'gpt-4-turbo',
|
||||||
'gpt-4-vision',
|
'gpt-4-vision',
|
||||||
'gemini-2.5-pro-exp-03-25',
|
'gpt-4.1',
|
||||||
'gemini-2.5-pro-preview-03-25',
|
'gpt-4.5-preview',
|
||||||
'gemini-2.0-pro-exp',
|
'gpt-4o',
|
||||||
'gemini-2.0-pro-exp-02-05',
|
'o1',
|
||||||
'gemini-2.5-flash-preview-04-17',
|
'o3',
|
||||||
'gemini-2.0-flash-lite-preview',
|
'o4-mini',
|
||||||
'gemini-2.0-flash-lite-preview-02-05',
|
// 01.AI (Yi)
|
||||||
'gemini-2.0-flash',
|
'yi-vision',
|
||||||
'gemini-2.0-flash-001',
|
// Claude
|
||||||
'gemini-2.0-flash-thinking-exp-1219',
|
'claude-3',
|
||||||
'gemini-2.0-flash-thinking-exp-01-21',
|
// Cohere
|
||||||
'gemini-2.0-flash-thinking-exp',
|
'c4ai-aya-vision',
|
||||||
'gemini-2.0-flash-exp',
|
// Google AI Studio
|
||||||
'gemini-2.0-flash-exp-image-generation',
|
'gemini-1.5',
|
||||||
'gemini-1.5-flash',
|
'gemini-2.0',
|
||||||
'gemini-1.5-flash-latest',
|
'gemini-2.5',
|
||||||
'gemini-1.5-flash-001',
|
|
||||||
'gemini-1.5-flash-002',
|
|
||||||
'gemini-1.5-flash-exp-0827',
|
|
||||||
'gemini-1.5-flash-8b',
|
|
||||||
'gemini-1.5-flash-8b-exp-0827',
|
|
||||||
'gemini-1.5-flash-8b-exp-0924',
|
|
||||||
'gemini-exp-1114',
|
'gemini-exp-1114',
|
||||||
'gemini-exp-1121',
|
'gemini-exp-1121',
|
||||||
'gemini-exp-1206',
|
'gemini-exp-1206',
|
||||||
'gemini-1.0-pro-vision-latest',
|
// MistralAI
|
||||||
'gemini-1.5-pro',
|
|
||||||
'gemini-1.5-pro-latest',
|
|
||||||
'gemini-1.5-pro-001',
|
|
||||||
'gemini-1.5-pro-002',
|
|
||||||
'gemini-1.5-pro-exp-0801',
|
|
||||||
'gemini-1.5-pro-exp-0827',
|
|
||||||
'claude-3',
|
|
||||||
'claude-3-5',
|
|
||||||
'claude-3-7',
|
|
||||||
'gpt-4-turbo',
|
|
||||||
'gpt-4o',
|
|
||||||
'gpt-4o-mini',
|
|
||||||
'gpt-4.5-preview',
|
|
||||||
'gpt-4.5-preview-2025-02-27',
|
|
||||||
'o1',
|
|
||||||
'o1-2024-12-17',
|
|
||||||
'chatgpt-4o-latest',
|
|
||||||
'yi-vision',
|
|
||||||
'mistral-large-pixtral-2411',
|
|
||||||
'mistral-small-2503',
|
'mistral-small-2503',
|
||||||
'mistral-small-latest',
|
'mistral-small-latest',
|
||||||
'pixtral-12b-latest',
|
'pixtral',
|
||||||
'pixtral-12b',
|
// xAI (Grok)
|
||||||
'pixtral-12b-2409',
|
|
||||||
'pixtral-large-latest',
|
|
||||||
'pixtral-large-2411',
|
|
||||||
'c4ai-aya-vision-8b',
|
|
||||||
'c4ai-aya-vision-32b',
|
|
||||||
'grok-2-vision',
|
'grok-2-vision',
|
||||||
'grok-vision',
|
'grok-vision',
|
||||||
'gpt-4.1',
|
|
||||||
'o3',
|
|
||||||
'o3-2025-04-16',
|
|
||||||
'o4-mini',
|
|
||||||
'o4-mini-2025-04-16',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
switch (oai_settings.chat_completion_source) {
|
switch (oai_settings.chat_completion_source) {
|
||||||
|
@@ -359,41 +359,16 @@ export function convertCohereMessages(messages, names) {
|
|||||||
* @returns {{contents: *[], system_instruction: {parts: {text: string}}}} Prompt for Google MakerSuite models
|
* @returns {{contents: *[], system_instruction: {parts: {text: string}}}} Prompt for Google MakerSuite models
|
||||||
*/
|
*/
|
||||||
export function convertGooglePrompt(messages, model, useSysPrompt, names) {
|
export function convertGooglePrompt(messages, model, useSysPrompt, names) {
|
||||||
const visionSupportedModels = [
|
const visionSupportedModelPrefix = [
|
||||||
'gemini-2.5-pro-preview-03-25',
|
'gemini-1.5',
|
||||||
'gemini-2.5-pro-exp-03-25',
|
'gemini-2.0',
|
||||||
'gemini-2.0-pro-exp',
|
'gemini-2.5',
|
||||||
'gemini-2.0-pro-exp-02-05',
|
|
||||||
'gemini-2.5-flash-preview-04-17',
|
|
||||||
'gemini-2.0-flash-lite-preview',
|
|
||||||
'gemini-2.0-flash-lite-preview-02-05',
|
|
||||||
'gemini-2.0-flash',
|
|
||||||
'gemini-2.0-flash-001',
|
|
||||||
'gemini-2.0-flash-thinking-exp',
|
|
||||||
'gemini-2.0-flash-thinking-exp-01-21',
|
|
||||||
'gemini-2.0-flash-thinking-exp-1219',
|
|
||||||
'gemini-2.0-flash-exp',
|
|
||||||
'gemini-2.0-flash-exp-image-generation',
|
|
||||||
'gemini-1.5-flash',
|
|
||||||
'gemini-1.5-flash-latest',
|
|
||||||
'gemini-1.5-flash-001',
|
|
||||||
'gemini-1.5-flash-002',
|
|
||||||
'gemini-1.5-flash-exp-0827',
|
|
||||||
'gemini-1.5-flash-8b',
|
|
||||||
'gemini-1.5-flash-8b-exp-0827',
|
|
||||||
'gemini-1.5-flash-8b-exp-0924',
|
|
||||||
'gemini-exp-1114',
|
'gemini-exp-1114',
|
||||||
'gemini-exp-1121',
|
'gemini-exp-1121',
|
||||||
'gemini-exp-1206',
|
'gemini-exp-1206',
|
||||||
'gemini-1.5-pro',
|
|
||||||
'gemini-1.5-pro-latest',
|
|
||||||
'gemini-1.5-pro-001',
|
|
||||||
'gemini-1.5-pro-002',
|
|
||||||
'gemini-1.5-pro-exp-0801',
|
|
||||||
'gemini-1.5-pro-exp-0827',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const isMultimodal = visionSupportedModels.includes(model);
|
const isMultimodal = visionSupportedModelPrefix.some(prefix => model.startsWith(prefix));
|
||||||
|
|
||||||
let sys_prompt = '';
|
let sys_prompt = '';
|
||||||
if (useSysPrompt) {
|
if (useSysPrompt) {
|
||||||
|
Reference in New Issue
Block a user