Hello!
I tried upgrading chainlit, and when I run queries I receive
TypeError: 'NoneType' object is not a mapping.
I've traced it to
https://github.com/Chainlit/chainlit/blob/aae67be728de3ebdf86e0f9ea010ae19eef9fb03/backend/chainlit/langchain/callbacks.py#L26
It seems that invocation_params.pop["model_kwargs"] == None in my case, which later results in the error.
I'm not sure why model_kwargs is None, but since 0.6.3 worked for me I didn't dig in too deep into it (although I did follow the tips in the docs on migrating to 0.7.0 and didn't find a resolution there).
I fixed it by adding something like
if model_kwargs is None:
model_kwargs = {}
to callbacks.py.
background: using RetrievalQA.from_chain_type with a local llm.
Hello! I tried upgrading chainlit, and when I run queries I receive
TypeError: 'NoneType' object is not a mapping
. I've traced it to https://github.com/Chainlit/chainlit/blob/aae67be728de3ebdf86e0f9ea010ae19eef9fb03/backend/chainlit/langchain/callbacks.py#L26 It seems thatinvocation_params.pop["model_kwargs"] == None
in my case, which later results in the error. I'm not sure why model_kwargs is None, but since0.6.3
worked for me I didn't dig in too deep into it (although I did follow the tips in the docs on migrating to 0.7.0 and didn't find a resolution there). I fixed it by adding something liketo
callbacks.py
. background: usingRetrievalQA.from_chain_type
with a local llm.