agents.clients.roboml#

Module Contents#

Classes#

RoboMLHTTPClient

An HTTP client for interaction with ML models served on RoboML

RoboMLRESPClient

A Redis Serialization Protocol (RESP) based client for interaction with ML models served on RoboML

RoboMLWSClient

An websocket client for interaction with ML models served on RoboML.

API#

class agents.clients.roboml.RoboMLHTTPClient(model: Union[agents.models.Model, Dict], host: str = '127.0.0.1', port: int = 8000, inference_timeout: int = 30, init_on_activation: bool = True, logging_level: str = 'info', ca_cert: Optional[str] = None, **kwargs)#

Bases: agents.clients.model_base.ModelClient

An HTTP client for interaction with ML models served on RoboML

serialize() → Dict#

Get client json

Return type:

Dict

property supports_tool_calls: bool#

Check if the client supports tool calling (function calling). Defaults to False. Override in subclasses if supported.

Return type:

bool

property context_length: Optional[int]#

The context length, in tokens, the model is served with. Defaults to None. Override in subclasses that can report it.

Return type:

Optional[int]

property supports_decisions: bool#

Check if the client serves a decision model, which answers typed questions about a state. Defaults to False. Override in subclasses if supported.

Return type:

bool

check_connection() → None#

initialize.

Return type:

None

initialize() → None#

initialize.

Return type:

None

inference(inference_input: Dict[str, Any]) → Optional[MutableMapping]#

inference.

Parameters:

inference_input (dict[str, Any])

Return type:

dict | None

deinitialize()#

deinitialize.

class agents.clients.roboml.RoboMLRESPClient(model: Union[agents.models.Model, Dict], host: str = '127.0.0.1', port: int = 6379, inference_timeout: int = 30, init_on_activation: bool = True, logging_level: str = 'info', **kwargs)#

Bases: agents.clients.model_base.ModelClient

A Redis Serialization Protocol (RESP) based client for interaction with ML models served on RoboML

serialize() → Dict#

Get client json

Return type:

Dict

property supports_tool_calls: bool#

Check if the client supports tool calling (function calling). Defaults to False. Override in subclasses if supported.

Return type:

bool

property context_length: Optional[int]#

The context length, in tokens, the model is served with. Defaults to None. Override in subclasses that can report it.

Return type:

Optional[int]

property supports_decisions: bool#

Check if the client serves a decision model, which answers typed questions about a state. Defaults to False. Override in subclasses if supported.

Return type:

bool

check_connection() → None#

initialize.

Return type:

None

initialize() → None#

initialize.

Return type:

None

inference(inference_input: Dict[str, Any]) → Optional[MutableMapping]#

inference.

Parameters:

inference_input (dict[str, Any])

Return type:

dict | None

deinitialize()#

deinitialize.

class agents.clients.roboml.RoboMLWSClient(model: Union[agents.models.Model, Dict], host: str = '127.0.0.1', port: int = 8000, inference_timeout: int = 30, init_on_activation: bool = True, logging_level: str = 'info', ca_cert: Optional[str] = None, **kwargs)#

Bases: agents.clients.roboml.RoboMLHTTPClient

An websocket client for interaction with ML models served on RoboML.

serialize() → Dict#

Get client json

Return type:

Dict

property supports_tool_calls: bool#

Check if the client supports tool calling (function calling). Defaults to False. Override in subclasses if supported.

Return type:

bool

property context_length: Optional[int]#

The context length, in tokens, the model is served with. Defaults to None. Override in subclasses that can report it.

Return type:

Optional[int]

property supports_decisions: bool#

Check if the client serves a decision model, which answers typed questions about a state. Defaults to False. Override in subclasses if supported.

Return type:

bool

check_connection() → None#

initialize.

Return type:

None

initialize() → None#

initialize.

Return type:

None

inference(inference_input: Dict[str, Any]) → Optional[MutableMapping]#

inference.

Parameters:

inference_input (dict[str, Any])

Return type:

dict | None

deinitialize()#

deinitialize.