Class: FuzzyAi::Account
Overview
Fuzzy.ai Account object
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #evaluate(agent_id, inputs) ⇒ Object
- #feedback(evaluation_id, performance) ⇒ Object
-
#initialize(key) ⇒ Account
constructor
A new instance of Account.
Constructor Details
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
11 12 13 |
# File 'lib/fuzzy.ai.rb', line 11 def key @key end |
Instance Method Details
#evaluate(agent_id, inputs) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/fuzzy.ai.rb', line 22 def evaluate(agent_id, inputs) body = inputs.to_json headers = @headers.merge('Content-Length' => body.length.to_s) = { headers: headers, body: body } response = self.class.post("/agent/#{agent_id}", ) id = response.headers['X-Evaluation-ID'] [response, id] end |
#feedback(evaluation_id, performance) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/fuzzy.ai.rb', line 32 def feedback(evaluation_id, performance) body = performance.to_json headers = @headers.merge('Content-Length' => body.length.to_s) = { headers: headers, body: body } self.class.post("/evaluation/#{evaluation_id}/feedback", ) end |