mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
add multi retrieval qa chain
This commit is contained in:
@@ -95,6 +95,7 @@ export interface IMessage {
|
||||
*/
|
||||
|
||||
import { PromptTemplate as LangchainPromptTemplate, PromptTemplateInput } from 'langchain/prompts'
|
||||
import { VectorStore } from 'langchain/vectorstores/base'
|
||||
|
||||
export class PromptTemplate extends LangchainPromptTemplate {
|
||||
promptValues: ICommonObject
|
||||
@@ -124,3 +125,21 @@ export class PromptRetriever {
|
||||
this.systemMessage = `${fields.systemMessage}\n${fixedTemplate}`
|
||||
}
|
||||
}
|
||||
|
||||
export interface VectorStoreRetrieverInput {
|
||||
name: string
|
||||
description: string
|
||||
vectorStore: VectorStore
|
||||
}
|
||||
|
||||
export class VectorStoreRetriever {
|
||||
name: string
|
||||
description: string
|
||||
vectorStore: VectorStore
|
||||
|
||||
constructor(fields: VectorStoreRetrieverInput) {
|
||||
this.name = fields.name
|
||||
this.description = fields.description
|
||||
this.vectorStore = fields.vectorStore
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user