mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-27 09:21:30 -04:00
0874872dee
This worked for me, but I'm not sure if its the right way to approach something like this, so I'm open to suggestions. Adds class properties `reduce_k_below_max_tokens: bool` and `max_tokens_limit: int` to the `ConversationalRetrievalChain`. The code is basically copied from [`RetreivalQAWithSourcesChain`](https://github.com/nkov/langchain/blob/46d141c6cb6c0fdebb308336d8ae140d8368945a/langchain/chains/qa_with_sources/retrieval.py#L24)