15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/llm_gateway/adapters/anthropic/input_mapper.rb', line 15
def self.map_content(content)
content = { type: "text", text: content } unless content.is_a?(Hash)
case content[:type]
when "text"
map_text_content(content)
when "file"
map_file_content(content)
when "image"
map_image_content(content)
when "tool_use"
map_tool_use_content(content)
when "tool_result"
map_tool_result_content(content)
when "server_tool_result"
map_server_tool_result_content(content)
when "thinking", "reasoning"
map_reasoning_content(content)
else
content
end
end
|