alexhancock/mcp-crate-cleanup (#4885)
This commit is contained in:
@@ -5,10 +5,8 @@ use goose::conversation::message::Message;
|
||||
use goose::providers::{
|
||||
bedrock::BedrockProvider, databricks::DatabricksProvider, openai::OpenAiProvider,
|
||||
};
|
||||
use mcp_core::tool::ToolCall;
|
||||
use rmcp::model::{Content, Tool};
|
||||
use rmcp::model::{CallToolRequestParam, Content, Tool};
|
||||
use rmcp::object;
|
||||
use serde_json::json;
|
||||
use std::fs;
|
||||
|
||||
#[tokio::main]
|
||||
@@ -33,10 +31,10 @@ async fn main() -> Result<()> {
|
||||
Message::user().with_text("Read the image at ./test_image.png please"),
|
||||
Message::assistant().with_tool_request(
|
||||
"000",
|
||||
Ok(ToolCall::new(
|
||||
"view_image",
|
||||
json!({"path": "./test_image.png"}),
|
||||
)),
|
||||
Ok(CallToolRequestParam {
|
||||
name: "view_image".into(),
|
||||
arguments: Some(object!({"path": "./test_image.png"})),
|
||||
}),
|
||||
),
|
||||
Message::user()
|
||||
.with_tool_response("000", Ok(vec![Content::image(base64_image, "image/png")])),
|
||||
|
||||
Reference in New Issue
Block a user