Detach a source from an agent
(self, source_id: str, agent_id: str)
| 1478 | return AgentState(**response.json()) |
| 1479 | |
| 1480 | def detach_source(self, source_id: str, agent_id: str) -> AgentState: |
| 1481 | """Detach a source from an agent""" |
| 1482 | params = {"agent_id": str(agent_id)} |
| 1483 | response = requests.patch( |
| 1484 | f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/sources/detach/{source_id}", params=params, headers=self.headers |
| 1485 | ) |
| 1486 | assert response.status_code == 200, f"Failed to detach source from agent: {response.text}" |
| 1487 | return AgentState(**response.json()) |
| 1488 | |
| 1489 | # tools |
| 1490 |
no test coverage detected