Performs cleanup and releases resources held by the toolset.
(self)
| 1170 | |
| 1171 | @override |
| 1172 | async def close(self) -> None: |
| 1173 | """Performs cleanup and releases resources held by the toolset.""" |
| 1174 | for turn_cache in self._fetched_skill_cache.values(): |
| 1175 | for cached in turn_cache.values(): |
| 1176 | if isinstance(cached, asyncio.Future) and not cached.done(): |
| 1177 | cached.cancel() |
| 1178 | self._fetched_skill_cache.clear() |
| 1179 | await super().close() |
| 1180 | |
| 1181 | |
| 1182 | DEFAULT_SKILL_SYSTEM_INSTRUCTION = _build_skill_system_instruction() |