Spaces:
Running
Running
Update index.html
Browse files- index.html +6 -0
index.html
CHANGED
@@ -91,6 +91,8 @@
|
|
91 |
<script>modelNameEl.value = localStorage.modelName || 'OpenGVLab/InternVL2-40B-AWQ';</script>
|
92 |
<input id="apiKeyEl" placeholder="API key (optional)" style="width:300px;" oninput="localStorage.apiKey=this.value">
|
93 |
<script>apiKeyEl.value = localStorage.apiKey || '';</script>
|
|
|
|
|
94 |
</div>
|
95 |
|
96 |
<button id="imageLoader"><b>1. Select test images</b></button>
|
@@ -365,11 +367,15 @@
|
|
365 |
};
|
366 |
if(serverOrigin.trim().includes("api.anthropic.com/")) headers["anthropic-dangerous-direct-browser-access"] = "true";
|
367 |
|
|
|
|
|
|
|
368 |
let startTime = Date.now();
|
369 |
let result = await fetch(`${serverOrigin.trim().replace(/\/$/, "")}/v1/chat/completions`, {
|
370 |
headers,
|
371 |
body: JSON.stringify({
|
372 |
model: modelName.trim(),
|
|
|
373 |
stream: false,
|
374 |
messages,
|
375 |
}),
|
|
|
91 |
<script>modelNameEl.value = localStorage.modelName || 'OpenGVLab/InternVL2-40B-AWQ';</script>
|
92 |
<input id="apiKeyEl" placeholder="API key (optional)" style="width:300px;" oninput="localStorage.apiKey=this.value">
|
93 |
<script>apiKeyEl.value = localStorage.apiKey || '';</script>
|
94 |
+
<input id="temperatureEl" placeholder="Temperature (defaults to 1)" style="width:300px;" oninput="localStorage.temperature=this.value">
|
95 |
+
<script>temperatureEl.value = localStorage.temperature || '';</script>
|
96 |
</div>
|
97 |
|
98 |
<button id="imageLoader"><b>1. Select test images</b></button>
|
|
|
367 |
};
|
368 |
if(serverOrigin.trim().includes("api.anthropic.com/")) headers["anthropic-dangerous-direct-browser-access"] = "true";
|
369 |
|
370 |
+
let temperature = Number(temperatureEl.value.trim() || 1);
|
371 |
+
if(isNaN(temperature)) temperature = 1;
|
372 |
+
|
373 |
let startTime = Date.now();
|
374 |
let result = await fetch(`${serverOrigin.trim().replace(/\/$/, "")}/v1/chat/completions`, {
|
375 |
headers,
|
376 |
body: JSON.stringify({
|
377 |
model: modelName.trim(),
|
378 |
+
temperature,
|
379 |
stream: false,
|
380 |
messages,
|
381 |
}),
|