跳转到内容

EngineResponse

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:5

源节点: undefined | NodeWithScore<Metadata>[]

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:6


metadata: Metadata = {}

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:8


消息: ChatMessage

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:10

ChatResponse.message


原始: null | object

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:11

来自大语言模型的原始响应

如果LLM返回一个可迭代的数据块,这将是这些数据块的数组

ChatResponse.raw


readonly : boolean

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:13

get response(): string

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:72

请使用 message 替代。

string


get delta(): string

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:76

string

ChatResponseChunk.delta

static fromResponse(response, stream, sourceNodes): EngineResponse

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:26

string

boolean

NodeWithScore<Metadata>[]

EngineResponse


static fromChatResponse(chatResponse, sourceNodes?): EngineResponse

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:51

ChatResponse

NodeWithScore<Metadata>[]

EngineResponse


static fromChatResponseChunk(chunk, sourceNodes?): EngineResponse

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:58

ChatResponseChunk

NodeWithScore<Metadata>[]

EngineResponse


toString(): string

定义于:.build/typescript/packages/core/src/schema/type/engine–response.ts:85

返回对象的字符串表示形式。

string