Module: RubyLLM::Providers::GPUStack::Chat
- Included in:
- RubyLLM::Providers::GPUStack
- Defined in:
- lib/ruby_llm/providers/gpustack/chat.rb
Overview
Chat methods of the GPUStack API integration
Class Method Summary collapse
Class Method Details
.format_messages(messages) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_llm/providers/gpustack/chat.rb', line 10 def () .map do |msg| { role: format_role(msg.role), content: GPUStack::Media.format_content(msg.content), tool_calls: format_tool_calls(msg.tool_calls), tool_call_id: msg.tool_call_id }.compact end end |
.format_role(role) ⇒ Object
21 22 23 |
# File 'lib/ruby_llm/providers/gpustack/chat.rb', line 21 def format_role(role) role.to_s end |