perf: date and warning

This commit is contained in:
archer
2023-07-20 21:15:20 +08:00
parent e0b6860706
commit f362ba2589
7 changed files with 25 additions and 34 deletions

View File

@@ -42,6 +42,12 @@ export async function getVector({
}: { userId?: string } & Props) {
userId && (await authBalanceByUid(userId));
for (let i = 0; i < input.length; i++) {
if (!input[i]) {
return Promise.reject('向量生成模块输入内容为空');
}
}
// 获取 chatAPI
const chatAPI = getOpenAIApi();