Indicate that the task has been completed. Args: reasoning (str): The reasoning of the task completion. Must be provided. result (str): The result of the task completion. Must be provided.
(self,
reasoning: str,
result: str,
**kwargs)
| 29 | super().__init__(require_grad=require_grad, **kwargs) |
| 30 | |
| 31 | async def __call__(self, |
| 32 | reasoning: str, |
| 33 | result: str, |
| 34 | **kwargs) -> ToolResponse: |
| 35 | """ |
| 36 | Indicate that the task has been completed. |
| 37 | |
| 38 | Args: |
| 39 | reasoning (str): The reasoning of the task completion. Must be provided. |
| 40 | result (str): The result of the task completion. Must be provided. |
| 41 | """ |
| 42 | # Convert to string in case LLM returns non-string types |
| 43 | if reasoning is None or reasoning == "": |
| 44 | reasoning = "No reasoning provided" |
| 45 | else: |
| 46 | reasoning = str(reasoning) |
| 47 | if result is None or result == "": |
| 48 | result = "No result provided" |
| 49 | else: |
| 50 | result = str(result) |
| 51 | return ToolResponse(success=True, message=result, extra=ToolExtra(data={"reasoning": reasoning, "result": result})) |
nothing calls this directly
no test coverage detected