:py:mod:`vendor_fabric.meshy.persistence.vector_store` ====================================================== .. py:module:: vendor_fabric.meshy.persistence.vector_store .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store :parser: myst :allowtitles: Module Contents --------------- Classes ~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`GenerationRecord ` - .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord :parser: myst :summary: * - :py:obj:`SimilarityResult ` - .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.SimilarityResult :parser: myst :summary: * - :py:obj:`VectorStore ` - .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore :parser: myst :summary: Functions ~~~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`get_embedding ` - .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.get_embedding :parser: myst :summary: API ~~~ .. py:class:: GenerationRecord :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord :parser: myst .. py:attribute:: id :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.id :type: int | None :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.id :parser: myst .. py:attribute:: spec_hash :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.spec_hash :type: str :value: .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.spec_hash :parser: myst .. py:attribute:: project :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.project :type: str :value: .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.project :parser: myst .. py:attribute:: prompt :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.prompt :type: str :value: .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.prompt :parser: myst .. py:attribute:: art_style :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.art_style :type: str :value: 'sculpture' .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.art_style :parser: myst .. py:attribute:: task_id :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.task_id :type: str | None :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.task_id :parser: myst .. py:attribute:: status :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.status :type: str :value: 'pending' .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.status :parser: myst .. py:attribute:: model_url :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.model_url :type: str | None :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.model_url :parser: myst .. py:attribute:: embedding :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.embedding :type: list[float] | None :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.embedding :parser: myst .. py:attribute:: metadata :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.metadata :type: dict[str, typing.Any] :value: 'field(...)' .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.metadata :parser: myst .. py:attribute:: created_at :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.created_at :type: datetime.datetime :value: 'field(...)' .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.created_at :parser: myst .. py:attribute:: updated_at :canonical: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.updated_at :type: datetime.datetime :value: 'field(...)' .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.GenerationRecord.updated_at :parser: myst .. py:class:: SimilarityResult :canonical: vendor_fabric.meshy.persistence.vector_store.SimilarityResult .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.SimilarityResult :parser: myst .. py:attribute:: record :canonical: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.record :type: vendor_fabric.meshy.persistence.vector_store.GenerationRecord :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.record :parser: myst .. py:attribute:: distance :canonical: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.distance :type: float :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.distance :parser: myst .. py:attribute:: score :canonical: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.score :type: float :value: None .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.SimilarityResult.score :parser: myst .. py:class:: VectorStore(db_path: str | pathlib.Path = 'vendor_fabric.meshy.db', embedding_dim: int = DEFAULT_EMBEDDING_DIM) :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore :parser: myst .. rubric:: Initialization .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.__init__ :parser: myst .. py:attribute:: DEFAULT_EMBEDDING_DIM :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.DEFAULT_EMBEDDING_DIM :value: 384 .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.DEFAULT_EMBEDDING_DIM :parser: myst .. py:method:: record_generation(spec_hash: str, prompt: str, project: str = 'default', art_style: str = 'sculpture', task_id: str | None = None, embedding: list[float] | None = None, metadata: dict[str, typing.Any] | None = None) -> extended_data.containers.ExtendedDict :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.record_generation .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.record_generation :parser: myst .. py:method:: update_status(spec_hash: str, status: str, task_id: str | None = None, model_url: str | None = None) -> bool :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.update_status .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.update_status :parser: myst .. py:method:: get_by_spec_hash(spec_hash: str) -> extended_data.containers.ExtendedDict | None :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.get_by_spec_hash .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.get_by_spec_hash :parser: myst .. py:method:: get_by_task_id(task_id: str) -> extended_data.containers.ExtendedDict | None :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.get_by_task_id .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.get_by_task_id :parser: myst .. py:method:: search_similar(query_embedding: list[float], limit: int = 10, project: str | None = None) -> extended_data.containers.ExtendedList[extended_data.containers.ExtendedDict] :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.search_similar .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.search_similar :parser: myst .. py:method:: search_text(query: str, limit: int = 10, project: str | None = None) -> extended_data.containers.ExtendedList[extended_data.containers.ExtendedDict] :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.search_text .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.search_text :parser: myst .. py:method:: list_pending(project: str | None = None) -> extended_data.containers.ExtendedList[extended_data.containers.ExtendedDict] :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.list_pending .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.list_pending :parser: myst .. py:method:: compute_spec_hash(spec: dict[str, typing.Any]) -> str :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.compute_spec_hash .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.compute_spec_hash :parser: myst .. py:method:: close() -> None :canonical: vendor_fabric.meshy.persistence.vector_store.VectorStore.close .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.VectorStore.close :parser: myst .. py:function:: get_embedding(text: str, model: str = 'all-MiniLM-L6-v2') -> extended_data.containers.ExtendedList[float] | None :canonical: vendor_fabric.meshy.persistence.vector_store.get_embedding .. autodoc2-docstring:: vendor_fabric.meshy.persistence.vector_store.get_embedding :parser: myst