-
-
Save Juraj-Sulimanovic/d80321e78e9ef95458e9384f4571deb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const makeChain = (vectorstore: PineconeStore) => { | |
const model = new OpenAI({ | |
temperature: 0, | |
modelName: 'gpt-4' | |
}); | |
const chain = ConversationalRetrievalQAChain.fromLLM( | |
model, | |
vectorstore.asRetriever(), | |
{ | |
qaTemplate: QA_PROMPT, | |
questionGeneratorTemplate: CONDENSE_PROMPT, | |
returnSourceDocuments: true | |
}, | |
); | |
return chain; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment