Class: DefaultContextGenerator
Implements
Constructors
constructor
• new DefaultContextGenerator(init
)
Parameters
Name | Type |
---|---|
init | Object |
init.contextSystemPrompt? | (__namedParameters : Object ) => string |
init.nodePostprocessors? | BaseNodePostprocessor [] |
init.retriever | BaseRetriever |
Defined in
packages/core/src/ChatEngine.ts:188
Properties
contextSystemPrompt
• contextSystemPrompt: (__namedParameters
: Object
) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
Returns
string
Defined in
packages/core/src/ChatEngine.ts:185
nodePostprocessors
• nodePostprocessors: BaseNodePostprocessor
[]
Defined in
packages/core/src/ChatEngine.ts:186
retriever
• retriever: BaseRetriever
Defined in
packages/core/src/ChatEngine.ts:184
Methods
applyNodePostprocessors
▸ Private
applyNodePostprocessors(nodes
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
nodes | NodeWithScore <Metadata >[] |
Returns
Defined in
packages/core/src/ChatEngine.ts:199
generate
▸ generate(message
, parentEvent?
): Promise
<Context
>
Parameters
Name | Type |
---|---|
message | string |
parentEvent? | Event |
Returns
Promise
<Context
>