db_documents = db.load_data(query=query) for document in db_documents: document.doc_id = VERSION_NUMBER + "_"+"string" vector_store = PGVectorStore.from_params( database="postgres", host=HOSTNAME, password=PASS, port=5432, user=USER, table_name=TABLE, embed_dim=1536, hybrid_search=True, ) index = VectorStoreIndex.from_vector_store(vector_store=vector_store) refreshed_docs = index.refresh( db_documents, ) index.storage_context.persist()
index = VectorStoreIndex.from_vector_store(vector_store=vector_store) index.refresh_ref_docs(documents)
File "/...../supabase.py", line 117, in delete raise NotImplementedError("Delete not yet implemented for vecs.")
vector_store = PGVectorStore.from_params( database="postgres", host="", password="", port=5432, user="", table_name="mytable" ) storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents(documents, storage_context=storage_context)
documents = db.load_data(query = query) for document in documents: # split the text by comma and take the first value first_value = document.get_text().split(',')[0] print(first_value) #this does work # assign the first_value as the doc_id of the document document.id_ = first_value print(documents)
index = VectorStoreIndex.from_vector_store(vector_store=vector_store) query_engine = index.as_query_engine() response = query_engine.query("my query is here")
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: extensions.vector <=> unknown LINE 1: SELECT vecs.test1.id, vecs.test1.vec <=> '[-0.01009003072977... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. [SQL: SELECT vecs.test1.id, vecs.test1.vec <=> %(vec_1)s AS anon_1, vecs.test1.metadata FROM vecs.test1 ORDER BY vecs.test1.vec <=> %(vec_1)s LIMIT %(param_1)s]