fix: file_id undefined bug (#275)

This commit is contained in:
Archer
2023-09-11 10:15:52 +08:00
committed by GitHub
parent 7917766024
commit ae2887e956
3 changed files with 13 additions and 3 deletions

View File

@@ -68,6 +68,7 @@ export async function getVector({
)
.then(async (res) => {
if (!res.data?.data?.[0]?.embedding) {
console.log(res.data);
// @ts-ignore
return Promise.reject(res.data?.err?.message || 'Embedding API Error');
}