feat: model share market

This commit is contained in:
archer
2023-04-27 23:41:42 +08:00
parent 46eb96c72e
commit 3b8e5d2738
34 changed files with 574 additions and 199 deletions

View File

@@ -27,9 +27,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
value: item.value
}));
await authModel({ modelId, userId, authOwner: false });
// 没有 chatId, 创建一个对话
if (!chatId) {
await authModel(modelId, userId);
const { _id } = await Chat.create({
userId,
modelId,