MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / create

Method create

verl/verl/tools/base_tool.py:46–59  ·  view source on GitHub ↗

Create a tool instance. Args: instance_id: The instance id of the tool. Returns: The instance id of the tool. tool_creation_response: The response of the tool when creating the instance.

(self, instance_id: Optional[str] = None, **kwargs)

Source from the content-addressed store, hash-verified

44 return self.tool_schema
45
46 async def create(self, instance_id: Optional[str] = None, **kwargs) -> tuple[str, ToolResponse]:
47 """Create a tool instance.
48
49 Args:
50 instance_id: The instance id of the tool.
51
52 Returns:
53 The instance id of the tool.
54 tool_creation_response: The response of the tool when creating the instance.
55 """
56 if instance_id is None:
57 return str(uuid4()), ToolResponse()
58 else:
59 return instance_id, ToolResponse()
60
61 @rollout_trace_op
62 async def execute(self, instance_id: str, parameters: dict[str, Any], **kwargs) -> tuple[ToolResponse, float, dict]:

Callers 15

queryFunction · 0.45
run_mergeFunction · 0.45
setUpMethod · 0.45
test_sft_cot_datasetFunction · 0.45
test_sft_datasetFunction · 0.45
test_rl_datasetFunction · 0.45
test_image_rl_dataFunction · 0.45
test_video_rl_dataFunction · 0.45

Calls 1

ToolResponseClass · 0.85

Tested by 15

setUpMethod · 0.36
test_sft_cot_datasetFunction · 0.36
test_sft_datasetFunction · 0.36
test_rl_datasetFunction · 0.36
test_image_rl_dataFunction · 0.36
test_video_rl_dataFunction · 0.36
setUpMethod · 0.36