Move whole rmcp crate to offcial rust sdk (#44)
* get rid of async-trait * move rmcp to official-rust-sdk * replace master with main * update readme, change license * fix typo * Update README.md Co-authored-by: Jefry Dewangga <jefrydco@gmail.com> * fix typos --------- Co-authored-by: = <=> Co-authored-by: Jefry Dewangga <jefrydco@gmail.com>
This commit is contained in:
parent
31493cfbcc
commit
0be6067326
1 changed files with 8676 additions and 4466 deletions
20
examples/rig-integration/src/config.rs
Normal file
20
examples/rig-integration/src/config.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use std::path::Path;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod mcp;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Config {
|
||||
pub mcp: mcp::McpConfig,
|
||||
pub deepseek_key: Option<String>,
|
||||
pub cohere_key: Option<String>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub async fn retrive(path: impl AsRef<Path>) -> anyhow::Result<Self> {
|
||||
let content = tokio::fs::read_to_string(path).await?;
|
||||
let config: Self = toml::from_str(&content)?;
|
||||
Ok(config)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue