4.6.7-alpha commit (#743)

Co-authored-by: Archer <545436317@qq.com>
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
Archer
2024-01-19 11:17:28 +08:00
committed by GitHub
parent 8ee7407c4c
commit c031e6dcc9
324 changed files with 8509 additions and 4757 deletions

View File

@@ -33,7 +33,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
await authTeamBalance(teamId);
const { tokens, vectors } = await getVectorsByText({ input: query, model });
const { charsLength, vectors } = await getVectorsByText({ input: query, model });
res.json({
object: 'list',
@@ -44,15 +44,15 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
})),
model,
usage: {
prompt_tokens: tokens,
total_tokens: tokens
prompt_tokens: charsLength,
total_tokens: charsLength
}
});
const { total } = pushGenerateVectorBill({
teamId,
tmbId,
tokens,
charsLength,
model,
billId,
source: getBillSourceByAuthType({ authType })