Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/toolbox-core/src/toolbox_core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(
Initializes the ToolboxClient.

Args:
url: The base URL for the Toolbox service API (e.g., "http://localhost:8000").
url: The base URL for the Toolbox service API (e.g., "http://localhost:5000").
session: An optional existing `aiohttp.ClientSession` to use.
If None (default), a new session is created internally. Note that
if a session is provided, its lifecycle (including closing)
Expand Down
12 changes: 6 additions & 6 deletions packages/toolbox-langchain/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ async def test_invoke_tool(self, mock_post):
mock_post.return_value.__aenter__.return_value = mock_response

result = await _invoke_tool(
"http://localhost:8000",
"http://localhost:5000",
aiohttp.ClientSession(),
"tool_name",
{"input": "data"},
{},
)

mock_post.assert_called_once_with(
"http://localhost:8000/api/tool/tool_name/invoke",
"http://localhost:5000/api/tool/tool_name/invoke",
json={"input": "data"},
headers={},
)
Expand All @@ -241,15 +241,15 @@ async def test_invoke_tool_unsecure_with_auth(self, mock_post):
match="Sending ID token over HTTP. User data may be exposed. Use HTTPS for secure communication.",
):
result = await _invoke_tool(
"http://localhost:8000",
"http://localhost:5000",
aiohttp.ClientSession(),
"tool_name",
{"input": "data"},
{"my_test_auth": lambda: "fake_id_token"},
)

mock_post.assert_called_once_with(
"http://localhost:8000/api/tool/tool_name/invoke",
"http://localhost:5000/api/tool/tool_name/invoke",
json={"input": "data"},
headers={"my_test_auth_token": "fake_id_token"},
)
Expand All @@ -267,15 +267,15 @@ async def test_invoke_tool_secure_with_auth(self, mock_post):
with warnings.catch_warnings():
warnings.simplefilter("error")
result = await _invoke_tool(
"https://localhost:8000",
"https://localhost:5000",
session,
"tool_name",
{"input": "data"},
{"my_test_auth": lambda: "fake_id_token"},
)

mock_post.assert_called_once_with(
"https://localhost:8000/api/tool/tool_name/invoke",
"https://localhost:5000/api/tool/tool_name/invoke",
json={"input": "data"},
headers={"my_test_auth_token": "fake_id_token"},
)
Expand Down