Closed billmetangmo closed 11 months ago
Create a simple data app for the first version using streamlit
Python libraries for action-oriented LLMs: https://www.youtube.com/watch?v=XgD5AuzBvs8
Search using the relevant documents provided by semantic search: may be we can use embedding then search using OpenAI ? https://learnprompting.org/docs/applied_prompting/build_chatbot_from_kb ?
Vue des tâches: https://www.loom.com/share/0f04f92d3c254fa4bcfc367121982c8a
Here's a formatted explanation of the traceback for other developers:
Traceback (most recent call last):
File "/home/eak/Documents/AI/DeepLearning/tchoung-te/.venv/bin/chainlit", line 8, in <module>
sys.exit(cli())
...
...
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for StuffDocumentsChain
__root__
document_variable_name summaries was not found in llm_chain input_variables: ['context', 'question'] (type=value_error)
This is the part of the code that failed:
llm = ChatOpenAI(max_tokens=500, temperature=0, model_name="gpt-3.5-turbo")
chain_type_kwargs = {"prompt": CHAT_PROMPT}
qa = RetrievalQAWithSourcesChain.from_chain_type(
llm=llm,
chain_type="stuff",
retriever=vectors.as_retriever(search_kwargs={"k": 3}),
chain_type_kwargs=chain_type_kwargs,
return_source_documents=True
)
The traceback indicates an error in the code, specifically in the part where you're initializing the qa
object. The error message (pydantic.error_wrappers.ValidationError
) suggests that there's a validation error related to the StuffDocumentsChain
and its input variables. The error message details that the variable name summaries
was not found in the llm_chain input_variables
. You might need to check the input variables and ensure that summaries
is properly defined or used in your code.
@billmetangmo Done on our side (@Joyce-Tchamdjou )
One output key expected, got dict_keys(['result', 'source_documents'])
Multiples ways of solving: