pydantic.v1.error_wrappers.ValidationError

Hi, I am getting the following error, I copied and modified the code found in:

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/anotherllamatry/model.py", line 181, in <module>
    main()
  File "/mount/src/anotherllamatry/model.py", line 170, in main
    answer = qa_bot(query)
  File "/mount/src/anotherllamatry/model.py", line 91, in qa_bot
    qa_prompt = set_custom_prompt()
  File "/mount/src/anotherllamatry/model.py", line 63, in set_custom_prompt
    prompt = PromptTemplate(template=custom_prompt_template,
  File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/load/serializable.py", line 75, in __init__
    super().__init__(**kwargs)
  File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for PromptTemplate
__root__
  Invalid prompt schema; check for mismatched or missing input parameters. {'context', 'question'} (type=value_error)

This is the repository on github: GitHub - ShadowD-9/anotherllamatry

This is the streamlit link: https://recipellama.streamlit.app/

and I am using streamlit==1.29.0 and python==3.9

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.