(self, reward: float, msg_ids: list[str], timeout: float = 10)
| 42 | return response.json() |
| 43 | |
| 44 | async def feedback_async(self, reward: float, msg_ids: list[str], timeout: float = 10) -> dict: |
| 45 | async with httpx.AsyncClient() as client: |
| 46 | response = await client.post( |
| 47 | self.feedback_url, |
| 48 | json={"reward": reward, "msg_ids": msg_ids, "task_id": self.task_id}, |
| 49 | timeout=timeout, |
| 50 | ) |
| 51 | return response.json() |
| 52 | |
| 53 | def commit(self, timeout: float = 10) -> dict: |
| 54 | response = requests.post(f"{self.proxy_url}/commit", timeout=timeout) |
no outgoing calls