Class: TheCompaniesAPI::Generated::Models::Llmanswer

Inherits:
Object
  • Object
show all
Defined in:
lib/thecompaniesapi/generated/models/llmanswer.rb

Overview

An answer from a query made to the LLM.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Llmanswer

Initialize a new Llmanswer

Parameters:

  • data (Hash) (defaults to: {})

    Initial data



36
37
38
39
40
41
42
43
44
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 36

def initialize(data = {})
                @company_id = data['companyId']
                @explanation = data['explanation']
                @fields = data['fields']
                @grounded = data['grounded']
                @output = data['output']
                @question = data['question']
                @score = data['score']
end

Instance Attribute Details

#company_idFloat

Returns companyId.

Returns:

  • (Float)

    companyId



12
13
14
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 12

def company_id
  @company_id
end

#explanationString

Returns explanation.

Returns:

  • (String)

    explanation



15
16
17
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 15

def explanation
  @explanation
end

#fieldsArray

Returns fields.

Returns:

  • (Array)

    fields



18
19
20
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 18

def fields
  @fields
end

#groundedBoolean

Returns grounded.

Returns:

  • (Boolean)

    grounded



21
22
23
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 21

def grounded
  @grounded
end

#outputHash

Returns output.

Returns:

  • (Hash)

    output



24
25
26
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 24

def output
  @output
end

#questionString

Returns question.

Returns:

  • (String)

    question



27
28
29
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 27

def question
  @question
end

#scoreFloat

Returns score.

Returns:

  • (Float)

    score



30
31
32
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 30

def score
  @score
end

Instance Method Details

#to_hashHash Also known as: to_h

Convert to hash

Returns:

  • (Hash)

    Hash representation



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/thecompaniesapi/generated/models/llmanswer.rb', line 50

def to_hash
  {
          'companyId' => @company_id,
          'explanation' => @explanation,
          'fields' => @fields,
          'grounded' => @grounded,
          'output' => @output,
          'question' => @question,
          'score' => @score,
  }
end