Cancel the current ongoing operation (send/stream). If an operation is in progress, this will trigger cancellation of the LLM streaming and tool execution. The operation will terminate as soon as possible. :returns: ``True`` if an operation was cancelled, ``False`` if no operation was in progress.
(&self, py: Python<'_>)
| 3292 | /// |
| 3293 | /// :returns: ``True`` if an operation was cancelled, ``False`` if no operation was in progress. |
| 3294 | fn cancel(&self, py: Python<'_>) -> bool { |
| 3295 | let session = self.inner.clone(); |
| 3296 | py.allow_threads(move || get_runtime().block_on(session.cancel())) |
| 3297 | } |
| 3298 | |
| 3299 | /// Close the session and cancel any active operation. |
| 3300 | fn close(&self, py: Python<'_>) -> PyResult<()> { |
no test coverage detected