gpt4all 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73096360c4f9175928af641a06e4b137191afae53438bbbe9ef4b095463053e5
4
- data.tar.gz: e79c2ea669da611104cd7c1890e7b5ba1b0c0baa7dca90ca6fa149158ad1910a
3
+ metadata.gz: 677356f50a80a8d91eb4e0e2146ac4f005896ba1e1250ace66dd57e862444623
4
+ data.tar.gz: fdb9dcf280aa544f8b7e26c4a9da143ce2ea3bfae4a7a20f995db6258b921c31
5
5
  SHA512:
6
- metadata.gz: 923387d8c54178edb2a3538ea05ee591034458c1af9fb4534fa28219f6f6723a3f4418bcd2b9345157fbb3b4435a01c7832eb305f0378ca39964caf724bc0508
7
- data.tar.gz: dd98dbf6c1275c34f2e844bce810a0ae4f7bccecc0ab686a827da43627fe4f54dc2ccef2990c6945196561331589fb3fc576fdc36bf6cb98d7ae3b5f88091e76
6
+ metadata.gz: cf7831d84c641dad48a6c8e6db0889af99a16cea58064f33fe7a6cf2bc331504ab1293d3c8636cdeb84685fbab7183d91bdb06c5b9ed1b7c681aa251e77dd4c3
7
+ data.tar.gz: 27e532c867292cd131fa061d611497540984ab3ba69c633327b51709b04db33b440a8d834c2694c9a2ed01a0b098ab990260f3edeab59ad46a46599b15223749
data/.rubocop.yml CHANGED
@@ -4,7 +4,6 @@ require:
4
4
 
5
5
  AllCops:
6
6
  NewCops: enable
7
- TargetRubyVersion: 3.2
8
7
  Exclude:
9
8
  - db/**/*.rb
10
9
  - bin/**/*.rb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gpt4all (0.0.2)
4
+ gpt4all (0.0.3)
5
5
  faraday (~> 2.7)
6
6
  os (~> 1.1)
7
7
  tty-progressbar (~> 0.18.2)
@@ -104,7 +104,12 @@ GEM
104
104
  rexml
105
105
 
106
106
  PLATFORMS
107
+ aarch64-linux
108
+ aarch64-linux-musl
109
+ arm64-darwin-21
107
110
  arm64-darwin-22
111
+ x86_64-linux
112
+ x86_64-linux-musl
108
113
 
109
114
  DEPENDENCIES
110
115
  brakeman
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/gpt4all.svg)](https://badge.fury.io/rb/gpt4all)
4
4
  [![CI](https://github.com/jaigouk/gpt4all/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/jaigouk/gpt4all/actions/workflows/main.yml)
5
5
 
6
- Gpt4all is a Ruby gem that provides an easy-to-use interface for interacting with the GPT-4 conversational AI model.
6
+ Gpt4all is a Ruby gem that provides an easy-to-use interface for interacting with the [GPT4ALL](https://github.com/nomic-ai/gpt4all-ts) conversational AI model.
7
7
 
8
8
  ## Installation
9
9
 
data/gpt4all.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = 'interface to gpt4all'
13
13
  spec.homepage = 'https://github.com/jaigouk/gpt4all'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 3.2'
15
+ spec.required_ruby_version = '>= 2.7.0'
16
16
 
17
17
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
18
 
@@ -67,8 +67,8 @@ module Gpt4all
67
67
  end
68
68
 
69
69
  def download_executable
70
- upstream = determine_upstream_url
71
- download_file(upstream, executable_path)
70
+ FileUtils.mkdir_p(File.dirname(executable_path))
71
+ download_file(determine_upstream_url, executable_path)
72
72
  FileUtils.chmod(0o755, executable_path)
73
73
  puts "File downloaded successfully to #{executable_path}"
74
74
  end
@@ -130,10 +130,13 @@ module Gpt4all
130
130
 
131
131
  def write_chunks_to_file(response, destination, progress_bar)
132
132
  File.open(destination, 'wb') do |file|
133
+ downloaded_size = 0
133
134
  response.body.each_chunk do |chunk|
134
135
  progress_bar.advance(chunk.bytesize)
135
136
  file.write(chunk)
137
+ downloaded_size += chunk.bytesize
136
138
  end
139
+ raise 'Incomplete file downloaded.' if downloaded_size < progress_bar.total
137
140
  end
138
141
  end
139
142
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gpt4all
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
data/model.bin ADDED
@@ -0,0 +1 @@
1
+ This is a mock file content
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpt4all
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaigouk Kim
@@ -71,6 +71,7 @@ files:
71
71
  - lib/gpt4all.rb
72
72
  - lib/gpt4all/conversational_ai.rb
73
73
  - lib/gpt4all/version.rb
74
+ - model.bin
74
75
  - sig/gpt4all.rbs
75
76
  homepage: https://github.com/jaigouk/gpt4all
76
77
  licenses:
@@ -89,14 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
- version: '3.2'
93
+ version: 2.7.0
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
96
  - - ">="
96
97
  - !ruby/object:Gem::Version
97
98
  version: '0'
98
99
  requirements: []
99
- rubygems_version: 3.4.10
100
+ rubygems_version: 3.2.33
100
101
  signing_key:
101
102
  specification_version: 4
102
103
  summary: gpt4all