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

Unable to use the chat function #79

Open
UnlimitedCookies opened this issue Apr 1, 2024 · 0 comments
Open

Unable to use the chat function #79

UnlimitedCookies opened this issue Apr 1, 2024 · 0 comments

Comments

@UnlimitedCookies
Copy link

We have no idea what the issue is here.

Error chatting
2 validation errors for LLMChain
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
ERROR:root:2 validation errors for LLMChain
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
Traceback (most recent call last):
  File "/home/user/Git/langchain-chatbot/handlers/base.py", line 187, in chat
    bot = ConversationalRetrievalChain.from_llm(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/pypoetry/virtualenvs/langchain-chatbot-mUNeNTez-py3.11/lib/python3.11/site-packages/langchain/chains/conversational_retrieval/base.py", line 372, in from_llm
    doc_chain = load_qa_chain(
                ^^^^^^^^^^^^^^
  File "/home/user/.cache/pypoetry/virtualenvs/langchain-chatbot-mUNeNTez-py3.11/lib/python3.11/site-packages/langchain/chains/question_answering/__init__.py", line 249, in load_qa_chain
    return loader_mapping[chain_type](
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/pypoetry/virtualenvs/langchain-chatbot-mUNeNTez-py3.11/lib/python3.11/site-packages/langchain/chains/question_answering/__init__.py", line 73, in _load_stuff_chain
    llm_chain = LLMChain(
                ^^^^^^^^^
  File "/home/user/.cache/pypoetry/virtualenvs/langchain-chatbot-mUNeNTez-py3.11/lib/python3.11/site-packages/langchain_core/load/serializable.py", line 120, in __init__
    super().__init__(**kwargs)
  File "/home/user/.cache/pypoetry/virtualenvs/langchain-chatbot-mUNeNTez-py3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 2 validation errors for LLMChain
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
llm
  instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable)
INFO: 127.0.0.1:49988 - "POST /chat HTTP/1.1" 500 Internal Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant