diff --git a/agent-office/app/service_proxy.py b/agent-office/app/service_proxy.py index c49237e..5727e9f 100644 --- a/agent-office/app/service_proxy.py +++ b/agent-office/app/service_proxy.py @@ -228,6 +228,26 @@ async def insta_put_preferences(weights: Dict[str, float]) -> Dict[str, Any]: return resp.json() +async def insta_ranked(threshold: float = 0.6, limit: int = 20) -> list: + async with httpx.AsyncClient(timeout=120) as client: + r = await client.get( + f"{INSTA_LAB_URL}/api/insta/keywords/ranked", + params={"threshold": threshold, "limit": limit}, + ) + r.raise_for_status() + return r.json()["items"] + + +async def insta_decision(slate_id: int, decision: str) -> dict: + async with httpx.AsyncClient(timeout=30) as client: + r = await client.post( + f"{INSTA_LAB_URL}/api/insta/slates/{slate_id}/decision", + json={"decision": decision}, + ) + r.raise_for_status() + return r.json() + + # --- realestate-lab --- async def realestate_collect() -> Dict[str, Any]: