Class: LiterLlm::ResponseFormatJsonSchema
- Inherits:
-
Data
- Object
- Data
- LiterLlm::ResponseFormatJsonSchema
- Extended by:
- T::Sig
- Includes:
- ResponseFormat
- Defined in:
- lib/liter_llm/native.rb
Overview
Output must conform to the specified JSON schema.
Instance Attribute Summary collapse
-
#json_schema ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#json_schema ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
375 376 377 |
# File 'lib/liter_llm/native.rb', line 375 def json_schema @json_schema end |
Class Method Details
.from_hash(hash) ⇒ Object
391 392 393 |
# File 'lib/liter_llm/native.rb', line 391 def self.from_hash(hash) new(json_schema: hash[:json_schema] || hash["json_schema"]) end |
Instance Method Details
#json_object? ⇒ Boolean
385 |
# File 'lib/liter_llm/native.rb', line 385 def json_object? = false |
#json_schema? ⇒ Boolean
387 388 389 |
# File 'lib/liter_llm/native.rb', line 387 def json_schema? = true # @param hash [Hash] deserialized from the native extension # @return [self] |
#text? ⇒ Boolean
383 |
# File 'lib/liter_llm/native.rb', line 383 def text? = false |