انتقل إلى المحتوى الرئيسي

Class: SimpleResponseBuilder

A response builder that just concatenates responses.

Implements

Constructors

constructor

new SimpleResponseBuilder(serviceContext, textQATemplate?): SimpleResponseBuilder

Parameters

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

Returns

SimpleResponseBuilder

Defined in

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

Properties

llm

llm: LLM

Defined in

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


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:40

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:47

getResponse(params): Promise<string>

Parameters

NameType
paramsResponseBuilderParamsNonStreaming

Returns

Promise<string>

Implementation of

ResponseBuilder.getResponse

Defined in

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