Class: PromptHelper
A collection of helper functions for working with prompts.
Constructors
new PromptHelper()
new PromptHelper(
contextWindow
,numOutput
,chunkOverlapRatio
,chunkSizeLimit
?,tokenizer
?,separator
?):PromptHelper
Parameters
• contextWindow: number
= DEFAULT_CONTEXT_WINDOW
• numOutput: number
= DEFAULT_NUM_OUTPUTS
• chunkOverlapRatio: number
= DEFAULT_CHUNK_OVERLAP_RATIO
• chunkSizeLimit?: number
• tokenizer?: Tokenizer
• separator?: string
= " "
Returns
Source
packages/core/src/PromptHelper.ts:41
Properties
chunkOverlapRatio
chunkOverlapRatio:
number
=DEFAULT_CHUNK_OVERLAP_RATIO
Source
packages/core/src/PromptHelper.ts:35
chunkSizeLimit?
optional
chunkSizeLimit:number
Source
packages/core/src/PromptHelper.ts:36
contextWindow
contextWindow:
number
=DEFAULT_CONTEXT_WINDOW
Source
packages/core/src/PromptHelper.ts:33
numOutput
numOutput:
number
=DEFAULT_NUM_OUTPUTS
Source
packages/core/src/PromptHelper.ts:34
separator
separator:
string
=" "
Source
packages/core/src/PromptHelper.ts:38
tokenizer
tokenizer:
Tokenizer
Source
packages/core/src/PromptHelper.ts:37