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 = {
|
var body = {
|
||||||
model: model,
|
model: model,
|
||||||
messages: messages,
|
messages: messages,
|
||||||
modalities: isGemini ? ['image', 'text'] : ['image'],
|
modalities: ['image'],
|
||||||
image_config: {
|
image_config: {
|
||||||
aspect_ratio: aspectRatio,
|
aspect_ratio: aspectRatio,
|
||||||
image_size: imageSize
|
image_size: imageSize
|
||||||
@@ -294,7 +294,6 @@
|
|||||||
'Authorization': 'Bearer ' + getApiKey(),
|
'Authorization': 'Bearer ' + getApiKey(),
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'HTTP-Referer': 'https://vibegif.lol',
|
'HTTP-Referer': 'https://vibegif.lol',
|
||||||
'X-OpenRouter-Title': 'vibegif.lol',
|
|
||||||
'X-Title': 'vibegif.lol'
|
'X-Title': 'vibegif.lol'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(body)
|
body: JSON.stringify(body)
|
||||||
@@ -313,11 +312,7 @@
|
|||||||
var images = choice.message && choice.message.images;
|
var images = choice.message && choice.message.images;
|
||||||
if (images && images.length) {
|
if (images && images.length) {
|
||||||
var imgObj = images[0];
|
var imgObj = images[0];
|
||||||
b64 =
|
b64 = (imgObj.image_url && imgObj.image_url.url) || imgObj.url || imgObj;
|
||||||
(imgObj && imgObj.image_url && imgObj.image_url.url) ||
|
|
||||||
(imgObj && imgObj.imageUrl && imgObj.imageUrl.url) ||
|
|
||||||
(imgObj && imgObj.url) ||
|
|
||||||
imgObj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!b64 && choice.message && Array.isArray(choice.message.content)) {
|
if (!b64 && choice.message && Array.isArray(choice.message.content)) {
|
||||||
@@ -327,10 +322,6 @@
|
|||||||
b64 = part.image_url.url;
|
b64 = part.image_url.url;
|
||||||
break;
|
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() {
|
if (el.selModel) el.selModel.addEventListener('change', function() {
|
||||||
var isGemini = el.selModel.value.indexOf('google/') === 0;
|
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 (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);
|
if (el.btnGenerate) el.btnGenerate.addEventListener('click', handleGenerate);
|
||||||
|
|
||||||
console.log('vibegif.lol booted ✓');
|
console.log('vibegif.lol booted ✓');
|
||||||
@@ -529,3 +516,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user