Class: LlmGateway::Adapters::OpenAI::Responses::InputMapper
- Inherits:
-
OpenAI::ChatCompletions::InputMapper
- Object
- OpenAI::ChatCompletions::InputMapper
- LlmGateway::Adapters::OpenAI::Responses::InputMapper
show all
- Defined in:
- lib/llm_gateway/adapters/openai/responses/input_mapper.rb
Class Method Summary
collapse
Class Method Details
.map_content(content) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/llm_gateway/adapters/openai/responses/input_mapper.rb', line 10
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 "image"
map_image_content(content)
when "message"
map_messages_content(content)
when "output_text"
map_output_text_content(content)
when "tool_use", "function_call"
map_tool_use_content(content)
when "tool_result"
map_tool_result_content(content)
when "reasoning"
map_reasoning_content(content)
else
content
end
end
|