Skip to content

Commit 42aa680

Browse files
make darglint compliant
1 parent 12b6d50 commit 42aa680

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/agentlab/llm/response_api.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,23 @@ class AgentlabAction:
433433

434434
def convert_toolcall_to_agentlab_action_format(toolcall: ToolCall) -> str:
435435
"""Convert a tool call to an Agentlab environment action string.
436-
This converts tools calls to python function call strings."""
436+
Args:
437+
toolcall: ToolCall object containing the name and arguments of the tool call.
438+
439+
Returns:
440+
str: A string representing the action in Agentlab format i.e. python function call string.
441+
"""
442+
437443
tool_name, tool_args = toolcall.name, toolcall.arguments
438444
return tool_call_to_python_code(tool_name, tool_args)
439445

440446
def convert_multiactions_to_agentlab_action_format(actions: list[str]) -> str:
441-
"""Convert multiple actions list to a format that env supports
442-
Joins multiple python function calls with a newline character.
447+
"""Convert multiple actions list to a format that env supports.
448+
Args:
449+
actions: List of action strings to be joined.
450+
451+
Returns:
452+
str: Joined actions separated by newlines, or None if empty.
443453
"""
444454
return "\n".join(actions) if actions else None
445455

@@ -655,7 +665,7 @@ def _extract_thinking_content_from_response(
655665
Note: The wrapping of 'thinking' content may not be nedeed and may be reconsidered.
656666
657667
Args:
658-
message: The message object or dict containing content and reasoning.
668+
response: The message object or dict containing content and reasoning.
659669
wrap_tag: The tag name to wrap reasoning content (default: "think").
660670
661671
Returns:
@@ -723,6 +733,7 @@ def format_tools_for_chat_completion(tools):
723733
Why we need this?
724734
Ans: actionset.to_tool_description() in bgym only returns description
725735
format valid for OpenAI Response API.
736+
726737
Args:
727738
tools: List of tool descriptions to format for Chat Completion API.
728739

0 commit comments

Comments
 (0)