Spaces:
Running
Running
| """finish_pocket โ ์๋ ด ํ์ (1ํ์ผ = 1ํจ์, FunctionTool). | |
| escalate๋ก ์ด๋ฒ ํด ํ์ดํ๋ผ์ธ์ ์ข ๋ฃ ์ ํธ๋ก ํ์ํ๋ค. ์ต์ข ์ ์ด๋ | |
| services/pocket.py์ ์ฝ๋ ์ฌ๊ฒ์ฆ์ ๊ฑฐ์ณ์ผ๋ง ํ์ ๋๋ค (LLM ์ถ๋ ฅ๋ง์ผ๋ก ์ ์ด ๊ธ์ง). | |
| """ | |
| from google.adk.tools import ToolContext | |
| def finish_pocket(reason: str, tool_context: ToolContext) -> dict: | |
| """์ฅ๋ฉด ์๋ ด์ ์ ์ธํ๋ค. | |
| Args: | |
| reason: "goal_reached" | "drift" | "stall" | |
| """ | |
| tool_context.state["pocket_converged"] = True | |
| tool_context.state["pocket_converge_reason"] = reason | |
| tool_context.actions.escalate = True | |
| return {"status": "ok", "reason": reason} | |