18 lines
299 B
Ruby
18 lines
299 B
Ruby
# frozen_string_literal: true
|
|
|
|
module MCP
|
|
class Prompt
|
|
class Message
|
|
attr_reader :role, :content
|
|
|
|
def initialize(role:, content:)
|
|
@role = role
|
|
@content = content
|
|
end
|
|
|
|
def to_h
|
|
{ role:, content: content.to_h }.compact
|
|
end
|
|
end
|
|
end
|
|
end
|