Class: Agent::SessionContext::SemanticSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/agent/session_context/semantic_schema.rb

Constant Summary collapse

EVIDENCE_VALUES =
%w[explicit inferred].freeze

Class Method Summary collapse

Class Method Details

.extraction ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/agent/session_context/semantic_schema.rb', line 9

def extraction
  {
    "type" => "object",
    "required" => SemanticCategories.external_keys,
    "additionalProperties" => false,
    "properties" => SemanticCategories.all.to_h do |category|
      [category.external_key, array_schema(item_schema(category.item_shape))]
    end
  }
end