Passa al contenuto principale

Class: SimpleResponseBuilder

A response builder that just concatenates responses.

Implements

Constructors

constructor

new SimpleResponseBuilder(serviceContext?, textQATemplate?): SimpleResponseBuilder

Parameters

NameType
serviceContext?ServiceContext
textQATemplate?(__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Returns

SimpleResponseBuilder

Defined in

packages/core/src/synthesizers/builders.ts:46

Properties

llm

llm: LLM<object, object>

Defined in

packages/core/src/synthesizers/builders.ts:43


textQATemplate

textQATemplate: (__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Type declaration

▸ («destructured»): string

Parameters
NameTypeDefault value
«destructured»Objectundefined
› contextundefined | string""
› queryundefined | string""
Returns

string

Defined in

packages/core/src/synthesizers/builders.ts:44

Methods

getResponse

getResponse(params): Promise<AsyncIterable<string>>

Get the response from a query and a list of text chunks.

Parameters

NameType
paramsResponseBuilderParamsStreaming

Returns

Promise<AsyncIterable<string>>

Implementation of

ResponseBuilder.getResponse

Defined in

packages/core/src/synthesizers/builders.ts:51

getResponse(params): Promise<string>

Parameters

NameType
paramsResponseBuilderParamsNonStreaming

Returns

Promise<string>

Implementation of

ResponseBuilder.getResponse

Defined in

packages/core/src/synthesizers/builders.ts:54