mirror of
https://github.com/vibegif/vibegif.lol.git
synced 2026-04-07 02:12:12 +00:00
Revert: Update index.html
This commit is contained in:
22
index.html
22
index.html
@@ -277,7 +277,7 @@
|
||||
var body = {
|
||||
model: model,
|
||||
messages: messages,
|
||||
modalities: isGemini ? ['image', 'text'] : ['image'],
|
||||
modalities: ['image'],
|
||||
image_config: {
|
||||
aspect_ratio: aspectRatio,
|
||||
image_size: imageSize
|
||||
@@ -294,7 +294,6 @@
|
||||
'Authorization': 'Bearer ' + getApiKey(),
|
||||
'Content-Type': 'application/json',
|
||||
'HTTP-Referer': 'https://vibegif.lol',
|
||||
'X-OpenRouter-Title': 'vibegif.lol',
|
||||
'X-Title': 'vibegif.lol'
|
||||
},
|
||||
body: JSON.stringify(body)
|
||||
@@ -313,11 +312,7 @@
|
||||
var images = choice.message && choice.message.images;
|
||||
if (images && images.length) {
|
||||
var imgObj = images[0];
|
||||
b64 =
|
||||
(imgObj && imgObj.image_url && imgObj.image_url.url) ||
|
||||
(imgObj && imgObj.imageUrl && imgObj.imageUrl.url) ||
|
||||
(imgObj && imgObj.url) ||
|
||||
imgObj;
|
||||
b64 = (imgObj.image_url && imgObj.image_url.url) || imgObj.url || imgObj;
|
||||
}
|
||||
|
||||
if (!b64 && choice.message && Array.isArray(choice.message.content)) {
|
||||
@@ -327,10 +322,6 @@
|
||||
b64 = part.image_url.url;
|
||||
break;
|
||||
}
|
||||
if (part.type === 'image_url' && part.imageUrl && part.imageUrl.url) {
|
||||
b64 = part.imageUrl.url;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,15 +500,11 @@
|
||||
|
||||
if (el.selModel) el.selModel.addEventListener('change', function() {
|
||||
var isGemini = el.selModel.value.indexOf('google/') === 0;
|
||||
var opt05 = el.selSize && el.selSize.querySelector('option[value="0.5K"]');
|
||||
var opt05 = el.selSize.querySelector('option[value="0.5K"]');
|
||||
if (opt05) opt05.disabled = !isGemini;
|
||||
if (!isGemini && el.selSize && el.selSize.value === '0.5K') el.selSize.value = '1K';
|
||||
if (!isGemini && el.selSize.value === '0.5K') el.selSize.value = '1K';
|
||||
});
|
||||
|
||||
if (el.selModel) {
|
||||
try { el.selModel.dispatchEvent(new Event('change')); } catch (_) {}
|
||||
}
|
||||
|
||||
if (el.btnGenerate) el.btnGenerate.addEventListener('click', handleGenerate);
|
||||
|
||||
console.log('vibegif.lol booted ✓');
|
||||
@@ -529,3 +516,4 @@
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user