chore: fix typos (#79)
This commit is contained in:
parent
4ca00c2052
commit
6a648b8827
4 changed files with 14 additions and 14 deletions
|
|
@ -12,7 +12,7 @@ pub struct Config {
|
|||
}
|
||||
|
||||
impl Config {
|
||||
pub async fn retrive(path: impl AsRef<Path>) -> anyhow::Result<Self> {
|
||||
pub async fn retrieve(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)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub mod config;
|
|||
pub mod mcp_adaptor;
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let config = config::Config::retrive("config.toml").await?;
|
||||
let config = config::Config::retrieve("config.toml").await?;
|
||||
let openai_client = {
|
||||
if let Some(key) = config.deepseek_key {
|
||||
deepseek::Client::new(&key)
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ impl Calculator {
|
|||
(a + b).to_string()
|
||||
}
|
||||
|
||||
#[tool(description = "Calculate the sum of two numbers")]
|
||||
#[tool(description = "Calculate the sub of two numbers")]
|
||||
fn sub(
|
||||
&self,
|
||||
#[tool(param)]
|
||||
#[schemars(description = "the left hand side number")]
|
||||
a: i32,
|
||||
#[tool(param)]
|
||||
#[schemars(description = "the left hand side number")]
|
||||
#[schemars(description = "the right hand side number")]
|
||||
b: i32,
|
||||
) -> Json<i32> {
|
||||
Json(a - b)
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ impl ServerHandler for Counter {
|
|||
next_cursor: None,
|
||||
prompts: vec![Prompt::new(
|
||||
"example_prompt",
|
||||
Some("This is an example prompt that takes one required agrument, message"),
|
||||
Some("This is an example prompt that takes one required argument, message"),
|
||||
Some(vec![PromptArgument {
|
||||
name: "message".to_string(),
|
||||
description: Some("A message to put in the prompt".to_string()),
|
||||
|
|
|
|||
Loading…
Reference in a new issue