[chore] Fix type errors

This commit is contained in:
Cohee
2024-10-11 21:33:36 +03:00
parent 72138c632d
commit 4fcad0752f
25 changed files with 78 additions and 44 deletions

View File

@@ -154,7 +154,6 @@ router.post('/caption-image', jsonParser, async (request, response) => {
...headers,
},
body: JSON.stringify(body),
timeout: 0,
});
if (!result.ok) {
@@ -163,6 +162,7 @@ router.post('/caption-image', jsonParser, async (request, response) => {
return response.status(500).send(text);
}
/** @type {any} */
const data = await result.json();
console.log('Multimodal captioning response', data);
const caption = data?.choices[0]?.message?.content;
@@ -284,7 +284,6 @@ router.post('/generate-image', jsonParser, async (request, response) => {
Authorization: `Bearer ${key}`,
},
body: JSON.stringify(request.body),
timeout: 0,
});
if (!result.ok) {