diff --git a/naptha_sdk/client/hub.py b/naptha_sdk/client/hub.py index b40ed09..c152241 100644 --- a/naptha_sdk/client/hub.py +++ b/naptha_sdk/client/hub.py @@ -20,7 +20,6 @@ class Hub: """The Hub class is the entry point into Naptha AI Hub.""" def __init__(self, hub_url, public_key=None, *args, **kwargs): - print("HUB URL: ", hub_url) self.hub_url = hub_url self.public_key = public_key self.ns = "naptha" @@ -269,7 +268,7 @@ async def list_toolsets(self, toolset_name=None) -> List: async def get_toolset(self, toolset_id: str) -> Optional[Dict]: print(f"Getting toolset: {toolset_id}") - toolsets = await self.surrealdb.query(f"SELECT * FROM agent;") + toolsets = await self.surrealdb.query(f"SELECT * FROM toolset;") print(toolsets) return toolsets[0] diff --git a/naptha_sdk/toolset.py b/naptha_sdk/toolset.py index 7e51909..fa2813c 100644 --- a/naptha_sdk/toolset.py +++ b/naptha_sdk/toolset.py @@ -49,15 +49,20 @@ async def load_or_add_tool_repo_to_toolset_from_hub(self, toolset_name, toolset_ # pull toolset from hub hub_url = os.getenv("HUB_URL", None) + print(f"hub_url: {hub_url}") hub = Hub(hub_url) await hub.connect() + + # TODO: fix this + await hub.surrealdb.signin({"user": "root", "pass": "root"}) toolset = await hub.get_toolset(toolset_hub_id) - print(f"toolset: {toolset}") + print(f"toolset: {toolset['result'][0]["source_url"]}") + print(type(toolset['result'][0]["source_url"])) - toolset_url = toolset["source_url"] + toolset_url = toolset['result'][0]["source_url"] try: request = ToolsetLoadRepoRequest(