struct

AgentKit::OpenAIApi::ChatMessage

Inherits JSON::Serializable < Struct < Value < Object

Constructors

assistant(content : String) : ChatMessage
Source
assistant_with_tools(tool_calls : Array(ToolCall)) : ChatMessage
Source
new(role : String, content : String | Nil = nil, tool_calls : Array(ToolCall) | Nil = nil, tool_call_id : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
system(content : String) : ChatMessage
Source
tool_result(tool_call_id : String, content : String) : ChatMessage
Source
user(content : String) : ChatMessage
Source

Instance methods

content
Source
content=(content : String | Nil)
Source
role
Source
role=(role : String)
Source
tool_call_id
Source
tool_call_id=(tool_call_id : String | Nil)
Source
tool_calls
Source
tool_calls=(tool_calls : Array(ToolCall) | Nil)
Source