rename resultSize to count

89c984830bc658139cf47fafdb941e2e038acdc3

zerofata <fxsliam@outlook.com>

Signed
1 files changed, +4 -4Ignore whitespace
public/scripts/extensions/vectors/index.js+4 -4
@@ -1615,12 +1615,12 @@ jQuery(async () => {
16151615 callback: async (args, query) => {
16161616 const clamp = (v) => Number.isNaN(v) ? null : Math.min(1, Math.max(0, v));
16171617 const threshold = clamp(Number(args?.threshold ?? settings.score_threshold));
16181618 const validateSizevalidateCount = (v) => Number.isNaN(v) || !Number.isInteger(v) || v < 1 ? null : v;
16191619 const resultSizecount = validateSizevalidateCount(Number(args?.resultSizecount)) ?? settings.chunk_count_db;
16201620 const source = String(args?.source ?? '');
16211621 const attachments = source ? getDataBankAttachmentsForSource(source, false) : getDataBankAttachments(false);
16221622 const collectionIds = await ingestDataBankAttachments(String(source));
16231623 const queryResults = await queryMultipleCollections(collectionIds, String(query), resultSizecount, threshold);
16241624
16251625 // Get URLs
16261626 const urls = Object
@@ -1651,7 +1651,7 @@ jQuery(async () => {
16511651 helpString: 'Search the Data Bank for a specific query using vector similarity. Returns a list of file URLs with the most relevant content.',
16521652 namedArgumentList: [
16531653 new SlashCommandNamedArgument('threshold', 'Threshold for the similarity score in the [0, 1] range. Uses the global config value if not set.', ARGUMENT_TYPE.NUMBER, false, false, ''),
16541654 new SlashCommandNamedArgument('resultSizecount', 'Maximum number of query results to return.', ARGUMENT_TYPE.NUMBER, false, false, ''),
16551655 new SlashCommandNamedArgument('source', 'Optional filter for the attachments by source.', ARGUMENT_TYPE.STRING, false, false, '', ['global', 'character', 'chat']),
16561656 SlashCommandNamedArgument.fromProps({
16571657 name: 'return',