ollama-rest 0.7.1

Asynchronous Rust bindings of Ollama REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};
use serde_json::Map;

#[derive(Debug, Serialize, Deserialize)]
pub struct EmbeddingGenerationRequest {
    pub model: String,
    pub prompt: String,

    pub options: Option<Map<String, serde_json::Value>>,
    pub keep_alive: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct EmbeddingGenerationResponse {
    pub embedding: Vec<f64>,
}