(self, reward: float, msg_ids: list[str], timeout: float = 10)
| 34 | return client |
| 35 | |
| 36 | def feedback(self, reward: float, msg_ids: list[str], timeout: float = 10) -> dict: |
| 37 | response = requests.post( |
| 38 | self.feedback_url, |
| 39 | json={"reward": reward, "msg_ids": msg_ids, "task_id": self.task_id}, |
| 40 | timeout=timeout, |
| 41 | ) |
| 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: |
no outgoing calls