This commit is contained in:
Archer
2023-11-15 11:36:25 +08:00
committed by GitHub
parent 592e1a93a2
commit bfd8be5df0
181 changed files with 2499 additions and 1552 deletions

View File

@@ -170,7 +170,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
// auth app, get history
const { history } = await getChatHistory({ chatId, tmbId: user.team.tmbId });
const isOwner = !shareId && String(user.team.tmbId) === String(app.tmbId);
const isAppOwner = !shareId && String(user.team.tmbId) === String(app.tmbId);
/* format prompts */
const prompts = history.concat(gptMessage2ChatType(messages));
@@ -208,7 +208,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
teamId: user.team.teamId,
tmbId: user.team.tmbId,
variables,
isOwner, // owner update use time
updateUseTime: isAppOwner, // owner update use time
shareId,
source: (() => {
if (shareId) {