From c38513fb8136a95da06771dcd427c583b0baa2f2 Mon Sep 17 00:00:00 2001 From: Alejandro-Morales Date: Mon, 23 Oct 2023 05:23:32 -0600 Subject: [PATCH] fix: revert small changes --- python/src/uagents/config.py | 2 +- python/src/uagents/mailbox.py | 2 +- python/tests/test_config.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/src/uagents/config.py b/python/src/uagents/config.py index 45f0a186..042f730a 100644 --- a/python/src/uagents/config.py +++ b/python/src/uagents/config.py @@ -92,7 +92,7 @@ def parse_agentverse_config( if "://" in base_url: protocol, base_url = base_url.split("://") protocol = protocol_override or protocol or "https" - http_prefix = "https" if protocol == "https" else "http" + http_prefix = "https" if protocol in {"wss", "https"} else "http" return { "api_key": api_key, "base_url": base_url, diff --git a/python/src/uagents/mailbox.py b/python/src/uagents/mailbox.py index 9d0e3f7b..7bf3a42f 100644 --- a/python/src/uagents/mailbox.py +++ b/python/src/uagents/mailbox.py @@ -49,7 +49,7 @@ def protocol(self): """ Property to access the protocol of the mailbox server. - Returns: The protocol of the mailbox server {http, https}. + Returns: The protocol of the mailbox server {ws, wss, http, https}. """ return self._agent.mailbox["protocol"] diff --git a/python/tests/test_config.py b/python/tests/test_config.py index 658a0ad9..481e4396 100644 --- a/python/tests/test_config.py +++ b/python/tests/test_config.py @@ -72,7 +72,7 @@ "api_key": None, "base_url": "some_url", "protocol": "wss", - "http_prefix": "http", + "http_prefix": "https", "use_mailbox": False, }, { @@ -86,7 +86,7 @@ "api_key": "api_key", "base_url": "agentverse.ai", "protocol": "wss", - "http_prefix": "http", + "http_prefix": "https", "use_mailbox": True, }, {