Skip to main content

Class: EngineResponse

Implements

Properties

message

message: ChatMessage

Implementation of

ChatResponse.message

Defined in

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


metadata

metadata: Metadata

Defined in

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


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/dist/schema/index.d.ts:174


sourceNodes?

optional sourceNodes: NodeWithScore<Metadata>[]

Defined in

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


stream

readonly stream: boolean

Defined in

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

Accessors

delta

get delta(): string

Returns

string

Implementation of

ChatResponseChunk.delta

Defined in

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


response

get response(): string

Deprecated

Use message instead.

Returns

string

Defined in

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

Methods

toString()

toString(): string

Returns a string representation of an object.

Returns

string

Defined in

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


fromChatResponse()

static fromChatResponse(chatResponse, sourceNodes?): EngineResponse

Parameters

chatResponse: ChatResponse<object>

sourceNodes?: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

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


fromChatResponseChunk()

static fromChatResponseChunk(chunk, sourceNodes?): EngineResponse

Parameters

chunk: ChatResponseChunk

sourceNodes?: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

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


fromResponse()

static fromResponse(response, stream, sourceNodes?): EngineResponse

Parameters

response: string

stream: boolean

sourceNodes?: NodeWithScore<Metadata>[]

Returns

EngineResponse

Defined in

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