Update docs and response tag in share page (#694)

* perf: chunk index show

* share response

* perf: vector query

* web printFinger

* remove log

* fix: bucket name

* perf: training schema

* perf: sort index
This commit is contained in:
Archer
2024-01-05 18:02:37 +08:00
committed by GitHub
parent 331d18c88f
commit 3f088bce6a
23 changed files with 242 additions and 181 deletions

View File

@@ -10,6 +10,7 @@ import { updateApiKeyUsage } from '@fastgpt/service/support/openapi/tools';
import { getBillSourceByAuthType } from '@fastgpt/global/support/wallet/bill/tools';
type Props = GetVectorProps & {
input: string | string[];
billId?: string;
};
@@ -22,6 +23,8 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
throw new Error('input is nor array or string');
}
const query = Array.isArray(input) ? input[0] : input;
const { teamId, tmbId, apikey, authType } = await authCert({
req,
authToken: true,
@@ -30,7 +33,7 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
await authTeamBalance(teamId);
const { tokens, vectors } = await getVectorsByText({ input, model });
const { tokens, vectors } = await getVectorsByText({ input: query, model });
jsonRes(res, {
data: {