update rmcp

add mistral config to own_assist_common
This commit is contained in:
2026-07-30 20:59:17 +02:00
parent 199d4080cb
commit 5a4bf4ec8a
7 changed files with 95 additions and 82 deletions
+15
View File
@@ -1,6 +1,7 @@
use ollama_rs::error::OllamaError;
use ollama_rs::models::ModelOptions;
use ollama_rs::models::create::{CreateModelRequest, CreateModelStatus};
use own_mcp::mcp::Mistral;
use serde::Deserialize;
use url::Url;
@@ -82,6 +83,20 @@ pub struct OllamaModelConfig {
pub temperature: Option<f32>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct MistralConfig {
#[serde(rename = "api-key")]
pub api_key: String,
#[serde(rename = "system-prompt")]
pub system_prompt: Option<String>,
}
impl MistralConfig {
pub fn mistral(self) -> Mistral {
Mistral::new(self.api_key).with_system_prompt(self.system_prompt)
}
}
#[derive(Debug, Clone, Deserialize)]
pub struct MCPClientConfig {
pub name: Option<String>,