Skip to content

Commit

Permalink
fix: revert small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Morales committed Oct 23, 2023
1 parent a7be9e1 commit c38513f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/src/uagents/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion python/src/uagents/mailbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions python/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"api_key": None,
"base_url": "some_url",
"protocol": "wss",
"http_prefix": "http",
"http_prefix": "https",
"use_mailbox": False,
},
{
Expand All @@ -86,7 +86,7 @@
"api_key": "api_key",
"base_url": "agentverse.ai",
"protocol": "wss",
"http_prefix": "http",
"http_prefix": "https",
"use_mailbox": True,
},
{
Expand Down

0 comments on commit c38513f

Please sign in to comment.