configs now clonable
This commit is contained in:
@@ -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