Skip to content

Commit 432e9f8

Browse files
authored
env (#325)
agent support kwargs
1 parent 219e4a5 commit 432e9f8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lagent/agents/env_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ def __init__(
2929
enable_repeated_tool_call_penalty: bool = False,
3030
action_hooks: Optional[List[Union[dict, Hook]]] = None,
3131
name: Optional[str] = None,
32+
**kwargs
3233
):
3334
super().__init__(
34-
actions, stateful_tools, max_tool_response_length, tool_response_truncate_side, action_hooks, name
35+
actions, stateful_tools, max_tool_response_length, tool_response_truncate_side, action_hooks, name, **kwargs
3536
)
3637
self.judger: AsyncAgent = create_object(judger)
3738
# scoring rule settings

lagent/agents/fc_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ def __init__(
188188
tool_response_truncate_side: Literal['left', 'right', 'middle'] = 'middle',
189189
action_hooks: List[Union[dict, Hook]] = None,
190190
name: Optional[str] = None,
191+
**kwargs
191192
):
192-
super().__init__(name=name)
193+
super().__init__(name=name, **kwargs)
193194
if isinstance(actions, AsyncActionExecutor):
194195
for action_hook in action_hooks or []:
195196
actions.register_hook(create_object(action_hook))

0 commit comments

Comments
 (0)