configs now clonable

This commit is contained in:
2026-07-28 18:11:19 +02:00
parent e90efbb544
commit f5cf067dbd
3 changed files with 10 additions and 10 deletions
Generated
+4 -4
View File
@@ -1998,7 +1998,7 @@ dependencies = [
"log", "log",
"mcp_server_collection 0.2.2 (sparse+https://git.mboemer.de/api/packages/milan/cargo/)", "mcp_server_collection 0.2.2 (sparse+https://git.mboemer.de/api/packages/milan/cargo/)",
"ollama-rs", "ollama-rs",
"own_assist_common 0.4.1 (sparse+https://git.mboemer.de/api/packages/milan/cargo/)", "own_assist_common 0.4.1",
"own_mcp 0.1.1 (sparse+https://git.mboemer.de/api/packages/milan/cargo/)", "own_mcp 0.1.1 (sparse+https://git.mboemer.de/api/packages/milan/cargo/)",
"rmcp", "rmcp",
"rodio", "rodio",
@@ -2025,6 +2025,8 @@ dependencies = [
[[package]] [[package]]
name = "own_assist_common" name = "own_assist_common"
version = "0.4.1" version = "0.4.1"
source = "sparse+https://git.mboemer.de/api/packages/milan/cargo/"
checksum = "324156da8ebc00f6d5b6bd7709ffdf4dfe56bb0bb274315c133060d59ac8212b"
dependencies = [ dependencies = [
"log", "log",
"ollama-rs", "ollama-rs",
@@ -2037,9 +2039,7 @@ dependencies = [
[[package]] [[package]]
name = "own_assist_common" name = "own_assist_common"
version = "0.4.1" version = "0.4.2"
source = "sparse+https://git.mboemer.de/api/packages/milan/cargo/"
checksum = "324156da8ebc00f6d5b6bd7709ffdf4dfe56bb0bb274315c133060d59ac8212b"
dependencies = [ dependencies = [
"log", "log",
"ollama-rs", "ollama-rs",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "own_assist_common" name = "own_assist_common"
version = "0.4.1" version = "0.4.2"
edition = "2024" edition = "2024"
license = "GPL-3.0" license = "GPL-3.0"
+5 -5
View File
@@ -4,7 +4,7 @@ use ollama_rs::models::create::{CreateModelRequest, CreateModelStatus};
use serde::Deserialize; use serde::Deserialize;
use url::Url; use url::Url;
#[derive(Debug, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct AudioClientConfig { pub struct AudioClientConfig {
pub url: Url, pub url: Url,
pub authorization: Option<String>, pub authorization: Option<String>,
@@ -14,7 +14,7 @@ fn ollama_default_url() -> Url {
Url::parse("http://127.0.0.1:11434").unwrap() Url::parse("http://127.0.0.1:11434").unwrap()
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct OllamaConfig { pub struct OllamaConfig {
#[serde(default = "ollama_default_url")] #[serde(default = "ollama_default_url")]
pub url: Url, pub url: Url,
@@ -72,7 +72,7 @@ impl OllamaConfig {
} }
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct OllamaModelConfig { pub struct OllamaModelConfig {
#[serde(rename = "from-model")] #[serde(rename = "from-model")]
pub from_model: String, pub from_model: String,
@@ -82,9 +82,9 @@ pub struct OllamaModelConfig {
pub temperature: Option<f32>, pub temperature: Option<f32>,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct MCPClientConfig { pub struct MCPClientConfig {
pub name: Option<String>, pub name: Option<String>,
pub url: Url, pub url: Url,
pub authorization: Option<String>, // should probably implement oauth some time // actually, fuck oauth pub authorization: Option<String>, // should probably implement oauth some time // actually, fuck oauth
} }