configs now clonable
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "own_assist_common"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use ollama_rs::models::create::{CreateModelRequest, CreateModelStatus};
|
||||
use serde::Deserialize;
|
||||
use url::Url;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct AudioClientConfig {
|
||||
pub url: Url,
|
||||
pub authorization: Option<String>,
|
||||
@@ -14,7 +14,7 @@ fn ollama_default_url() -> Url {
|
||||
Url::parse("http://127.0.0.1:11434").unwrap()
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct OllamaConfig {
|
||||
#[serde(default = "ollama_default_url")]
|
||||
pub url: Url,
|
||||
@@ -72,7 +72,7 @@ impl OllamaConfig {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct OllamaModelConfig {
|
||||
#[serde(rename = "from-model")]
|
||||
pub from_model: String,
|
||||
@@ -82,9 +82,9 @@ pub struct OllamaModelConfig {
|
||||
pub temperature: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct MCPClientConfig {
|
||||
pub name: Option<String>,
|
||||
pub url: Url,
|
||||
pub authorization: Option<String>, // should probably implement oauth some time // actually, fuck oauth
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user