boxcars 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -2
- data/Gemfile.lock +37 -37
- data/boxcars.gemspec +44 -0
- data/lib/boxcars/boxcar/engine_boxcar.rb +1 -1
- data/lib/boxcars/boxcar/sql.rb +1 -1
- data/lib/boxcars/boxcar.rb +1 -0
- data/lib/boxcars/conductor/conductor_executer.rb +1 -0
- data/lib/boxcars/version.rb +1 -1
- data/lib/boxcars.rb +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ffc107602f3a2ae47bdb5b5410f6abc8c2ea2c3a13f350630e4d3ece92768f7
|
4
|
+
data.tar.gz: d4fcc08768de5f512a15bf0ca929d50b2a7296937c27c0f1b390189bf0956782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b89e78ce7fec471c8c4f03d32a37bdffd5d1371ac474d14f7e1c90e653ccce62b30a95a845c5c1c1013f5a028c00bb3c87c35cc1394add0554bb33e232b6de63
|
7
|
+
data.tar.gz: 9007dcd0b5dfc8d3b886579cd563b085c04c471ffc3bb167f5d80adb74f85ceacdd5d40942f1772bd59ce4da5903deec2262420e28eba430394d0f831d6cd751
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
boxcars (0.1.
|
4
|
+
boxcars (0.1.1)
|
5
5
|
google_search_results (~> 2.2)
|
6
|
-
ruby-openai (~>
|
6
|
+
ruby-openai (~> 3.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -24,74 +24,74 @@ GEM
|
|
24
24
|
concurrent-ruby (1.2.0)
|
25
25
|
crack (0.4.5)
|
26
26
|
rexml
|
27
|
-
debug (1.7.
|
27
|
+
debug (1.7.1)
|
28
28
|
irb (>= 1.5.0)
|
29
29
|
reline (>= 0.3.1)
|
30
30
|
diff-lcs (1.5.0)
|
31
31
|
dotenv (2.8.1)
|
32
32
|
google_search_results (2.2.0)
|
33
33
|
hashdiff (1.0.1)
|
34
|
-
httparty (0.
|
35
|
-
|
34
|
+
httparty (0.21.0)
|
35
|
+
mini_mime (>= 1.0.0)
|
36
36
|
multi_xml (>= 0.5.2)
|
37
37
|
i18n (1.12.0)
|
38
38
|
concurrent-ruby (~> 1.0)
|
39
|
-
io-console (0.
|
40
|
-
irb (1.
|
39
|
+
io-console (0.6.0)
|
40
|
+
irb (1.6.2)
|
41
41
|
reline (>= 0.3.0)
|
42
|
-
json (2.6.
|
43
|
-
|
44
|
-
mime-types-data (~> 3.2015)
|
45
|
-
mime-types-data (3.2022.0105)
|
42
|
+
json (2.6.3)
|
43
|
+
mini_mime (1.1.2)
|
46
44
|
minitest (5.17.0)
|
47
45
|
multi_xml (0.6.0)
|
48
46
|
parallel (1.22.1)
|
49
|
-
parser (3.2.
|
47
|
+
parser (3.2.1.0)
|
50
48
|
ast (~> 2.4.1)
|
51
|
-
public_suffix (5.0.
|
49
|
+
public_suffix (5.0.1)
|
52
50
|
rainbow (3.1.1)
|
53
51
|
rake (13.0.6)
|
54
|
-
regexp_parser (2.
|
55
|
-
reline (0.3.
|
52
|
+
regexp_parser (2.7.0)
|
53
|
+
reline (0.3.2)
|
56
54
|
io-console (~> 0.5)
|
57
55
|
rexml (3.2.5)
|
58
|
-
rspec (3.
|
59
|
-
rspec-core (~> 3.
|
60
|
-
rspec-expectations (~> 3.
|
61
|
-
rspec-mocks (~> 3.
|
62
|
-
rspec-core (3.
|
63
|
-
rspec-support (~> 3.
|
64
|
-
rspec-expectations (3.
|
56
|
+
rspec (3.12.0)
|
57
|
+
rspec-core (~> 3.12.0)
|
58
|
+
rspec-expectations (~> 3.12.0)
|
59
|
+
rspec-mocks (~> 3.12.0)
|
60
|
+
rspec-core (3.12.1)
|
61
|
+
rspec-support (~> 3.12.0)
|
62
|
+
rspec-expectations (3.12.2)
|
65
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
66
|
-
rspec-support (~> 3.
|
67
|
-
rspec-mocks (3.
|
64
|
+
rspec-support (~> 3.12.0)
|
65
|
+
rspec-mocks (3.12.3)
|
68
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-support (3.
|
71
|
-
rubocop (1.
|
67
|
+
rspec-support (~> 3.12.0)
|
68
|
+
rspec-support (3.12.0)
|
69
|
+
rubocop (1.45.1)
|
72
70
|
json (~> 2.3)
|
73
71
|
parallel (~> 1.10)
|
74
|
-
parser (>= 3.
|
72
|
+
parser (>= 3.2.0.0)
|
75
73
|
rainbow (>= 2.2.2, < 4.0)
|
76
74
|
regexp_parser (>= 1.8, < 3.0)
|
77
75
|
rexml (>= 3.2.5, < 4.0)
|
78
|
-
rubocop-ast (>= 1.
|
76
|
+
rubocop-ast (>= 1.24.1, < 2.0)
|
79
77
|
ruby-progressbar (~> 1.7)
|
80
|
-
unicode-display_width (>=
|
81
|
-
rubocop-ast (1.
|
82
|
-
parser (>= 3.
|
78
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
79
|
+
rubocop-ast (1.26.0)
|
80
|
+
parser (>= 3.2.1.0)
|
81
|
+
rubocop-capybara (2.17.1)
|
82
|
+
rubocop (~> 1.41)
|
83
83
|
rubocop-rake (0.6.0)
|
84
84
|
rubocop (~> 1.0)
|
85
|
-
rubocop-rspec (2.
|
85
|
+
rubocop-rspec (2.18.1)
|
86
86
|
rubocop (~> 1.33)
|
87
|
-
|
88
|
-
|
89
|
-
httparty (>= 0.18.1
|
87
|
+
rubocop-capybara (~> 2.17)
|
88
|
+
ruby-openai (3.3.0)
|
89
|
+
httparty (>= 0.18.1)
|
90
90
|
ruby-progressbar (1.11.0)
|
91
91
|
sqlite3 (1.6.0-x86_64-darwin)
|
92
92
|
tzinfo (2.0.6)
|
93
93
|
concurrent-ruby (~> 1.0)
|
94
|
-
unicode-display_width (2.
|
94
|
+
unicode-display_width (2.4.2)
|
95
95
|
vcr (6.1.0)
|
96
96
|
webmock (3.18.1)
|
97
97
|
addressable (>= 2.8.0)
|
data/boxcars.gemspec
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/boxcars/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "boxcars"
|
7
|
+
spec.version = Boxcars::VERSION
|
8
|
+
spec.authors = ["Francis Sullivan", "Tabrez Syed"]
|
9
|
+
spec.email = ["hi@boxcars.ai"]
|
10
|
+
|
11
|
+
spec.summary = "Boxcars provide an API to connect together Boxcars and then conduct them. Inspired by python langchain."
|
12
|
+
spec.description = "You simply give a number of boxcars to a conductor, and it does the magic."
|
13
|
+
spec.homepage = "https://github.com/BoxcarsAI/boxcars"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/BoxcarsAI/boxcars/blob/main/CHANGELOG.md"
|
20
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# dev / test dependencies
|
34
|
+
spec.add_development_dependency "debug", "~> 1.1"
|
35
|
+
spec.add_development_dependency "dotenv", "~> 2.8"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
37
|
+
|
38
|
+
# runtime dependencies
|
39
|
+
spec.add_dependency "google_search_results", "~> 2.2"
|
40
|
+
spec.add_dependency "ruby-openai", "~> 3.0"
|
41
|
+
|
42
|
+
# For more information and examples about making a new gem, checkout our
|
43
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
44
|
+
end
|
@@ -46,7 +46,7 @@ module Boxcars
|
|
46
46
|
prompts = []
|
47
47
|
input_list.each do |inputs|
|
48
48
|
new_prompt = prompt.format(**inputs)
|
49
|
-
|
49
|
+
puts "Prompt after formatting:\n#{new_prompt.colorize(:cyan)}"
|
50
50
|
prompts.push(new_prompt)
|
51
51
|
end
|
52
52
|
engine.generate(prompts: prompts, stop: stop)
|
data/lib/boxcars/boxcar/sql.rb
CHANGED
@@ -34,7 +34,7 @@ module Boxcars
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def call(inputs:)
|
37
|
-
t = predict(question: inputs[input_key], dialect: dialect, top_k: 5, table_info: schema, stop: ["
|
37
|
+
t = predict(question: inputs[input_key], dialect: dialect, top_k: 5, table_info: schema, stop: ["Answer:"]).strip
|
38
38
|
answer = get_answer(t)
|
39
39
|
puts answer.colorize(:magenta)
|
40
40
|
{ output_key => answer }
|
data/lib/boxcars/boxcar.rb
CHANGED
data/lib/boxcars/version.rb
CHANGED
data/lib/boxcars.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxcars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Sullivan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-02-
|
12
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: debug
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '3.0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '3.0'
|
84
84
|
description: You simply give a number of boxcars to a conductor, and it does the magic.
|
85
85
|
email:
|
86
86
|
- hi@boxcars.ai
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- Rakefile
|
100
100
|
- bin/console
|
101
101
|
- bin/setup
|
102
|
+
- boxcars.gemspec
|
102
103
|
- lib/boxcars.rb
|
103
104
|
- lib/boxcars/boxcar.rb
|
104
105
|
- lib/boxcars/boxcar/calculator.rb
|