ollama-rs 0.3.5

A Rust library for interacting with the Ollama API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Image(String);

impl Image {
    pub fn from_base64(base64: impl Into<String>) -> Self {
        Self(base64.into())
    }

    pub fn to_base64(&self) -> &str {
        &self.0
    }
}