Class: TheCompaniesAPI::Generated::Models::Prompt

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

Overview

A natural language request made to the platform resolving to a specific action or search segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Prompt

Initialize a new Prompt

Parameters:

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

    Initial data



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 51

def initialize(data = {})
                @company_id = data['companyId']
                @context = data['context']
                @created_at = data['createdAt']
                @data = data['data']
                @feature = data['feature']
                @hits = data['hits']
                @id = data['id']
                @model = data['model']
                @prompt = data['prompt']
                @prompt_key = data['promptKey']
                @response = data['response']
                @updated_at = data['updatedAt']
end

Instance Attribute Details

#company_idFloat

Returns companyId.

Returns:

  • (Float)

    companyId



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

def company_id
  @company_id
end

#contextString

Returns context.

Returns:

  • (String)

    context



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

def context
  @context
end

#created_atString

Returns createdAt.

Returns:

  • (String)

    createdAt



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

def created_at
  @created_at
end

#dataHash

Returns data.

Returns:

  • (Hash)

    data



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

def data
  @data
end

#featureString

Returns feature.

Returns:

  • (String)

    feature



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

def feature
  @feature
end

#hitsFloat

Returns hits.

Returns:

  • (Float)

    hits



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

def hits
  @hits
end

#idFloat

Returns id.

Returns:

  • (Float)

    id



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

def id
  @id
end

#modelString

Returns model.

Returns:

  • (String)

    model



33
34
35
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 33

def model
  @model
end

#promptString

Returns prompt.

Returns:

  • (String)

    prompt



36
37
38
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 36

def prompt
  @prompt
end

#prompt_keyString

Returns promptKey.

Returns:

  • (String)

    promptKey



39
40
41
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 39

def prompt_key
  @prompt_key
end

#responseObject

Returns response.

Returns:

  • (Object)

    response



42
43
44
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 42

def response
  @response
end

#updated_atString

Returns updatedAt.

Returns:

  • (String)

    updatedAt



45
46
47
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 45

def updated_at
  @updated_at
end

Instance Method Details

#to_hashHash Also known as: to_h

Convert to hash

Returns:

  • (Hash)

    Hash representation



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 70

def to_hash
  {
          'companyId' => @company_id,
          'context' => @context,
          'createdAt' => @created_at,
          'data' => @data,
          'feature' => @feature,
          'hits' => @hits,
          'id' => @id,
          'model' => @model,
          'prompt' => @prompt,
          'promptKey' => @prompt_key,
          'response' => @response,
          'updatedAt' => @updated_at,
  }
end