webstorm moment

This commit is contained in:
based 2023-12-15 02:01:42 +10:00
parent 60880cfd4d
commit 5071b9a369
3 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
import {getRequestHeaders} from '../../script.js'; import { getRequestHeaders } from '../../script.js';
import {extension_settings} from '../extensions.js'; import { extension_settings } from '../extensions.js';
import {SECRET_KEYS, secret_state} from '../secrets.js'; import { SECRET_KEYS, secret_state } from '../secrets.js';
import {createThumbnail} from '../utils.js'; import { createThumbnail } from '../utils.js';
/** /**
* Generates a caption for an image using a multimodal model. * Generates a caption for an image using a multimodal model.

View File

@ -56,7 +56,7 @@ import {
resetScrollHeight, resetScrollHeight,
stringFormat, stringFormat,
} from './utils.js'; } from './utils.js';
import {countTokensOpenAI, getTokenizerModel} from './tokenizers.js'; import { countTokensOpenAI, getTokenizerModel } from './tokenizers.js';
import { import {
formatInstructModeChat, formatInstructModeChat,
formatInstructModeExamples, formatInstructModeExamples,

View File

@ -72,12 +72,12 @@ function convertClaudePrompt(messages, addHumanPrefix, addAssistantPostfix, with
return requestPrompt; return requestPrompt;
} }
function convertGooglePrompt(messages, type) { function convertGooglePrompt(messages, model) {
const contents = []; const contents = [];
let lastRole = ''; let lastRole = '';
let currentText = ''; let currentText = '';
const isMultimodal = type === 'gemini-pro-vision'; const isMultimodal = model === 'gemini-pro-vision';
if (isMultimodal) { if (isMultimodal) {
const combinedText = messages.map((message) => { const combinedText = messages.map((message) => {