gitignore updated
This commit is contained in:
parent
13685c9976
commit
d84777c2bb
2 changed files with 4 additions and 16 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,4 +2,5 @@ node_modules
|
|||
.env
|
||||
*.log
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Thumbs.db
|
||||
.vscode
|
|
@ -17,17 +17,10 @@ function changeTitle(newTitle) {
|
|||
|
||||
async function getModelsUrn() {
|
||||
try {
|
||||
// const resp = await fetch("/api/theurn");
|
||||
// if (!resp.ok) {
|
||||
// throw new Error(await resp.text());
|
||||
// }
|
||||
// const data = await resp.json();
|
||||
// const urn = data.urn;
|
||||
const resp1 = await fetch("/api/models");
|
||||
const resp1 = await fetch("/api/models"); // api call to get all available models
|
||||
const allmodels = await resp1.json();
|
||||
const resp2 = await fetch("/api/selectedmodel")
|
||||
const resp2 = await fetch("/api/selectedmodel") // api call to get configured model name
|
||||
const selectModelName = await resp2.json();
|
||||
// const data2 = await resp2.json();
|
||||
for (let i = 0; i < allmodels.length; i++){
|
||||
if (allmodels[i].name == selectModelName.name){
|
||||
console.log(allmodels[i].urn);
|
||||
|
@ -35,12 +28,6 @@ async function getModelsUrn() {
|
|||
return allmodels[i].urn;
|
||||
}
|
||||
}
|
||||
// const urns = models.map((model) => model.urn);
|
||||
// const titles = models.map((model) => model.name);
|
||||
// const randomIndex = Math.floor(Math.random() * urns.length);
|
||||
// console.log(urns)
|
||||
// changeTitle(titles[urnModelID]);
|
||||
// return urn;
|
||||
} catch (err) {
|
||||
alert("Could not list models. See the console for more details.");
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in a new issue