chore: format

This commit is contained in:
Timothy Jaeryang Baek committed 2024-12-19 01:07:50 -08:00
1 parent 0d5ce23885
commit c3e8cd03b2
51 files changed
+57 -60

No files matched your search

+8 -7
View File
@@ -287,14 +287,15 @@ export const generateOpenAIChatCompletion = async (
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
}).then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = `OpenAI: ${err?.detail ?? 'Network Problem'}`;
return null;
});
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = `OpenAI: ${err?.detail ?? 'Network Problem'}`;
return null;
});
if (error) {
throw error;