Class: Foobara::Ai::OllamaApi::GenerateChatCompletion
- Inherits:
-
BaseCommand
- Object
- Command
- BaseCommand
- Foobara::Ai::OllamaApi::GenerateChatCompletion
- Defined in:
- foobara-ollama-api-1.0.3/src/foobara/ai/ollama_api/generate_chat_completion.rb
Constant Summary
Constants included from TruncatedInspect
Instance Method Summary collapse
Methods inherited from BaseCommand
#api_token, #build_request_headers
Methods inherited from Command
Methods included from TruncatedInspect
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Method Details
#build_request_body ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'src/foobara/ai/ollama_api/generate_chat_completion.rb', line 21 def build_request_body inputs = { model:, messages:, stream: false } if && !.empty? inputs[:options] = end self.request_body = inputs.merge(stream: false) end |