Class: Cryptohopper::Resources::AI
- Inherits:
-
Object
- Object
- Cryptohopper::Resources::AI
- Defined in:
- lib/cryptohopper/resources/ai.rb
Overview
‘client.ai` — AI credits + LLM analysis.
Instance Method Summary collapse
- #available_models ⇒ Object
- #buy_credits(data) ⇒ Object
- #credit_invoices(**params) ⇒ Object
- #credit_transactions(**params) ⇒ Object
- #get(id) ⇒ Object
-
#get_credits ⇒ Object
─── Credits ─────────────────────────────────────────────────────.
-
#initialize(client) ⇒ AI
constructor
A new instance of AI.
- #list(**params) ⇒ Object
- #llm_analyze(data) ⇒ Object
-
#llm_analyze_options ⇒ Object
─── LLM analysis ────────────────────────────────────────────────.
- #llm_analyze_results(**params) ⇒ Object
- #llm_results(**params) ⇒ Object
Constructor Details
#initialize(client) ⇒ AI
Returns a new instance of AI.
7 8 9 |
# File 'lib/cryptohopper/resources/ai.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#available_models ⇒ Object
19 20 21 |
# File 'lib/cryptohopper/resources/ai.rb', line 19 def available_models @client._request("GET", "/ai/availablemodels") end |
#buy_credits(data) ⇒ Object
39 40 41 |
# File 'lib/cryptohopper/resources/ai.rb', line 39 def buy_credits(data) @client._request("POST", "/ai/buyaicredits", body: data) end |
#credit_invoices(**params) ⇒ Object
29 30 31 32 |
# File 'lib/cryptohopper/resources/ai.rb', line 29 def credit_invoices(**params) @client._request("GET", "/ai/aicreditinvoices", params: params.empty? ? nil : params) end |
#credit_transactions(**params) ⇒ Object
34 35 36 37 |
# File 'lib/cryptohopper/resources/ai.rb', line 34 def credit_transactions(**params) @client._request("GET", "/ai/aicredittransactions", params: params.empty? ? nil : params) end |
#get(id) ⇒ Object
15 16 17 |
# File 'lib/cryptohopper/resources/ai.rb', line 15 def get(id) @client._request("GET", "/ai/get", params: { id: id }) end |
#get_credits ⇒ Object
─── Credits ─────────────────────────────────────────────────────
25 26 27 |
# File 'lib/cryptohopper/resources/ai.rb', line 25 def get_credits @client._request("GET", "/ai/getaicredits") end |
#list(**params) ⇒ Object
11 12 13 |
# File 'lib/cryptohopper/resources/ai.rb', line 11 def list(**params) @client._request("GET", "/ai/list", params: params.empty? ? nil : params) end |
#llm_analyze(data) ⇒ Object
49 50 51 |
# File 'lib/cryptohopper/resources/ai.rb', line 49 def llm_analyze(data) @client._request("POST", "/ai/doaillmanalyze", body: data) end |
#llm_analyze_options ⇒ Object
─── LLM analysis ────────────────────────────────────────────────
45 46 47 |
# File 'lib/cryptohopper/resources/ai.rb', line 45 def @client._request("GET", "/ai/aillmanalyzeoptions") end |
#llm_analyze_results(**params) ⇒ Object
53 54 55 56 |
# File 'lib/cryptohopper/resources/ai.rb', line 53 def llm_analyze_results(**params) @client._request("GET", "/ai/aillmanalyzeresults", params: params.empty? ? nil : params) end |
#llm_results(**params) ⇒ Object
58 59 60 61 |
# File 'lib/cryptohopper/resources/ai.rb', line 58 def llm_results(**params) @client._request("GET", "/ai/aillmresults", params: params.empty? ? nil : params) end |