diff --git a/metagpt/rag/interface.py b/metagpt/rag/interface.py index 726f68772..867605edc 100644 --- a/metagpt/rag/interface.py +++ b/metagpt/rag/interface.py @@ -1,8 +1,9 @@ """RAG Interfaces.""" -from typing import Protocol +from typing import Protocol, runtime_checkable +@runtime_checkable class RAGObject(Protocol): """Support rag add object.""" @@ -16,6 +17,7 @@ class RAGObject(Protocol): """ +@runtime_checkable class NoEmbedding(Protocol): """Some retriever does not require embeddings, e.g. BM25"""