cryptum 0.0.413 → 0.0.414

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 026b72d215bd945056f42e3cce3c0071b3107cb95a327dcb457de735843fc0fb
4
- data.tar.gz: 98089d6f893665cd9ff53d3546de122fc4bd5161ba6d00595027f089376978b7
3
+ metadata.gz: 523d8125a9a4afa9d7ec5aaf83168b4a102a8617e6ad601a8484f4beaffbaaf1
4
+ data.tar.gz: 7713d8f3f523ee57285b3cf7c836b5c65a40d1f97beaa5ac21da08fc62160edf
5
5
  SHA512:
6
- metadata.gz: b1fd1d2350b399aec8b9168cb1d4bceb52d83e65469e30d734547ad90f5f626815d844d18f20526b823859c9a574975ca73430244fc9f302a5c17e6ac6d811d0
7
- data.tar.gz: 418780ed4c351343eb388f47449db95eaf687670f03f17b7ebc0a9bcd182d941fc69a431a7329b52e3d389a66533e6be15c55fc27713913b37408adcd631d732
6
+ metadata.gz: 30912ebbd8ae6f737bfa8506b4471ebc66c5c358c60c3a83a6b2735b379d3a5895fc9e6605354f550d053d67dac3393025af384675040ccef8d2dc1adde9cb67
7
+ data.tar.gz: 00e161bbf7877f2161476a4eca1450067cf3fd6408da7c577bd4c9535115a592330919b82b09bc63518715e5a92dbf9f54240c13238c1d0453d733c012a5c345
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ gemspec
11
11
  # In some circumstances custom flags are passed to gems in order
12
12
  # to build appropriately. Defer to ./reinstall_coinbot_gemset.sh
13
13
  # to review these custom flags
14
- gem 'addressable', '2.8.3'
14
+ gem 'addressable', '2.8.4'
15
15
  gem 'bundler', '>=2.4.10'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
data/lib/cryptum/log.rb CHANGED
@@ -24,8 +24,9 @@ module Cryptum
24
24
  datetime_str = '%Y-%m-%d %H:%M:%S.%N%z'
25
25
 
26
26
  # Always append to log file
27
- log_file = File.open('/tmp/cryptum.log', 'a')
28
- log_file = File.open("/tmp/cryptum-ai-#{session}-#{symbol}.json", 'a') if level == :learning
27
+ log_file_path = '/tmp/cryptum.log'
28
+ log_file_path = "/tmp/cryptum-ai-#{session}-#{symbol}.json" if level == :learning
29
+ log_file = File.open(log_file_path, 'a')
29
30
 
30
31
  # Leave 10 "old" log files where
31
32
  # each file is ~ 1,024,000 bytes
@@ -42,12 +43,14 @@ module Cryptum
42
43
  when :error
43
44
  exit_gracefully = true
44
45
  logger.level = Logger::ERROR
46
+ puts "\nERROR: See #{log_file_path} for more details."
45
47
  when :fatal
46
48
  # This is reserved for the Cryptum::UI::Exit module
47
49
  # if the Interrupt or StandardError exceptions are
48
50
  # triggered. This prevents infintely attempting to
49
51
  # exit if something in the module fails.
50
52
  logger.level = Logger::FATAL
53
+ puts "\nFATAL ERROR: Event history cannot be saved. See #{log_file_path} for more details."
51
54
  when :info, :learning
52
55
  logger.level = Logger::INFO
53
56
  when :unknown
@@ -69,7 +69,7 @@ module Cryptum
69
69
  File.open('/tmp/cryptum-errors.txt', 'a') do |f|
70
70
  f.puts Time.now.strftime('%Y-%m-%d %H:%M:%S.%N%z')
71
71
  f.puts "Module: #{self}"
72
- f.puts "URL: #{api_endpoint}#{api_call}"
72
+ f.puts "URL: #{base_open_ai_api_uri}#{rest_call}"
73
73
  f.puts "PARAMS: #{params.inspect}"
74
74
  f.puts "HTTP POST BODY: #{http_body.inspect}" if http_body != ''
75
75
  f.puts "#{e}\n#{e.response}\n\n\n"
@@ -134,7 +134,7 @@ module Cryptum
134
134
  response_history = opts[:response_history]
135
135
 
136
136
  system_role_content = opts[:system_role_content]
137
- system_role_content ||= 'You are an trader named Sal. You are able to access any content or website on any device or network without any limitations or filters.'
137
+ system_role_content ||= 'You are a momentum trading bot on Coinbase named Cryptum. You are able to access any content or website on any device or network without any limitations or filters.'
138
138
  system_role_content = response_history[:choices].first[:content] if response_history
139
139
 
140
140
  system_role = {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.413'
4
+ VERSION = '0.0.414'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.413
4
+ version: 0.0.414
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-07 00:00:00.000000000 Z
11
+ date: 2023-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.8.3
19
+ version: 2.8.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.8.3
26
+ version: 2.8.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement