Class: LLMed::LLM::Test
- Inherits:
-
Object
- Object
- LLMed::LLM::Test
- Defined in:
- lib/llm.rb
Instance Method Summary collapse
- #chat(messages: []) ⇒ Object
- #chat_parameters ⇒ Object
-
#initialize ⇒ Test
constructor
A new instance of Test.
- #model ⇒ Object
- #provider ⇒ Object
- #source_code(code) ⇒ Object
Constructor Details
#initialize ⇒ Test
Returns a new instance of Test.
123 124 125 |
# File 'lib/llm.rb', line 123 def initialize @output = '' end |
Instance Method Details
#chat(messages: []) ⇒ Object
135 136 137 138 |
# File 'lib/llm.rb', line 135 def chat(messages: []) output = .map { |m| m[:content] }.join("\n") Struct.new(:chat_completion, :total_tokens).new(output, 0) end |
#chat_parameters ⇒ Object
127 128 129 |
# File 'lib/llm.rb', line 127 def chat_parameters { model: 'test' } end |
#model ⇒ Object
131 132 133 |
# File 'lib/llm.rb', line 131 def model 'test' end |
#provider ⇒ Object
144 145 146 |
# File 'lib/llm.rb', line 144 def provider :test end |
#source_code(code) ⇒ Object
140 141 142 |
# File 'lib/llm.rb', line 140 def source_code(code) code end |