Class: PromptHelper
A collection of helper functions for working with prompts.
Constructors
constructor
• new PromptHelper(contextWindow?
, numOutput?
, chunkOverlapRatio?
, chunkSizeLimit?
, tokenizer?
, separator?
): PromptHelper
Parameters
Name | Type | Default value |
---|---|---|
contextWindow | number | DEFAULT_CONTEXT_WINDOW |
numOutput | number | DEFAULT_NUM_OUTPUTS |
chunkOverlapRatio | number | DEFAULT_CHUNK_OVERLAP_RATIO |
chunkSizeLimit? | number | undefined |
tokenizer? | (text : string ) => Uint32Array | undefined |
separator | string | " " |
Returns
Defined in
packages/core/src/PromptHelper.ts:41
Properties
chunkOverlapRatio
• chunkOverlapRatio: number
= DEFAULT_CHUNK_OVERLAP_RATIO
Defined in
packages/core/src/PromptHelper.ts:35
chunkSizeLimit
• Optional
chunkSizeLimit: number
Defined in
packages/core/src/PromptHelper.ts:36
contextWindow
• contextWindow: number
= DEFAULT_CONTEXT_WINDOW
Defined in
packages/core/src/PromptHelper.ts:33
numOutput
• numOutput: number
= DEFAULT_NUM_OUTPUTS
Defined in
packages/core/src/PromptHelper.ts:34
separator
• separator: string
= " "
Defined in
packages/core/src/PromptHelper.ts:38