Module: Structify::Model::ClassMethods
- Defined in:
- lib/structify/model.rb
Overview
Class methods added to the including class
Instance Method Summary collapse
-
#extraction_version ⇒ Integer
Get the current extraction version.
-
#json_schema ⇒ Hash
Get the JSON schema representation.
-
#schema_definition {|void| ... } ⇒ void
Define the schema for LLM extraction.
Instance Method Details
#extraction_version ⇒ Integer
Get the current extraction version
103 104 105 |
# File 'lib/structify/model.rb', line 103 def extraction_version schema_builder&.version_number end |
#json_schema ⇒ Hash
Get the JSON schema representation
96 97 98 |
# File 'lib/structify/model.rb', line 96 def json_schema schema_builder&.to_json_schema end |
#schema_definition {|void| ... } ⇒ void
This method returns an undefined value.
Define the schema for LLM extraction
88 89 90 91 |
# File 'lib/structify/model.rb', line 88 def schema_definition(&block) self.schema_builder ||= SchemaBuilder.new(self) schema_builder.instance_eval(&block) if block_given? end |