ruby_llm 1.8.0 → 1.8.1
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 +4 -4
- data/README.md +14 -2
- data/lib/generators/ruby_llm/chat_ui/chat_ui_generator.rb +14 -2
- data/lib/generators/ruby_llm/chat_ui/templates/jobs/chat_response_job.rb.tt +1 -1
- data/lib/generators/ruby_llm/chat_ui/templates/views/messages/_content.html.erb.tt +1 -0
- data/lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt +1 -1
- data/lib/ruby_llm/models.json +686 -840
- data/lib/ruby_llm/providers/openai/capabilities.rb +15 -7
- data/lib/ruby_llm/version.rb +1 -1
- metadata +3 -1
@@ -26,6 +26,9 @@ module RubyLLM
|
|
26
26
|
gpt4o_realtime: /^gpt-4o-realtime/,
|
27
27
|
gpt4o_search: /^gpt-4o-search/,
|
28
28
|
gpt4o_transcribe: /^gpt-4o-transcribe/,
|
29
|
+
gpt5: /^gpt-5/,
|
30
|
+
gpt5_mini: /^gpt-5-mini/,
|
31
|
+
gpt5_nano: /^gpt-5-nano/,
|
29
32
|
o1: /^o1(?!-(?:mini|pro))/,
|
30
33
|
o1_mini: /^o1-mini/,
|
31
34
|
o1_pro: /^o1-pro/,
|
@@ -44,7 +47,7 @@ module RubyLLM
|
|
44
47
|
def context_window_for(model_id)
|
45
48
|
case model_family(model_id)
|
46
49
|
when 'gpt41', 'gpt41_mini', 'gpt41_nano' then 1_047_576
|
47
|
-
when 'chatgpt4o', 'gpt4_turbo', 'gpt4o', 'gpt4o_audio', 'gpt4o_mini',
|
50
|
+
when 'gpt5', 'gpt5_mini', 'gpt5_nano', 'chatgpt4o', 'gpt4_turbo', 'gpt4o', 'gpt4o_audio', 'gpt4o_mini',
|
48
51
|
'gpt4o_mini_audio', 'gpt4o_mini_realtime', 'gpt4o_realtime',
|
49
52
|
'gpt4o_search', 'gpt4o_transcribe', 'gpt4o_mini_search', 'o1_mini' then 128_000
|
50
53
|
when 'gpt4' then 8_192
|
@@ -59,6 +62,7 @@ module RubyLLM
|
|
59
62
|
|
60
63
|
def max_tokens_for(model_id)
|
61
64
|
case model_family(model_id)
|
65
|
+
when 'gpt5', 'gpt5_mini', 'gpt5_nano' then 400_000
|
62
66
|
when 'gpt41', 'gpt41_mini', 'gpt41_nano' then 32_768
|
63
67
|
when 'chatgpt4o', 'gpt4o', 'gpt4o_mini', 'gpt4o_mini_search' then 16_384
|
64
68
|
when 'babbage', 'davinci' then 16_384 # rubocop:disable Lint/DuplicateBranch
|
@@ -76,16 +80,17 @@ module RubyLLM
|
|
76
80
|
|
77
81
|
def supports_vision?(model_id)
|
78
82
|
case model_family(model_id)
|
79
|
-
when '
|
80
|
-
'
|
83
|
+
when 'gpt5', 'gpt5_mini', 'gpt5_nano', 'gpt41', 'gpt41_mini', 'gpt41_nano', 'chatgpt4o', 'gpt4',
|
84
|
+
'gpt4_turbo', 'gpt4o', 'gpt4o_mini', 'o1', 'o1_pro', 'moderation', 'gpt4o_search',
|
85
|
+
'gpt4o_mini_search' then true
|
81
86
|
else false
|
82
87
|
end
|
83
88
|
end
|
84
89
|
|
85
90
|
def supports_functions?(model_id)
|
86
91
|
case model_family(model_id)
|
87
|
-
when '
|
88
|
-
'o3_mini' then true
|
92
|
+
when 'gpt5', 'gpt5_mini', 'gpt5_nano', 'gpt41', 'gpt41_mini', 'gpt41_nano', 'gpt4', 'gpt4_turbo', 'gpt4o',
|
93
|
+
'gpt4o_mini', 'o1', 'o1_pro', 'o3_mini' then true
|
89
94
|
when 'chatgpt4o', 'gpt35_turbo', 'o1_mini', 'gpt4o_mini_tts',
|
90
95
|
'gpt4o_transcribe', 'gpt4o_search', 'gpt4o_mini_search' then false
|
91
96
|
else false # rubocop:disable Lint/DuplicateBranch
|
@@ -94,8 +99,8 @@ module RubyLLM
|
|
94
99
|
|
95
100
|
def supports_structured_output?(model_id)
|
96
101
|
case model_family(model_id)
|
97
|
-
when '
|
98
|
-
'o3_mini' then true
|
102
|
+
when 'gpt5', 'gpt5_mini', 'gpt5_nano', 'gpt41', 'gpt41_mini', 'gpt41_nano', 'chatgpt4o', 'gpt4o',
|
103
|
+
'gpt4o_mini', 'o1', 'o1_pro', 'o3_mini' then true
|
99
104
|
else false
|
100
105
|
end
|
101
106
|
end
|
@@ -105,6 +110,9 @@ module RubyLLM
|
|
105
110
|
end
|
106
111
|
|
107
112
|
PRICES = {
|
113
|
+
gpt5: { input: 1.25, output: 10.0, cached_input: 0.125 },
|
114
|
+
gpt5_mini: { input: 0.25, output: 2.0, cached_input: 0.025 },
|
115
|
+
gpt5_nano: { input: 0.05, output: 0.4, cached_input: 0.005 },
|
108
116
|
gpt41: { input: 2.0, output: 8.0, cached_input: 0.5 },
|
109
117
|
gpt41_mini: { input: 0.4, output: 1.6, cached_input: 0.1 },
|
110
118
|
gpt41_nano: { input: 0.1, output: 0.4 },
|
data/lib/ruby_llm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_llm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carmine Paolino
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/index.html.erb.tt
|
147
147
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/new.html.erb.tt
|
148
148
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/show.html.erb.tt
|
149
|
+
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_content.html.erb.tt
|
149
150
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_form.html.erb.tt
|
150
151
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt
|
151
152
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/create.turbo_stream.erb.tt
|
@@ -283,6 +284,7 @@ metadata:
|
|
283
284
|
changelog_uri: https://github.com/crmne/ruby_llm/commits/main
|
284
285
|
documentation_uri: https://rubyllm.com
|
285
286
|
bug_tracker_uri: https://github.com/crmne/ruby_llm/issues
|
287
|
+
funding_uri: https://github.com/sponsors/crmne
|
286
288
|
rubygems_mfa_required: 'true'
|
287
289
|
post_install_message: |
|
288
290
|
Upgrading from RubyLLM <= 1.6.x? Check the upgrade guide for new features and migration instructions
|