Skip to main content

Class: EngineResponse

Implements

Properties

message

message: ChatMessage

Implementation of

ChatResponse.message

Defined in

packages/core/schema/dist/index.d.ts:203


metadata

metadata: Metadata

Defined in

packages/core/schema/dist/index.d.ts:202


raw

raw: null | object

Raw response from the LLM

If LLM response an iterable of chunks, this will be an array of those chunks

Implementation of

ChatResponse.raw

Defined in

packages/core/schema/dist/index.d.ts:204


sourceNodes

sourceNodes: undefined | NodeWithScore<Metadata>[]

Defined in

packages/core/schema/dist/index.d.ts:201


stream

readonly stream: boolean

Defined in

packages/core/schema/dist/index.d.ts:205

Accessors

delta

Get Signature

get delta(): string

Returns

string

Implementation of

ChatResponseChunk.delta

Defined in

packages/core/schema/dist/index.d.ts:215


response

Get Signature

get response(): string

Deprecated

Use message instead.

Returns

string

Defined in

packages/core/schema/dist/index.d.ts:214

Methods

toString()

toString(): string

Returns a string representation of an object.

Returns

string

Defined in

packages/core/schema/dist/index.d.ts:216


fromChatResponse()

static fromChatResponse(chatResponse, sourceNodes?): EngineResponse

Parameters

chatResponse: ChatResponse<object>

sourceNodes?: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

packages/core/schema/dist/index.d.ts:209


fromChatResponseChunk()

static fromChatResponseChunk(chunk, sourceNodes?): EngineResponse

Parameters

chunk: ChatResponseChunk

sourceNodes?: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

packages/core/schema/dist/index.d.ts:210


fromResponse()

static fromResponse(response, stream, sourceNodes): EngineResponse

Parameters

response: string

stream: boolean

sourceNodes: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

packages/core/schema/dist/index.d.ts:207