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
19 changes: 15 additions & 4 deletions robosystems_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
"""RoboSystems Python Client."""

__version__ = "0.1.0"

from .client import AuthenticatedClient, Client

# Convenience alias for the main SDK
RoboSystemsSDK = AuthenticatedClient

__all__ = (
"AuthenticatedClient",
"Client",
"RoboSystemsSDK",
)

# Convenience alias for the main SDK
RoboSystemsSDK = AuthenticatedClient

def _get_version() -> str:
"""Get version from package metadata."""
try:
from importlib.metadata import version

return version("robosystems-client")
except Exception:
return "0.0.0+development"


__version__ = _get_version()
25 changes: 25 additions & 0 deletions robosystems_client/api/agent/auto_select_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,28 @@ def _get_kwargs(
graph_id: str,
*,
body: AgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(authorization, Unset):
headers["authorization"] = authorization

params: dict[str, Any] = {}

json_token: Union[None, Unset, str]
if isinstance(token, Unset):
json_token = UNSET
else:
json_token = token
params["token"] = json_token

params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

_kwargs: dict[str, Any] = {
"method": "post",
"url": f"/v1/{graph_id}/agent",
"params": params,
}

_kwargs["json"] = body.to_dict()
Expand Down Expand Up @@ -81,6 +94,7 @@ def sync_detailed(
*,
client: AuthenticatedClient,
body: AgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]:
"""Auto-select agent for query
Expand All @@ -97,6 +111,7 @@ def sync_detailed(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (AgentRequest): Request model for agent interactions.

Expand All @@ -111,6 +126,7 @@ def sync_detailed(
kwargs = _get_kwargs(
graph_id=graph_id,
body=body,
token=token,
authorization=authorization,
)

Expand All @@ -126,6 +142,7 @@ def sync(
*,
client: AuthenticatedClient,
body: AgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]:
"""Auto-select agent for query
Expand All @@ -142,6 +159,7 @@ def sync(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (AgentRequest): Request model for agent interactions.

Expand All @@ -157,6 +175,7 @@ def sync(
graph_id=graph_id,
client=client,
body=body,
token=token,
authorization=authorization,
).parsed

Expand All @@ -166,6 +185,7 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
body: AgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]:
"""Auto-select agent for query
Expand All @@ -182,6 +202,7 @@ async def asyncio_detailed(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (AgentRequest): Request model for agent interactions.

Expand All @@ -196,6 +217,7 @@ async def asyncio_detailed(
kwargs = _get_kwargs(
graph_id=graph_id,
body=body,
token=token,
authorization=authorization,
)

Expand All @@ -209,6 +231,7 @@ async def asyncio(
*,
client: AuthenticatedClient,
body: AgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]:
"""Auto-select agent for query
Expand All @@ -225,6 +248,7 @@ async def asyncio(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (AgentRequest): Request model for agent interactions.

Expand All @@ -241,6 +265,7 @@ async def asyncio(
graph_id=graph_id,
client=client,
body=body,
token=token,
authorization=authorization,
)
).parsed
25 changes: 25 additions & 0 deletions robosystems_client/api/agent/batch_process_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,28 @@ def _get_kwargs(
graph_id: str,
*,
body: BatchAgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(authorization, Unset):
headers["authorization"] = authorization

params: dict[str, Any] = {}

json_token: Union[None, Unset, str]
if isinstance(token, Unset):
json_token = UNSET
else:
json_token = token
params["token"] = json_token

params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

_kwargs: dict[str, Any] = {
"method": "post",
"url": f"/v1/{graph_id}/agent/batch",
"params": params,
}

_kwargs["json"] = body.to_dict()
Expand Down Expand Up @@ -76,6 +89,7 @@ def sync_detailed(
*,
client: AuthenticatedClient,
body: BatchAgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]:
"""Batch process multiple queries
Expand All @@ -97,6 +111,7 @@ def sync_detailed(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (BatchAgentRequest): Request for batch processing multiple queries.

Expand All @@ -111,6 +126,7 @@ def sync_detailed(
kwargs = _get_kwargs(
graph_id=graph_id,
body=body,
token=token,
authorization=authorization,
)

Expand All @@ -126,6 +142,7 @@ def sync(
*,
client: AuthenticatedClient,
body: BatchAgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]:
"""Batch process multiple queries
Expand All @@ -147,6 +164,7 @@ def sync(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (BatchAgentRequest): Request for batch processing multiple queries.

Expand All @@ -162,6 +180,7 @@ def sync(
graph_id=graph_id,
client=client,
body=body,
token=token,
authorization=authorization,
).parsed

Expand All @@ -171,6 +190,7 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
body: BatchAgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]:
"""Batch process multiple queries
Expand All @@ -192,6 +212,7 @@ async def asyncio_detailed(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (BatchAgentRequest): Request for batch processing multiple queries.

Expand All @@ -206,6 +227,7 @@ async def asyncio_detailed(
kwargs = _get_kwargs(
graph_id=graph_id,
body=body,
token=token,
authorization=authorization,
)

Expand All @@ -219,6 +241,7 @@ async def asyncio(
*,
client: AuthenticatedClient,
body: BatchAgentRequest,
token: Union[None, Unset, str] = UNSET,
authorization: Union[None, Unset, str] = UNSET,
) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]:
"""Batch process multiple queries
Expand All @@ -240,6 +263,7 @@ async def asyncio(

Args:
graph_id (str):
token (Union[None, Unset, str]): JWT token for SSE authentication
authorization (Union[None, Unset, str]):
body (BatchAgentRequest): Request for batch processing multiple queries.

Expand All @@ -256,6 +280,7 @@ async def asyncio(
graph_id=graph_id,
client=client,
body=body,
token=token,
authorization=authorization,
)
).parsed
Loading