Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Add support for Vector DB #142

@yashbonde

Description

@yashbonde

Adding support for storage would give chainfury an infinite breathing room for storing and processing information.

We plan to add the following in the first iteration:

  • qdrant
  • pinecone
  • milvus

I am planning that it will follow the same kind of registry pattern that we follow across the chainfury. Note that I am giving a very high level overview here so focus more on the interface not the implementation.

class CFDB:
  # some constants
  VECTOR_TYPE = "vector"
  SQL_TYPE = "sql"

  def read(self, *args, **kwargs) -> Dict[str, List[str]]
  def write(self, *args, **kwargs) -> bool?

  # ser/deser
  def from_dict(self, data: Dict[str, Any]) -> CFDB
  def to_dict(self) -> Dict[str, Any]
  def from_json(self, x: str) -> CFDB
  def to_json(self) -> str

class DBRegistry:
  def register(self, name: str, db_cls: CFDB) -> bool?
  def get(self, name: str) -> CFDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions