reagent-rs 0.2.4

A Rust library for building AI agents with MCP & custom tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::collections::HashMap;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Debug, Clone)]
pub struct EmbeddingsRequest {
    pub model: String,
    pub input: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub options: Option<HashMap<String, serde_json::Value>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub keep_alive: Option<String>,
}

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