update rmcp
add mistral config to own_assist_common
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user