Skip to content

Commit 6620b74

Browse files
committed
fix imports
1 parent 7d447cf commit 6620b74

File tree

5 files changed

+37
-8
lines changed

5 files changed

+37
-8
lines changed

examples/agents/state_based.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language goveself.rning permissions and
1313
# limitations under the License.
1414

15-
from pydantic import config
16-
from rai.agents import ROS2StateBasedAgent, StateBasedConfig, wait_for_shutdown
15+
from rai.agents.ros2 import ROS2StateBasedAgent
16+
from rai.agents import StateBasedConfig, wait_for_shutdown
1717
from rai.aggregators.ros2 import (
1818
ROS2ImgVLMDiffAggregator,
1919
ROS2LogsAggregator,

src/rai_core/rai/agents/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
from rai.agents.conversational_agent import create_conversational_agent
1616
from rai.agents.react_agent import ReActAgent
1717
from rai.agents.runner import AgentRunner, wait_for_shutdown
18-
from rai.agents.state_based_agent import ROS2StateBasedAgent, StateBasedConfig
18+
from rai.agents.base_state_based_agent import BaseStateBasedAgent, StateBasedConfig
1919
from rai.agents.tool_runner import ToolRunner
2020

2121
__all__ = [
2222
"AgentRunner",
2323
"ReActAgent",
24-
"ROS2StateBasedAgent",
24+
"BaseStateBasedAgent",
2525
"StateBasedConfig",
2626
"ToolRunner",
2727
"create_conversational_agent",

src/rai_core/rai/agents/base_state_based_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class StateBasedConfig(BaseModel):
4444
)
4545

4646

47-
class StateBasedAgent(ReActAgent, ABC):
47+
class BaseStateBasedAgent(ReActAgent, ABC):
4848
"""
4949
Agent that runs aggregators (config.aggregators) every config.time_interval seconds.
5050
Aggregators are registered to their sources using
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (C) 2024 Robotec.AI
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
from .state_based_agent import ROS2StateBasedAgent
15+
16+
__all__ = ["ROS2StateBasedAgent"]
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
# Copyright (C) 2025 Robotec.AI
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114

2-
from rai.agents.state_based_agent import StateBasedAgent
3-
from rai.communication.ros2.connectors.connector import ROS2Connector
15+
from rai.agents import BaseStateBasedAgent
16+
from rai.communication.ros2 import ROS2Connector
417

5-
class ROS2StateBasedAgent(StateBasedAgent):
18+
class ROS2StateBasedAgent(BaseStateBasedAgent):
619
def setup_connector(self):
720
return ROS2Connector()

0 commit comments

Comments
 (0)