alexhancock/rmcp-tools-annotations (#3617)
This commit is contained in:
@@ -5,8 +5,9 @@ use goose::{
|
||||
message::Message,
|
||||
providers::{bedrock::BedrockProvider, databricks::DatabricksProvider, openai::OpenAiProvider},
|
||||
};
|
||||
use mcp_core::tool::{Tool, ToolCall};
|
||||
use rmcp::model::Content;
|
||||
use mcp_core::tool::ToolCall;
|
||||
use rmcp::model::{Content, Tool};
|
||||
use rmcp::object;
|
||||
use serde_json::json;
|
||||
use std::fs;
|
||||
|
||||
@@ -42,7 +43,7 @@ async fn main() -> Result<()> {
|
||||
];
|
||||
|
||||
// Get a response from the model about the image
|
||||
let input_schema = json!({
|
||||
let input_schema = object!({
|
||||
"type": "object",
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
@@ -57,7 +58,7 @@ async fn main() -> Result<()> {
|
||||
.complete(
|
||||
"You are a helpful assistant. Please describe any text you see in the image.",
|
||||
&messages,
|
||||
&[Tool::new("view_image", "View an image", input_schema, None)],
|
||||
&[Tool::new("view_image", "View an image", input_schema)],
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user