mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 11:58:38 +00:00
fix: bill, app detail
This commit is contained in:
@@ -39,8 +39,12 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
|
||||
|
||||
const { kb_ids = [], userChatInput } = req.body as Props;
|
||||
|
||||
if (!userChatInput || !Array.isArray(kb_ids)) {
|
||||
throw new Error('params is error');
|
||||
if (!userChatInput) {
|
||||
throw new Error('用户输入为空');
|
||||
}
|
||||
|
||||
if (!Array.isArray(kb_ids) || kb_ids.length === 0) {
|
||||
throw new Error('没有选择知识库');
|
||||
}
|
||||
|
||||
const result = await kbSearch({
|
||||
|
@@ -27,7 +27,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
_id: item._id,
|
||||
shareId: item.shareId,
|
||||
name: item.name,
|
||||
tokens: item.tokens,
|
||||
total: item.total,
|
||||
maxContext: item.maxContext,
|
||||
lastTime: item.lastTime
|
||||
}))
|
||||
|
@@ -188,7 +188,8 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
|
||||
|
||||
// bill
|
||||
finishTaskBill({
|
||||
billId
|
||||
billId,
|
||||
shareId
|
||||
});
|
||||
} catch (err: any) {
|
||||
delTaskBill(billId);
|
||||
|
Reference in New Issue
Block a user