mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 15:28:14 -05:00
27 lines
802 B
Python
27 lines
802 B
Python
import os
|
|
|
|
from openhands.utils.import_utils import get_impl
|
|
|
|
|
|
class ConversationValidator:
|
|
"""Storage for conversation metadata. May or may not support multiple users depending on the environment."""
|
|
|
|
async def validate(
|
|
self,
|
|
conversation_id: str,
|
|
cookies_str: str,
|
|
authorization_header: str | None = None,
|
|
) -> tuple[None, None]:
|
|
return None, None
|
|
|
|
|
|
def create_conversation_validator() -> ConversationValidator:
|
|
conversation_validator_cls = os.environ.get(
|
|
'OPENHANDS_CONVERSATION_VALIDATOR_CLS',
|
|
'openhands.storage.conversation.conversation_validator.ConversationValidator',
|
|
)
|
|
ConversationValidatorImpl = get_impl(
|
|
ConversationValidator, conversation_validator_cls
|
|
)
|
|
return ConversationValidatorImpl()
|