Implement the Ollama DELETE /api/delete endpoint for removing models from the server. - Add DeleteRequest type with model field in src/types/delete.rs - Add OllamaClient::delete() async method in src/lib.rs - Register delete module in src/types/mod.rs - Add usage example in examples/delete.rs
27 lines
1.2 KiB
Rust
27 lines
1.2 KiB
Rust
//! Request and response types for the Ollama API.
|
|
//!
|
|
//! Each submodule corresponds to an API endpoint:
|
|
//!
|
|
//! | Module | Endpoint | Description |
|
|
//! |--------------|-----------------------|------------------------------------------|
|
|
//! | [`chat`] | `POST /api/chat` | Multi-turn chat conversations |
|
|
//! | [`delete`] | `DELETE /api/delete` | Delete a model from the server |
|
|
//! | [`generate`] | `POST /api/generate` | Single-prompt text generation |
|
|
//! | [`pull`] | `POST /api/pull` | Download models from the registry |
|
|
//! | [`tags`] | `GET /api/tags` | List available models |
|
|
//! | [`ps`] | `GET /api/ps` | List currently loaded/running models |
|
|
//! | [`version`] | `GET /api/version` | Query the server version |
|
|
//!
|
|
//! The [`common`] module contains types shared across multiple endpoints, such as
|
|
//! [`Options`](common::Options) for generation parameters, [`Think`](common::Think)
|
|
//! for reasoning mode, and [`ModelDetails`](common::ModelDetails).
|
|
|
|
pub mod chat;
|
|
pub mod common;
|
|
pub mod delete;
|
|
pub mod generate;
|
|
pub mod ps;
|
|
pub mod pull;
|
|
pub mod tags;
|
|
pub mod version;
|