Exception ignored in: <function QdrantClient.del at 0x135be9580> Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 129, in del File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 136, in close File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/local/qdrant_local.py", line 59, in close TypeError: 'NoneType' object is not callable
for below code:
for doc in docs: if "content_text" in doc: doc_content = doc["content_text"] doc_id = doc["document_id"] print(doc_id) documents.append( Document( text=doc_content, metadata={"file_name": docid,"date": str(datetime.now())}, id=doc_id, description=f"Useful to answer question related to file name or id {doc_id}", ) ) client = QdrantClient(path="./qdrant_data") vector_store = QdrantVectorStore( "chatbot", client=client, enable_hybrid=True, batch_size=20 )
context_str = "\n\n".join([n.node.get_content() for n in nodes]) response = self.llm.complete( qa_prompt.format(context_str=context_str, query_str=query_str) )
context_str = "\n\n".join([n.node.get_content() for n in nodes]) response = await self.llm.complete( qa_prompt.format(context_str=context_str, query_str=query_str) )
return str(response) How do i as a question using aquery here?
context_str = "\n\n".join([n.node.get_content() for n in nodes]) response = self.llm.complete( qa_prompt.format(context_str=context_str, query_str=query_str) )
qa_prompt = PromptTemplate( "Context information is below.\n" "---------------------\n" "{context_str}\n" "---------------------\n" "Given the context information and not prior knowledge, " "answer the query.\n" "Query: {query_str}\n" "Answer: " )
class RAGStringQueryEngine(CustomQueryEngine): """RAG String Query Engine."""
context_str = "\n\n".join([n.node.get_content() for n in nodes]) response = self.llm.complete( qa_prompt.format(context_str=context_str, query_str=query_str) )