优化
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:38
一个响应构建器,利用查询向LLM提问,通过多个文本片段生成更优质的响应。
new Refine(
options):Refine
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:42
BaseSynthesizerOptions & object
Refine
大语言模型
Section titled “llm”llm:
LLM
定义于:.build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:15
promptHelper
Section titled “promptHelper”提示助手:
PromptHelper
Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:16
textQATemplate
Section titled “textQATemplate”文本问答模板:
TextQAPrompt
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:39
refineTemplate
Section titled “refineTemplate”refineTemplate:
RefinePrompt
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:40
validatePrompts()
Section titled “validatePrompts()”validatePrompts(
promptsDict,moduleDict):void
Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:8
promptsDict
Section titled “promptsDict”moduleDict
Section titled “moduleDict”void
BaseSynthesizer.validatePrompts
getPrompts()
Section titled “getPrompts()”getPrompts():
PromptsRecord
Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:22
updatePrompts()
Section titled “updatePrompts()”updatePrompts(
prompts):void
Defined in: .build/typescript/packages/core/src/prompts/mixin.ts:39
void
synthesize()
Section titled “synthesize()”合成(
query,stream):Promise<AsyncIterable<EngineResponse,any,any>>
Defined in: .build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:31
true
Promise<AsyncIterable<EngineResponse, any, any>>
合成(
query,stream?):Promise<EngineResponse>
定义于:.build/typescript/packages/core/src/response-synthesizers/base-synthesizer.ts:35
false
Promise<EngineResponse>
_getPromptModules()
Section titled “_getPromptModules()”
protected_getPromptModules():ModuleRecord
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:53
返回当前模块中同样实现了 PromptMixin 的子模块字典(以便也能获取/设置它们的提示)。
如果没有子模块,可以为空。
BaseSynthesizer._getPromptModules
_getPrompts()
Section titled “_getPrompts()”
protected_getPrompts():object
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:57
object
textQATemplate
Section titled “textQATemplate”文本问答模板:
TextQAPrompt
refineTemplate
Section titled “refineTemplate”refineTemplate:
RefinePrompt
_updatePrompts()
Section titled “_updatePrompts()”
protected_updatePrompts(prompts):void
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:67
textQATemplate
Section titled “textQATemplate”refineTemplate
Section titled “refineTemplate”void
BaseSynthesizer._updatePrompts
getResponse()
Section titled “getResponse()”getResponse(
query,nodes,stream):Promise<AsyncIterable<EngineResponse,any,any>>
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:80
true
Promise<AsyncIterable<EngineResponse, any, any>>
getResponse(
query,nodes,stream):Promise<EngineResponse>
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:85
false
Promise<EngineResponse>
BaseSynthesizer.getResponse
complete()
Section titled “complete()”完成(
params):Promise<string|AsyncIterable<string,any,any>>
定义于:.build/typescript/packages/core/src/response-synthesizers/factory.ts:199
string
boolean
Promise<string | AsyncIterable<string, any, any>>