context str = "abc"
query_str = "def"
template = ("We have provided context information below. \n"
"---------------------\n"
f"{context_str}\n"
"\n---------------------\n"
f"Given this information, please answer the question: {query_str}\n")
text_qa_template = Prompt(template=template)
vector_store = WeaviateVectorStore(weaviate_client=client, index_name="LlamaIndex")
index = VectorStoreIndex.from_vector_store(vector_store=vector_store)
query_engine = index.as_query_engine(text_qa_template=text_qa_template)
response = str(query_engine.query(query_str))
I am getting the error below in the above snippet of code:
pydantic.error_wrappers.ValidationError: 1 validation error for PromptTemplate
root
Invalid prompt schema; check for mismatched or missing input parameters. '"url"'
(type=value_error)
Can anyone please help me with the same? Thanks.
Add a reply
Sign up and join the conversation on Discord