mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
add runtime_checkable to support 3.10
This commit is contained in:
parent
468e574ef0
commit
666cac971f
1 changed files with 3 additions and 1 deletions
|
|
@ -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"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue