Skip to content

Refine

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:38

A response builder that uses the query to ask the LLM generate a better response using multiple text chunks.

new Refine(options): Refine

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:42

BaseSynthesizerOptions & object

Refine

BaseSynthesizer.constructor

llm: LLM

Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:15

BaseSynthesizer.llm


promptHelper: PromptHelper

Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:16

BaseSynthesizer.promptHelper


textQATemplate: TextQAPrompt

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:39


refineTemplate: RefinePrompt

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:40

validatePrompts(promptsDict, moduleDict): void

Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:8

PromptsRecord

ModuleRecord

void

BaseSynthesizer.validatePrompts


getPrompts(): PromptsRecord

Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:22

PromptsRecord

BaseSynthesizer.getPrompts


updatePrompts(prompts): void

Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:39

PromptsRecord

void

BaseSynthesizer.updatePrompts


synthesize(query, stream): Promise<AsyncIterable<EngineResponse, any, any>>

Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:31

SynthesizeQuery

true

Promise<AsyncIterable<EngineResponse, any, any>>

BaseSynthesizer.synthesize

synthesize(query, stream?): Promise<EngineResponse>

Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:35

SynthesizeQuery

false

Promise<EngineResponse>

BaseSynthesizer.synthesize


protected _getPromptModules(): ModuleRecord

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:53

Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).

Can be blank if no sub-modules.

ModuleRecord

BaseSynthesizer._getPromptModules


protected _getPrompts(): object

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:57

object

textQATemplate: TextQAPrompt

refineTemplate: RefinePrompt

BaseSynthesizer._getPrompts


protected _updatePrompts(prompts): void

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:67

TextQAPrompt

RefinePrompt

void

BaseSynthesizer._updatePrompts


getResponse(query, nodes, stream): Promise<AsyncIterable<EngineResponse, any, any>>

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:80

MessageContent

NodeWithScore<Metadata>[]

true

Promise<AsyncIterable<EngineResponse, any, any>>

BaseSynthesizer.getResponse

getResponse(query, nodes, stream): Promise<EngineResponse>

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:85

MessageContent

NodeWithScore<Metadata>[]

false

Promise<EngineResponse>

BaseSynthesizer.getResponse


complete(params): Promise<string | AsyncIterable<string, any, any>>

Defined in: .build/typescript/packages/core/src/response-synthesizers/factory.ts:199

string

boolean

Promise<string | AsyncIterable<string, any, any>>