ruby_llm 0.1.0.pre33 → 0.1.0.pre34

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: e36a864dcd3852d03d467684aafcc811273f0f44dbd1925484440808c6c8895b
4
- data.tar.gz: 5ed1b436a1b91f7fac06ab76d43fd0c7dfee925cc1af280a10bb40e448dabf0b
3
+ metadata.gz: 77ec20e57439d352e965de0e435d0c43b3acd53de2d6035345f6ac6e716e7fef
4
+ data.tar.gz: 51d838bc1411303fd96c2f28d160ad99657f44846bd12ad2967ee329880e8922
5
5
  SHA512:
6
- metadata.gz: 6dd5a24c4a374a5fd291c7f47363dd282abcc850361464e67859f82ad88f51f49f0d4fda89299cf3871df838896acb111170a3615963c215a2aedb6b4154d0bd
7
- data.tar.gz: 07f0931ca91abe8c42b7ca52910f4ac31f34ec4e049a321a7a4d59808cd190813aab1534312bb279d609a94f2ee6fbb2164faa6330a82a80ff520697741a7088
6
+ metadata.gz: 9b0ca7a80113ed498125c9e23460879328926e6f3de1e6fe7e7a63453deb94fbdebbe7961d529e6cd50db7ad91776cb92ffeaed29f396aa523f931b12f835f7d
7
+ data.tar.gz: bcb30504074335dbdea39d171a3d810cfb14c7f5f9a3cc5b10e1a80970ce06f37775c7b1c5352a2e5fef0a14ea0d6603ae63197be6d2a866c7003b091036c842
@@ -37,9 +37,17 @@ jobs:
37
37
  DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
38
38
  run: bundle exec rspec
39
39
 
40
+ - name: Upload coverage to Codecov
41
+ uses: codecov/codecov-action@v5
42
+ env:
43
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
44
+ with:
45
+ files: ./coverage/coverage.xml
46
+ fail_ci_if_error: false
47
+
40
48
  publish:
41
49
  name: Build + Publish
42
- # needs: test
50
+ needs: test
43
51
  if: github.event_name == 'push' && github.ref == 'refs/heads/main'
44
52
  runs-on: ubuntu-latest
45
53
  permissions:
@@ -62,7 +70,15 @@ jobs:
62
70
  chmod 0600 $HOME/.gem/credentials
63
71
  printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
64
72
  gem build *.gemspec
65
- gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
73
+ output=$(gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem 2>&1) || {
74
+ echo "$output"
75
+ if echo "$output" | grep -q "already been pushed"; then
76
+ echo "Version already exists, skipping"
77
+ exit 0
78
+ else
79
+ exit 1
80
+ fi
81
+ }
66
82
  env:
67
83
  GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
68
84
  OWNER: ${{ github.repository_owner }}
@@ -74,6 +90,14 @@ jobs:
74
90
  chmod 0600 $HOME/.gem/credentials
75
91
  printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
76
92
  gem build *.gemspec
77
- gem push *.gem
93
+ output=$(gem push *.gem 2>&1) || {
94
+ echo "$output"
95
+ if echo "$output" | grep -q "Repushing of gem versions is not allowed"; then
96
+ echo "Version already exists, skipping"
97
+ exit 0
98
+ else
99
+ exit 1
100
+ fi
101
+ }
78
102
  env:
79
103
  GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.rspec_status CHANGED
@@ -1,38 +1,35 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------------------- | ------ | --------------- |
3
- ./spec/integration/chat_spec.rb[1:1:1:1] | passed | 0.5826 seconds |
4
- ./spec/integration/chat_spec.rb[1:1:1:2] | passed | 3.43 seconds |
5
- ./spec/integration/chat_spec.rb[1:1:2:1] | passed | 0.49383 seconds |
6
- ./spec/integration/chat_spec.rb[1:1:2:2] | passed | 1.36 seconds |
7
- ./spec/integration/chat_spec.rb[1:1:3:1] | passed | 0.74049 seconds |
8
- ./spec/integration/chat_spec.rb[1:1:3:2] | passed | 4.11 seconds |
9
- ./spec/integration/content_spec.rb[1:1:1] | passed | 3.87 seconds |
10
- ./spec/integration/content_spec.rb[1:1:2] | passed | 1.23 seconds |
11
- ./spec/integration/content_spec.rb[1:1:3] | passed | 2.07 seconds |
12
- ./spec/integration/content_spec.rb[1:2:1] | passed | 2.05 seconds |
13
- ./spec/integration/content_spec.rb[1:2:2] | passed | 2.88 seconds |
14
- ./spec/integration/embeddings_spec.rb[1:1:1:1] | passed | 0.30185 seconds |
15
- ./spec/integration/embeddings_spec.rb[1:1:1:2] | passed | 0.30812 seconds |
16
- ./spec/integration/embeddings_spec.rb[1:1:2:1] | passed | 13.05 seconds |
17
- ./spec/integration/embeddings_spec.rb[1:1:2:2] | passed | 0.78135 seconds |
18
- ./spec/integration/error_handling_spec.rb[1:1] | passed | 0.21297 seconds |
19
- ./spec/integration/image_generation_spec.rb[1:1:1] | passed | 12.44 seconds |
20
- ./spec/integration/image_generation_spec.rb[1:1:2] | passed | 17.66 seconds |
21
- ./spec/integration/image_generation_spec.rb[1:1:3] | passed | 0.00324 seconds |
22
- ./spec/integration/image_generation_spec.rb[1:1:4] | failed | 0.15682 seconds |
23
- ./spec/integration/image_generation_spec.rb[1:1:5] | passed | 18.69 seconds |
24
- ./spec/integration/image_generation_spec.rb[1:1:6] | passed | 0.00032 seconds |
25
- ./spec/integration/rails_spec.rb[1:1] | passed | 4.05 seconds |
26
- ./spec/integration/rails_spec.rb[1:2] | passed | 1.82 seconds |
27
- ./spec/integration/streaming_spec.rb[1:1:1:1] | passed | 0.58445 seconds |
28
- ./spec/integration/streaming_spec.rb[1:1:1:2] | passed | 6.04 seconds |
29
- ./spec/integration/streaming_spec.rb[1:1:2:1] | passed | 0.47171 seconds |
30
- ./spec/integration/streaming_spec.rb[1:1:2:2] | passed | 2.39 seconds |
31
- ./spec/integration/streaming_spec.rb[1:1:3:1] | passed | 0.72016 seconds |
32
- ./spec/integration/streaming_spec.rb[1:1:3:2] | passed | 3.59 seconds |
33
- ./spec/integration/tools_spec.rb[1:1:1:1] | passed | 3.1 seconds |
34
- ./spec/integration/tools_spec.rb[1:1:1:2] | passed | 7.04 seconds |
35
- ./spec/integration/tools_spec.rb[1:1:2:1] | passed | 1.42 seconds |
36
- ./spec/integration/tools_spec.rb[1:1:2:2] | passed | 2.24 seconds |
37
- ./spec/integration/tools_spec.rb[1:1:3:1] | passed | 2.16 seconds |
38
- ./spec/integration/tools_spec.rb[1:1:3:2] | passed | 5.26 seconds |
3
+ ./spec/integration/chat_spec.rb[1:1:1:1] | passed | 0.84333 seconds |
4
+ ./spec/integration/chat_spec.rb[1:1:1:2] | passed | 3.81 seconds |
5
+ ./spec/integration/chat_spec.rb[1:1:2:1] | passed | 0.54605 seconds |
6
+ ./spec/integration/chat_spec.rb[1:1:2:2] | passed | 1.25 seconds |
7
+ ./spec/integration/chat_spec.rb[1:1:3:1] | passed | 0.66439 seconds |
8
+ ./spec/integration/chat_spec.rb[1:1:3:2] | passed | 2.84 seconds |
9
+ ./spec/integration/content_spec.rb[1:1:1] | passed | 3.51 seconds |
10
+ ./spec/integration/content_spec.rb[1:1:2] | passed | 1.11 seconds |
11
+ ./spec/integration/content_spec.rb[1:1:3] | passed | 1.77 seconds |
12
+ ./spec/integration/content_spec.rb[1:2:1] | passed | 1.68 seconds |
13
+ ./spec/integration/content_spec.rb[1:2:2] | passed | 2.01 seconds |
14
+ ./spec/integration/embeddings_spec.rb[1:1:1:1] | passed | 0.28694 seconds |
15
+ ./spec/integration/embeddings_spec.rb[1:1:1:2] | passed | 0.32456 seconds |
16
+ ./spec/integration/embeddings_spec.rb[1:1:2:1] | passed | 0.85006 seconds |
17
+ ./spec/integration/embeddings_spec.rb[1:1:2:2] | passed | 0.82832 seconds |
18
+ ./spec/integration/error_handling_spec.rb[1:1] | passed | 0.19746 seconds |
19
+ ./spec/integration/image_generation_spec.rb[1:1:1] | passed | 10.73 seconds |
20
+ ./spec/integration/image_generation_spec.rb[1:1:2] | passed | 16.95 seconds |
21
+ ./spec/integration/image_generation_spec.rb[1:1:3] | passed | 0.00024 seconds |
22
+ ./spec/integration/rails_spec.rb[1:1] | passed | 3.39 seconds |
23
+ ./spec/integration/rails_spec.rb[1:2] | passed | 1.74 seconds |
24
+ ./spec/integration/streaming_spec.rb[1:1:1:1] | passed | 0.56418 seconds |
25
+ ./spec/integration/streaming_spec.rb[1:1:1:2] | passed | 6.33 seconds |
26
+ ./spec/integration/streaming_spec.rb[1:1:2:1] | passed | 0.51911 seconds |
27
+ ./spec/integration/streaming_spec.rb[1:1:2:2] | passed | 2.31 seconds |
28
+ ./spec/integration/streaming_spec.rb[1:1:3:1] | passed | 0.78299 seconds |
29
+ ./spec/integration/streaming_spec.rb[1:1:3:2] | passed | 3.82 seconds |
30
+ ./spec/integration/tools_spec.rb[1:1:1:1] | passed | 3.89 seconds |
31
+ ./spec/integration/tools_spec.rb[1:1:1:2] | passed | 7.78 seconds |
32
+ ./spec/integration/tools_spec.rb[1:1:2:1] | passed | 1.25 seconds |
33
+ ./spec/integration/tools_spec.rb[1:1:2:2] | passed | 2.1 seconds |
34
+ ./spec/integration/tools_spec.rb[1:1:3:1] | passed | 1.59 seconds |
35
+ ./spec/integration/tools_spec.rb[1:1:3:2] | passed | 3.05 seconds |
data/README.md CHANGED
@@ -12,8 +12,13 @@ A delightful Ruby way to work with AI. Chat in text, analyze and generate images
12
12
  <img src="https://upload.wikimedia.org/wikipedia/commons/e/ec/DeepSeek_logo.svg" alt="DeepSeek" height="40" width="120">
13
13
  </p>
14
14
 
15
- [![Gem Version](https://badge.fury.io/rb/ruby_llm.svg)](https://badge.fury.io/rb/ruby_llm)
16
- [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
15
+ <p align="center">
16
+ <a href="https://badge.fury.io/rb/ruby_llm"><img src="https://badge.fury.io/rb/ruby_llm.svg" alt="Gem Version" /></a>
17
+ <a href="https://github.com/testdouble/standard"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="Ruby Style Guide" /></a>
18
+ <a href="https://rubygems.org/gems/ruby_llm"><img alt="Gem Total Downloads" src="https://img.shields.io/gem/dt/ruby_llm"></a>
19
+ <a href="https://github.com/crmne/ruby_llm/actions/workflows/cicd.yml"><img src="https://github.com/crmne/ruby_llm/actions/workflows/cicd.yml/badge.svg" alt="CI" /></a>
20
+ <a href="https://codecov.io/gh/crmne/ruby_llm"><img src="https://codecov.io/gh/crmne/ruby_llm/branch/main/graph/badge.svg" alt="codecov" /></a>
21
+ </p>
17
22
 
18
23
  ## Features
19
24
 
@@ -114,7 +119,7 @@ last_message = chat.messages.last
114
119
  puts "Conversation used #{last_message.input_tokens} input tokens and #{last_message.output_tokens} output tokens"
115
120
  ```
116
121
 
117
- You can provide content as local files or URLs - RubyLLM handles the rest. Vision and audio capabilities are available with compatible models (Claude 3, GPT-4V, Gemini Pro Vision). The API stays clean and consistent whether you're working with text, images, or audio.
122
+ You can provide content as local files or URLs - RubyLLM handles the rest. Vision and audio capabilities are available with compatible models. The API stays clean and consistent whether you're working with text, images, or audio.
118
123
 
119
124
  ## Image Generation
120
125
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyLLM
4
- VERSION = '0.1.0.pre33'
4
+ VERSION = '0.1.0.pre34'
5
5
  end
data/ruby_llm.gemspec CHANGED
@@ -45,6 +45,7 @@ Gem::Specification.new do |spec|
45
45
 
46
46
  # Development dependencies
47
47
  spec.add_development_dependency 'bundler', '>= 2.0'
48
+ spec.add_development_dependency 'codecov'
48
49
  spec.add_development_dependency 'dotenv'
49
50
  spec.add_development_dependency 'irb'
50
51
  spec.add_development_dependency 'nokogiri'
@@ -57,6 +58,7 @@ Gem::Specification.new do |spec|
57
58
  spec.add_development_dependency 'rubocop', '>= 1.0'
58
59
  spec.add_development_dependency 'rubocop-rake', '>= 0.6'
59
60
  spec.add_development_dependency 'simplecov', '>= 0.21'
61
+ spec.add_development_dependency 'simplecov-cobertura'
60
62
  spec.add_development_dependency 'sqlite3'
61
63
  spec.add_development_dependency 'webmock', '~> 3.18'
62
64
  spec.add_development_dependency 'yard', '>= 0.9'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre33
4
+ version: 0.1.0.pre34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carmine Paolino
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-20 00:00:00.000000000 Z
11
+ date: 2025-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser
@@ -140,6 +140,20 @@ dependencies:
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
142
  version: '2.0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: codecov
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
143
157
  - !ruby/object:Gem::Dependency
144
158
  name: dotenv
145
159
  requirement: !ruby/object:Gem::Requirement
@@ -308,6 +322,20 @@ dependencies:
308
322
  - - ">="
309
323
  - !ruby/object:Gem::Version
310
324
  version: '0.21'
325
+ - !ruby/object:Gem::Dependency
326
+ name: simplecov-cobertura
327
+ requirement: !ruby/object:Gem::Requirement
328
+ requirements:
329
+ - - ">="
330
+ - !ruby/object:Gem::Version
331
+ version: '0'
332
+ type: :development
333
+ prerelease: false
334
+ version_requirements: !ruby/object:Gem::Requirement
335
+ requirements:
336
+ - - ">="
337
+ - !ruby/object:Gem::Version
338
+ version: '0'
311
339
  - !ruby/object:Gem::Dependency
312
340
  name: sqlite3
313
341
  requirement: !ruby/object:Gem::Requirement
@@ -395,7 +423,7 @@ files:
395
423
  - lib/ruby_llm/providers/anthropic/streaming.rb
396
424
  - lib/ruby_llm/providers/anthropic/tools.rb
397
425
  - lib/ruby_llm/providers/deepseek.rb
398
- - lib/ruby_llm/providers/deepseek/capabilites.rb
426
+ - lib/ruby_llm/providers/deepseek/capabilities.rb
399
427
  - lib/ruby_llm/providers/gemini.rb
400
428
  - lib/ruby_llm/providers/gemini/capabilities.rb
401
429
  - lib/ruby_llm/providers/gemini/models.rb