Skip to content

Conversation

@hashemix
Copy link
Member

@hashemix hashemix commented Mar 11, 2025

📌 Summary

Added new utility functions for CallToolResultContentItem type, for easier conversion of call tool results into contents:

Example:

// get the content type
println!("{}",content.content_type())

// try to convert to TextContent
let text_content : TextContent = content.as_text_content().unwrap();

// try to convert to ImageContent
let image_content : ImageContent = content.as_image_content().unwrap();

// try to convert to EmbeddedResource
let embedded_resource : EmbeddedResource = content.as_embedded_resource().unwrap();

AudioContent (draft version of schema)

// try to convert to AudioContent
let audio_content : AudioContent = content.as_audio_content().unwrap();

@hashemix hashemix self-assigned this Mar 11, 2025
@hashemix hashemix merged commit 1fe212c into main Mar 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants