update
This commit is contained in:
-40
@@ -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 #
|
||||
# ------------------------------------------------------------------------------------------------ #
|
||||
|
||||
Reference in New Issue
Block a user