langchain/libs/community/langchain_community
Yuki Watanabe cfecbda48b
community[minor]: Allow passing allow_dangerous_deserialization when loading LLM chain (#18894)
### Issue
Recently, the new `allow_dangerous_deserialization` flag was introduced
for preventing unsafe model deserialization that relies on pickle
without user's notice (#18696). Since then some LLMs like Databricks
requires passing in this flag with true to instantiate the model.

However, this breaks existing functionality to loading such LLMs within
a chain using `load_chain` method, because the underlying loader
function
[load_llm_from_config](f96dd57501/libs/langchain/langchain/chains/loading.py (L40))
 (and load_llm) ignores keyword arguments passed in. 

### Solution
This PR fixes this issue by propagating the
`allow_dangerous_deserialization` argument to the class loader iff the
LLM class has that field.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-03-26 11:07:55 -04:00
..
adapters
agent_toolkits community: Add PolygonAggregates tool (#18882) 2024-03-11 11:58:10 -07:00
callbacks community[patch] : [Fiddler] ensure dataset is not added if model is present (#19293) 2024-03-25 17:28:05 -07:00
chat_loaders community[patch]: speed up import times in the community package (#18928) 2024-03-11 16:37:36 -04:00
chat_message_histories community[patch]: speed up import times in the community package (#18928) 2024-03-11 16:37:36 -04:00
chat_models community[minor]: Prem AI langchain integration (#19113) 2024-03-26 01:37:19 +00:00
docstore community[patch]: speed up import times in the community package (#18928) 2024-03-11 16:37:36 -04:00
document_compressors community[patch]: speed up import times in the community package (#18928) 2024-03-11 16:37:36 -04:00
document_loaders community[patch]: expanding version in confluence loader (#19324) 2024-03-25 17:08:01 -07:00
document_transformers community[patch]: flattening imports 3 (#18939) 2024-03-12 15:18:54 -07:00
embeddings community[minor]: Add embeddings integration for text2vec (#19267) 2024-03-26 11:06:58 -04:00
example_selectors
graphs community[minor]: Improvements for NeptuneRdfGraph, Improve discovery of graph schema using database statistics (#19546) 2024-03-26 10:36:51 -04:00
indexes
llms community[minor]: Allow passing allow_dangerous_deserialization when loading LLM chain (#18894) 2024-03-26 11:07:55 -04:00
output_parsers
retrievers community[patch]: Fixing incorrect base URLs for Azure Cognitive Search Retriever (#19352) 2024-03-26 00:04:59 +00:00
storage community[patch]: flattening imports 3 (#18939) 2024-03-12 15:18:54 -07:00
tools Josha91 fix docstring (#19249) 2024-03-18 21:19:56 -07:00
utilities community[patch]: flattening imports 3 (#18939) 2024-03-12 15:18:54 -07:00
utils core[patch]: Convert SimSIMD back to NumPy (#19473) 2024-03-25 16:36:26 -07:00
vectorstores community[minor]: Add InMemoryVectorStore to module level imports (#19576) 2024-03-26 14:07:44 +00:00
__init__.py
cache.py community[patch]: GPTCache pydantic validation error on lookup (#19427) 2024-03-26 10:52:30 -04:00
py.typed