continue-custom/core/util/parameters.ts
2024-10-31 18:21:07 -07:00

38 lines
1 KiB
TypeScript

import { TabAutocompleteOptions } from "../index.js";
export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = {
disable: false,
useCopyBuffer: false,
useFileSuffix: true,
maxPromptTokens: 1024,
prefixPercentage: 0.85,
maxSuffixPercentage: 0.25,
debounceDelay: 350,
multilineCompletions: "auto",
slidingWindowPrefixPercentage: 0.75,
slidingWindowSize: 500,
maxSnippetPercentage: 0.6,
recentlyEditedSimilarityThreshold: 0.0, // Effectively no threshold.
useCache: true,
onlyMyCode: true,
useOtherFiles: true,
useRecentlyEdited: true,
recentLinePrefixMatchMinLength: 7,
disableInFiles: undefined,
useImports: true,
useRootPathContext: true,
transform: true,
showWhateverWeHaveAtXMs: 300,
};
export const COUNT_COMPLETION_REJECTED_AFTER = 10_000;
export const DO_NOT_COUNT_REJECTED_BEFORE = 250;
export const RETRIEVAL_PARAMS = {
rerankThreshold: 0.3,
nFinal: 20,
nRetrieve: 50,
bm25Threshold: -2.5,
nResultsToExpandWithEmbeddings: 5,
nEmbeddingsExpandTo: 5,
};