Class: Llmemory::LLM::Base
- Inherits:
-
Object
- Object
- Llmemory::LLM::Base
- Defined in:
- lib/llmemory/llm/base.rb
Instance Method Summary collapse
- #invoke(prompt) ⇒ Object
-
#invoke_with_json_schema(_prompt, _json_schema) ⇒ Object
Optional: Structured Outputs (JSON schema).
Instance Method Details
#invoke(prompt) ⇒ Object
6 7 8 |
# File 'lib/llmemory/llm/base.rb', line 6 def invoke(prompt) raise NotImplementedError, "#{self.class}#invoke must be implemented" end |
#invoke_with_json_schema(_prompt, _json_schema) ⇒ Object
Optional: Structured Outputs (JSON schema). Override in providers that support it (e.g. OpenAI). When not overridden, returns nil and callers should fall back to invoke + parse.
12 13 14 |
# File 'lib/llmemory/llm/base.rb', line 12 def invoke_with_json_schema(_prompt, _json_schema) nil end |