This commit is contained in:
2026-08-07 13:28:09 +07:00
parent 2de4fa07c1
commit 14bac755ea
2 changed files with 74 additions and 45 deletions
-40
View File
@@ -139,51 +139,11 @@ struct textContent <: messageContent # Plain text message content
text::String # The text content
end
"""
Create plain text message content.
# Arguments
- `text::String`: The text content
# Returns
- A new `textContent` instance
# Examples
```julia
julia> content = textContent("Hello, world!")
textContent("Hello, world!")
```
"""
function textContent(; text="")
return textContent(text)
end
struct imageContent <: messageContent # Image message content
data::String # Base64-encoded image data
mimeType::String # MIME type (e.g., "image/png")
end
"""
Create image message content.
# Arguments
- `data::String`: Base64-encoded image data
- `mimeType::String`: MIME type (e.g., "image/png")
# Returns
- A new `imageContent` instance
# Examples
```julia
julia> img = imageContent(data="base64data...", mimeType="image/png")
imageContent("base64data...", "image/png")
```
"""
function imageContent(; data="", mimeType="")
return imageContent(data, mimeType)
end
# ------------------------------------------------------------------------------------------------ #
# Tool types #
# ------------------------------------------------------------------------------------------------ #