Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access newQuestion in ConversationalRetrievalQAChain #3432

Closed
phof opened this issue Nov 28, 2023 · 2 comments · Fixed by #3433
Closed

Access newQuestion in ConversationalRetrievalQAChain #3432

phof opened this issue Nov 28, 2023 · 2 comments · Fixed by #3433
Labels
auto:question A specific question about the codebase, product, project, or how to use a feature

Comments

@phof
Copy link
Contributor

phof commented Nov 28, 2023

With reference to https://github.com/langchain-ai/langchainjs/blob/main/langchain/src/chains/conversational_retrieval_chain.ts#L172C9-L209

Is there a way to access the newQuestion generated as part of the questionGeneratorChain?

E.g.:

const chain = new ConversationalRetrievalQAChain({
  verbose: true,
  retriever: vectorStore.asRetriever(docstoretrieve),
  memory,
  returnSourceDocuments: true,
  outputKey: 'output',
  combineDocumentsChain: docChain,
  questionGeneratorChain: questionGenerator,
})
const query = await chain.call({ question })
// how do I access `newQuestion` here?
Copy link

dosubot bot commented Nov 28, 2023

🤖

Hello @phof! Great to see you again. I'm diving into your issue now and will get back to you with a comprehensive answer shortly.

@dosubot dosubot bot added the auto:question A specific question about the codebase, product, project, or how to use a feature label Nov 28, 2023
@phof
Copy link
Contributor Author

phof commented Nov 28, 2023

Looks like it was added to Python's version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:question A specific question about the codebase, product, project, or how to use a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant