Class: TheCompaniesAPI::Generated::Models::Prompt
- Inherits:
-
Object
- Object
- TheCompaniesAPI::Generated::Models::Prompt
- 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
-
#company_id ⇒ Float
CompanyId.
-
#context ⇒ String
Context.
-
#created_at ⇒ String
CreatedAt.
-
#data ⇒ Hash
Data.
-
#feature ⇒ String
Feature.
-
#hits ⇒ Float
Hits.
-
#id ⇒ Float
Id.
-
#model ⇒ String
Model.
-
#prompt ⇒ String
Prompt.
-
#prompt_key ⇒ String
PromptKey.
-
#response ⇒ Object
Response.
-
#updated_at ⇒ String
UpdatedAt.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Prompt
constructor
Initialize a new Prompt.
-
#to_hash ⇒ Hash
(also: #to_h)
Convert to hash.
Constructor Details
#initialize(data = {}) ⇒ Prompt
Initialize a new Prompt
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_id ⇒ Float
Returns companyId.
12 13 14 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 12 def company_id @company_id end |
#context ⇒ String
Returns context.
15 16 17 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 15 def context @context end |
#created_at ⇒ String
Returns createdAt.
18 19 20 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 18 def created_at @created_at end |
#data ⇒ Hash
Returns data.
21 22 23 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 21 def data @data end |
#feature ⇒ String
Returns feature.
24 25 26 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 24 def feature @feature end |
#hits ⇒ Float
Returns hits.
27 28 29 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 27 def hits @hits end |
#id ⇒ Float
Returns id.
30 31 32 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 30 def id @id end |
#model ⇒ String
Returns model.
33 34 35 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 33 def model @model end |
#prompt ⇒ String
Returns prompt.
36 37 38 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 36 def prompt @prompt end |
#prompt_key ⇒ String
Returns promptKey.
39 40 41 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 39 def prompt_key @prompt_key end |
#response ⇒ Object
Returns response.
42 43 44 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 42 def response @response end |
#updated_at ⇒ String
Returns updatedAt.
45 46 47 |
# File 'lib/thecompaniesapi/generated/models/prompt.rb', line 45 def updated_at @updated_at end |
Instance Method Details
#to_hash ⇒ Hash Also known as: to_h
Convert to hash
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 |