update rmcp
add mistral config to own_assist_common
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "own_assist_common"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0"
|
||||
|
||||
@@ -11,4 +11,5 @@ serde = { version = "1.0.228", features = ["derive"] }
|
||||
log = "0.4.29"
|
||||
tracing-subscriber = { version = "0.3.23", features = ["env-filter"]}
|
||||
url = { version = "2.5.8", features = ["serde"] }
|
||||
ollama-rs = { version = "0.3.6", features = ["headers"]}
|
||||
ollama-rs = { version = "0.3.6", features = ["headers"]}
|
||||
own_mcp = { version = "0.2.0", registry = "gitea" }
|
||||
@@ -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