ruby-sdk/lib/model_context_protocol/content.rb
Topher Bullock a4df3b8688 Internal Release v0.1.1
- implement `Prompt`
- adjust Tool approach
- update readme for tool calling
- document usage of `Prompt`
2025-05-08 17:37:27 -04:00

33 lines
646 B
Ruby

# typed: true
# frozen_string_literal: true
module ModelContextProtocol
module Content
class Text
attr_reader :text, :annotations
def initialize(text, annotations: nil)
@text = text
@annotations = annotations
end
def to_h
{ text:, annotations: }.compact
end
end
class Image
attr_reader :data, :mime_type, :annotations
def initialize(data, mime_type, annotations: nil)
@data = data
@mime_type = mime_type
@annotations = annotations
end
def to_h
{ data:, mime_type:, annotations: }.compact
end
end
end
end