Class: Cryptohopper::Resources::AI

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptohopper/resources/ai.rb

Overview

‘client.ai` — AI credits + LLM analysis.

Instance Method Summary collapse

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_modelsObject



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_creditsObject

─── 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_optionsObject

─── LLM analysis ────────────────────────────────────────────────



45
46
47
# File 'lib/cryptohopper/resources/ai.rb', line 45

def llm_analyze_options
  @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