ruby_llm_community 1.1.1 → 1.3.0
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 +25 -7
- data/lib/generators/ruby_llm/chat_ui/chat_ui_generator.rb +127 -67
- data/lib/generators/ruby_llm/chat_ui/templates/controllers/chats_controller.rb.tt +12 -12
- data/lib/generators/ruby_llm/chat_ui/templates/controllers/messages_controller.rb.tt +7 -7
- data/lib/generators/ruby_llm/chat_ui/templates/controllers/models_controller.rb.tt +4 -4
- data/lib/generators/ruby_llm/chat_ui/templates/jobs/chat_response_job.rb.tt +6 -6
- data/lib/generators/ruby_llm/chat_ui/templates/views/chats/_chat.html.erb.tt +4 -4
- data/lib/generators/ruby_llm/chat_ui/templates/views/chats/_form.html.erb.tt +5 -5
- data/lib/generators/ruby_llm/chat_ui/templates/views/chats/index.html.erb.tt +5 -5
- data/lib/generators/ruby_llm/chat_ui/templates/views/chats/new.html.erb.tt +4 -4
- data/lib/generators/ruby_llm/chat_ui/templates/views/chats/show.html.erb.tt +8 -8
- 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/_form.html.erb.tt +5 -5
- data/lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt +9 -6
- data/lib/generators/ruby_llm/chat_ui/templates/views/messages/_tool_calls.html.erb.tt +7 -0
- data/lib/generators/ruby_llm/chat_ui/templates/views/messages/create.turbo_stream.erb.tt +5 -5
- data/lib/generators/ruby_llm/chat_ui/templates/views/models/_model.html.erb.tt +9 -9
- data/lib/generators/ruby_llm/chat_ui/templates/views/models/index.html.erb.tt +4 -6
- data/lib/generators/ruby_llm/chat_ui/templates/views/models/show.html.erb.tt +11 -11
- data/lib/generators/ruby_llm/generator_helpers.rb +131 -87
- data/lib/generators/ruby_llm/install/install_generator.rb +75 -73
- data/lib/generators/ruby_llm/install/templates/add_references_to_chats_tool_calls_and_messages_migration.rb.tt +9 -0
- data/lib/generators/ruby_llm/install/templates/create_chats_migration.rb.tt +0 -1
- data/lib/generators/ruby_llm/install/templates/create_messages_migration.rb.tt +3 -3
- data/lib/generators/ruby_llm/install/templates/create_tool_calls_migration.rb.tt +0 -1
- data/lib/generators/ruby_llm/install/templates/initializer.rb.tt +1 -1
- data/lib/generators/ruby_llm/upgrade_to_v1_7/upgrade_to_v1_7_generator.rb +88 -85
- data/lib/generators/ruby_llm/upgrade_to_v1_9/templates/add_v1_9_message_columns.rb.tt +15 -0
- data/lib/generators/ruby_llm/upgrade_to_v1_9/upgrade_to_v1_9_generator.rb +49 -0
- data/lib/ruby_llm/active_record/acts_as.rb +17 -8
- data/lib/ruby_llm/active_record/chat_methods.rb +41 -13
- data/lib/ruby_llm/active_record/message_methods.rb +11 -2
- data/lib/ruby_llm/active_record/model_methods.rb +1 -1
- data/lib/ruby_llm/aliases.json +46 -20
- data/lib/ruby_llm/attachment.rb +8 -0
- data/lib/ruby_llm/chat.rb +13 -2
- data/lib/ruby_llm/configuration.rb +10 -1
- data/lib/ruby_llm/connection.rb +4 -4
- data/lib/ruby_llm/content.rb +23 -0
- data/lib/ruby_llm/message.rb +17 -9
- data/lib/ruby_llm/model/info.rb +4 -0
- data/lib/ruby_llm/models.json +12050 -9940
- data/lib/ruby_llm/models.rb +21 -25
- data/lib/ruby_llm/moderation.rb +56 -0
- data/lib/ruby_llm/provider.rb +29 -1
- data/lib/ruby_llm/providers/anthropic/chat.rb +18 -5
- data/lib/ruby_llm/providers/anthropic/content.rb +44 -0
- data/lib/ruby_llm/providers/anthropic/media.rb +5 -4
- data/lib/ruby_llm/providers/anthropic/models.rb +9 -2
- data/lib/ruby_llm/providers/anthropic/tools.rb +20 -18
- data/lib/ruby_llm/providers/bedrock/media.rb +2 -1
- data/lib/ruby_llm/providers/bedrock/streaming/content_extraction.rb +9 -2
- data/lib/ruby_llm/providers/gemini/chat.rb +353 -72
- data/lib/ruby_llm/providers/gemini/media.rb +59 -1
- data/lib/ruby_llm/providers/gemini/tools.rb +146 -25
- data/lib/ruby_llm/providers/gemini/transcription.rb +116 -0
- data/lib/ruby_llm/providers/gemini.rb +2 -1
- data/lib/ruby_llm/providers/gpustack/media.rb +1 -0
- data/lib/ruby_llm/providers/ollama/media.rb +1 -0
- data/lib/ruby_llm/providers/openai/capabilities.rb +15 -7
- data/lib/ruby_llm/providers/openai/chat.rb +7 -3
- data/lib/ruby_llm/providers/openai/media.rb +2 -1
- data/lib/ruby_llm/providers/openai/moderation.rb +34 -0
- data/lib/ruby_llm/providers/openai/streaming.rb +7 -3
- data/lib/ruby_llm/providers/openai/tools.rb +34 -12
- data/lib/ruby_llm/providers/openai/transcription.rb +70 -0
- data/lib/ruby_llm/providers/openai_base.rb +2 -0
- data/lib/ruby_llm/providers/red_candle/capabilities.rb +124 -0
- data/lib/ruby_llm/providers/red_candle/chat.rb +317 -0
- data/lib/ruby_llm/providers/red_candle/models.rb +121 -0
- data/lib/ruby_llm/providers/red_candle/streaming.rb +40 -0
- data/lib/ruby_llm/providers/red_candle.rb +90 -0
- data/lib/ruby_llm/providers/vertexai/transcription.rb +16 -0
- data/lib/ruby_llm/providers/vertexai.rb +3 -0
- data/lib/ruby_llm/railtie.rb +1 -1
- data/lib/ruby_llm/stream_accumulator.rb +8 -12
- data/lib/ruby_llm/tool.rb +126 -0
- data/lib/ruby_llm/transcription.rb +35 -0
- data/lib/ruby_llm/utils.rb +46 -0
- data/lib/ruby_llm/version.rb +1 -1
- data/lib/ruby_llm_community.rb +38 -1
- metadata +35 -3
|
@@ -8,6 +8,7 @@ module RubyLLM
|
|
|
8
8
|
include VertexAI::Streaming
|
|
9
9
|
include VertexAI::Embeddings
|
|
10
10
|
include VertexAI::Models
|
|
11
|
+
include VertexAI::Transcription
|
|
11
12
|
|
|
12
13
|
def initialize(config)
|
|
13
14
|
super
|
|
@@ -37,6 +38,8 @@ module RubyLLM
|
|
|
37
38
|
|
|
38
39
|
initialize_authorizer unless @authorizer
|
|
39
40
|
@authorizer.fetch_access_token!['access_token']
|
|
41
|
+
rescue Google::Auth::AuthorizationError => e
|
|
42
|
+
raise UnauthorizedError.new(nil, "Invalid Google Cloud credentials for Vertex AI: #{e.message}")
|
|
40
43
|
end
|
|
41
44
|
|
|
42
45
|
def initialize_authorizer
|
data/lib/ruby_llm/railtie.rb
CHANGED
|
@@ -8,10 +8,10 @@ module RubyLLM
|
|
|
8
8
|
def initialize
|
|
9
9
|
@content = nil
|
|
10
10
|
@tool_calls = {}
|
|
11
|
-
@input_tokens =
|
|
12
|
-
@output_tokens =
|
|
13
|
-
@cached_tokens =
|
|
14
|
-
@cache_creation_tokens =
|
|
11
|
+
@input_tokens = nil
|
|
12
|
+
@output_tokens = nil
|
|
13
|
+
@cached_tokens = nil
|
|
14
|
+
@cache_creation_tokens = nil
|
|
15
15
|
@latest_tool_call_id = nil
|
|
16
16
|
@reasoning_id = nil
|
|
17
17
|
end
|
|
@@ -40,10 +40,10 @@ module RubyLLM
|
|
|
40
40
|
content: content,
|
|
41
41
|
model_id: model_id,
|
|
42
42
|
tool_calls: tool_calls_from_stream,
|
|
43
|
-
input_tokens:
|
|
44
|
-
output_tokens:
|
|
45
|
-
cached_tokens:
|
|
46
|
-
cache_creation_tokens:
|
|
43
|
+
input_tokens: @input_tokens,
|
|
44
|
+
output_tokens: @output_tokens,
|
|
45
|
+
cached_tokens: @cached_tokens,
|
|
46
|
+
cache_creation_tokens: @cache_creation_tokens,
|
|
47
47
|
raw: response
|
|
48
48
|
)
|
|
49
49
|
end
|
|
@@ -58,10 +58,6 @@ module RubyLLM
|
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
def positive_or_nil(value)
|
|
62
|
-
value.positive? ? value : nil
|
|
63
|
-
end
|
|
64
|
-
|
|
65
61
|
def accumulate_content(new_content)
|
|
66
62
|
return unless new_content
|
|
67
63
|
|
data/lib/ruby_llm/tool.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'ruby_llm/schema'
|
|
4
|
+
|
|
3
5
|
module RubyLLM
|
|
4
6
|
# Parameter definition for Tool methods.
|
|
5
7
|
class Parameter
|
|
@@ -29,6 +31,8 @@ module RubyLLM
|
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
class << self
|
|
34
|
+
attr_reader :params_schema_definition
|
|
35
|
+
|
|
32
36
|
def description(text = nil)
|
|
33
37
|
return @description unless text
|
|
34
38
|
|
|
@@ -42,6 +46,20 @@ module RubyLLM
|
|
|
42
46
|
def parameters
|
|
43
47
|
@parameters ||= {}
|
|
44
48
|
end
|
|
49
|
+
|
|
50
|
+
def params(schema = nil, &block)
|
|
51
|
+
@params_schema_definition = SchemaDefinition.new(schema:, block:)
|
|
52
|
+
self
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def with_params(**params)
|
|
56
|
+
@provider_params = params
|
|
57
|
+
self
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def provider_params
|
|
61
|
+
@provider_params ||= {}
|
|
62
|
+
end
|
|
45
63
|
end
|
|
46
64
|
|
|
47
65
|
def name
|
|
@@ -63,6 +81,23 @@ module RubyLLM
|
|
|
63
81
|
self.class.parameters
|
|
64
82
|
end
|
|
65
83
|
|
|
84
|
+
def provider_params
|
|
85
|
+
self.class.provider_params
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def params_schema
|
|
89
|
+
return @params_schema if defined?(@params_schema)
|
|
90
|
+
|
|
91
|
+
@params_schema = begin
|
|
92
|
+
definition = self.class.params_schema_definition
|
|
93
|
+
if definition&.present?
|
|
94
|
+
definition.json_schema
|
|
95
|
+
elsif parameters.any?
|
|
96
|
+
SchemaDefinition.from_parameters(parameters)&.json_schema
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
66
101
|
def call(args)
|
|
67
102
|
RubyLLM.logger.debug "Tool #{name} called with: #{args.inspect}"
|
|
68
103
|
result = execute(**args.transform_keys(&:to_sym))
|
|
@@ -79,5 +114,96 @@ module RubyLLM
|
|
|
79
114
|
def halt(message)
|
|
80
115
|
Halt.new(message)
|
|
81
116
|
end
|
|
117
|
+
|
|
118
|
+
# Wraps schema handling for tool parameters, supporting JSON Schema hashes,
|
|
119
|
+
# RubyLLM::Schema instances/classes, and DSL blocks.
|
|
120
|
+
class SchemaDefinition
|
|
121
|
+
def self.from_parameters(parameters)
|
|
122
|
+
return nil if parameters.nil? || parameters.empty?
|
|
123
|
+
|
|
124
|
+
properties = parameters.to_h do |name, param|
|
|
125
|
+
schema = {
|
|
126
|
+
type: map_type(param.type),
|
|
127
|
+
description: param.description
|
|
128
|
+
}.compact
|
|
129
|
+
|
|
130
|
+
schema[:items] = default_items_schema if schema[:type] == 'array'
|
|
131
|
+
|
|
132
|
+
[name.to_s, schema]
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
required = parameters.select { |_, param| param.required }.keys.map(&:to_s)
|
|
136
|
+
|
|
137
|
+
json_schema = {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: properties,
|
|
140
|
+
required: required,
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
strict: true
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
new(schema: json_schema)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def self.map_type(type)
|
|
149
|
+
case type.to_s
|
|
150
|
+
when 'integer', 'int' then 'integer'
|
|
151
|
+
when 'number', 'float', 'double' then 'number'
|
|
152
|
+
when 'boolean' then 'boolean'
|
|
153
|
+
when 'array' then 'array'
|
|
154
|
+
when 'object' then 'object'
|
|
155
|
+
else
|
|
156
|
+
'string'
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def self.default_items_schema
|
|
161
|
+
{ type: 'string' }
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def initialize(schema: nil, block: nil)
|
|
165
|
+
@schema = schema
|
|
166
|
+
@block = block
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def present?
|
|
170
|
+
@schema || @block
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def json_schema
|
|
174
|
+
@json_schema ||= RubyLLM::Utils.deep_stringify_keys(resolve_schema)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
private
|
|
178
|
+
|
|
179
|
+
def resolve_schema
|
|
180
|
+
return resolve_direct_schema(@schema) if @schema
|
|
181
|
+
return build_from_block(&@block) if @block
|
|
182
|
+
|
|
183
|
+
nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def resolve_direct_schema(schema)
|
|
187
|
+
return extract_schema(schema.to_json_schema) if schema.respond_to?(:to_json_schema)
|
|
188
|
+
return RubyLLM::Utils.deep_dup(schema) if schema.is_a?(Hash)
|
|
189
|
+
if schema.is_a?(Class) && schema.instance_methods.include?(:to_json_schema)
|
|
190
|
+
return extract_schema(schema.new.to_json_schema)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
def build_from_block(&)
|
|
197
|
+
schema_class = RubyLLM::Schema.create(&)
|
|
198
|
+
extract_schema(schema_class.new.to_json_schema)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def extract_schema(schema_hash)
|
|
202
|
+
return nil unless schema_hash.is_a?(Hash)
|
|
203
|
+
|
|
204
|
+
schema = schema_hash[:schema] || schema_hash['schema'] || schema_hash
|
|
205
|
+
RubyLLM::Utils.deep_dup(schema)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
82
208
|
end
|
|
83
209
|
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyLLM
|
|
4
|
+
# Represents a transcription of audio content.
|
|
5
|
+
class Transcription
|
|
6
|
+
attr_reader :text, :model, :language, :duration, :segments, :input_tokens, :output_tokens
|
|
7
|
+
|
|
8
|
+
def initialize(text:, model:, **attributes)
|
|
9
|
+
@text = text
|
|
10
|
+
@model = model
|
|
11
|
+
@language = attributes[:language]
|
|
12
|
+
@duration = attributes[:duration]
|
|
13
|
+
@segments = attributes[:segments]
|
|
14
|
+
@input_tokens = attributes[:input_tokens]
|
|
15
|
+
@output_tokens = attributes[:output_tokens]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def self.transcribe(audio_file, **kwargs)
|
|
19
|
+
model = kwargs.delete(:model)
|
|
20
|
+
language = kwargs.delete(:language)
|
|
21
|
+
provider = kwargs.delete(:provider)
|
|
22
|
+
assume_model_exists = kwargs.delete(:assume_model_exists) { false }
|
|
23
|
+
context = kwargs.delete(:context)
|
|
24
|
+
options = kwargs
|
|
25
|
+
|
|
26
|
+
config = context&.config || RubyLLM.config
|
|
27
|
+
model ||= config.default_transcription_model
|
|
28
|
+
model, provider_instance = Models.resolve(model, provider: provider, assume_exists: assume_model_exists,
|
|
29
|
+
config: config)
|
|
30
|
+
model_id = model.id
|
|
31
|
+
|
|
32
|
+
provider_instance.transcribe(audio_file, model: model_id, language:, **options)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/lib/ruby_llm/utils.rb
CHANGED
|
@@ -41,5 +41,51 @@ module RubyLLM
|
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
def deep_dup(value)
|
|
46
|
+
case value
|
|
47
|
+
when Hash
|
|
48
|
+
value.each_with_object({}) do |(key, val), duped|
|
|
49
|
+
duped[deep_dup(key)] = deep_dup(val)
|
|
50
|
+
end
|
|
51
|
+
when Array
|
|
52
|
+
value.map { |item| deep_dup(item) }
|
|
53
|
+
else
|
|
54
|
+
begin
|
|
55
|
+
value.dup
|
|
56
|
+
rescue TypeError
|
|
57
|
+
value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def deep_stringify_keys(value)
|
|
63
|
+
case value
|
|
64
|
+
when Hash
|
|
65
|
+
value.each_with_object({}) do |(key, val), result|
|
|
66
|
+
result[key.to_s] = deep_stringify_keys(val)
|
|
67
|
+
end
|
|
68
|
+
when Array
|
|
69
|
+
value.map { |item| deep_stringify_keys(item) }
|
|
70
|
+
when Symbol
|
|
71
|
+
value.to_s
|
|
72
|
+
else
|
|
73
|
+
value
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def deep_symbolize_keys(value)
|
|
78
|
+
case value
|
|
79
|
+
when Hash
|
|
80
|
+
value.each_with_object({}) do |(key, val), result|
|
|
81
|
+
symbolized_key = key.respond_to?(:to_sym) ? key.to_sym : key
|
|
82
|
+
result[symbolized_key] = deep_symbolize_keys(val)
|
|
83
|
+
end
|
|
84
|
+
when Array
|
|
85
|
+
value.map { |item| deep_symbolize_keys(item) }
|
|
86
|
+
else
|
|
87
|
+
value
|
|
88
|
+
end
|
|
89
|
+
end
|
|
44
90
|
end
|
|
45
91
|
end
|
data/lib/ruby_llm/version.rb
CHANGED
data/lib/ruby_llm_community.rb
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
require 'base64'
|
|
4
4
|
require 'event_stream_parser'
|
|
5
5
|
require 'faraday'
|
|
6
|
-
require 'faraday/retry'
|
|
7
6
|
require 'faraday/multipart'
|
|
7
|
+
require 'faraday/retry'
|
|
8
8
|
|
|
9
9
|
require 'json'
|
|
10
10
|
require 'logger'
|
|
11
|
+
require 'marcel'
|
|
11
12
|
require 'securerandom'
|
|
12
13
|
require 'zeitwerk'
|
|
13
14
|
|
|
@@ -58,10 +59,18 @@ module RubyLLM
|
|
|
58
59
|
Embedding.embed(...)
|
|
59
60
|
end
|
|
60
61
|
|
|
62
|
+
def moderate(...)
|
|
63
|
+
Moderation.moderate(...)
|
|
64
|
+
end
|
|
65
|
+
|
|
61
66
|
def paint(...)
|
|
62
67
|
Image.paint(...)
|
|
63
68
|
end
|
|
64
69
|
|
|
70
|
+
def transcribe(...)
|
|
71
|
+
Transcription.transcribe(...)
|
|
72
|
+
end
|
|
73
|
+
|
|
65
74
|
def models
|
|
66
75
|
Models.instance
|
|
67
76
|
end
|
|
@@ -101,6 +110,34 @@ RubyLLM::Provider.register :perplexity, RubyLLM::Providers::Perplexity
|
|
|
101
110
|
RubyLLM::Provider.register :vertexai, RubyLLM::Providers::VertexAI
|
|
102
111
|
RubyLLM::Provider.register :xai, RubyLLM::Providers::XAI
|
|
103
112
|
|
|
113
|
+
# Optional Red Candle provider - only available if gem is installed
|
|
114
|
+
begin
|
|
115
|
+
require 'candle'
|
|
116
|
+
require 'ruby_llm/providers/red_candle'
|
|
117
|
+
RubyLLM::Provider.register :red_candle, RubyLLM::Providers::RedCandle
|
|
118
|
+
|
|
119
|
+
# Register Red Candle models with the global registry
|
|
120
|
+
RubyLLM::Providers::RedCandle.models.each do |model|
|
|
121
|
+
RubyLLM.models.instance_variable_get(:@models) << model
|
|
122
|
+
end
|
|
123
|
+
rescue LoadError
|
|
124
|
+
# Red Candle is optional - provider won't be available if gem isn't installed
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Optional Red Candle provider - only available if gem is installed
|
|
128
|
+
begin
|
|
129
|
+
require 'candle'
|
|
130
|
+
require 'ruby_llm/providers/red_candle'
|
|
131
|
+
RubyLLM::Provider.register :red_candle, RubyLLM::Providers::RedCandle
|
|
132
|
+
|
|
133
|
+
# Register Red Candle models with the global registry
|
|
134
|
+
RubyLLM::Providers::RedCandle.models.each do |model|
|
|
135
|
+
RubyLLM.models.instance_variable_get(:@models) << model
|
|
136
|
+
end
|
|
137
|
+
rescue LoadError
|
|
138
|
+
# Red Candle is optional - provider won't be available if gem isn't installed
|
|
139
|
+
end
|
|
140
|
+
|
|
104
141
|
if defined?(Rails::Railtie)
|
|
105
142
|
require 'ruby_llm/railtie'
|
|
106
143
|
require 'ruby_llm/active_record/acts_as'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_llm_community
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Shippy
|
|
@@ -107,6 +107,20 @@ dependencies:
|
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '1.0'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: ruby_llm-schema
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: 0.2.1
|
|
117
|
+
type: :runtime
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - "~>"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: 0.2.1
|
|
110
124
|
- !ruby/object:Gem::Dependency
|
|
111
125
|
name: zeitwerk
|
|
112
126
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -146,14 +160,17 @@ files:
|
|
|
146
160
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/index.html.erb.tt
|
|
147
161
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/new.html.erb.tt
|
|
148
162
|
- lib/generators/ruby_llm/chat_ui/templates/views/chats/show.html.erb.tt
|
|
163
|
+
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_content.html.erb.tt
|
|
149
164
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_form.html.erb.tt
|
|
150
165
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt
|
|
166
|
+
- lib/generators/ruby_llm/chat_ui/templates/views/messages/_tool_calls.html.erb.tt
|
|
151
167
|
- lib/generators/ruby_llm/chat_ui/templates/views/messages/create.turbo_stream.erb.tt
|
|
152
168
|
- lib/generators/ruby_llm/chat_ui/templates/views/models/_model.html.erb.tt
|
|
153
169
|
- lib/generators/ruby_llm/chat_ui/templates/views/models/index.html.erb.tt
|
|
154
170
|
- lib/generators/ruby_llm/chat_ui/templates/views/models/show.html.erb.tt
|
|
155
171
|
- lib/generators/ruby_llm/generator_helpers.rb
|
|
156
172
|
- lib/generators/ruby_llm/install/install_generator.rb
|
|
173
|
+
- lib/generators/ruby_llm/install/templates/add_references_to_chats_tool_calls_and_messages_migration.rb.tt
|
|
157
174
|
- lib/generators/ruby_llm/install/templates/chat_model.rb.tt
|
|
158
175
|
- lib/generators/ruby_llm/install/templates/create_chats_migration.rb.tt
|
|
159
176
|
- lib/generators/ruby_llm/install/templates/create_messages_migration.rb.tt
|
|
@@ -165,6 +182,8 @@ files:
|
|
|
165
182
|
- lib/generators/ruby_llm/install/templates/tool_call_model.rb.tt
|
|
166
183
|
- lib/generators/ruby_llm/upgrade_to_v1_7/templates/migration.rb.tt
|
|
167
184
|
- lib/generators/ruby_llm/upgrade_to_v1_7/upgrade_to_v1_7_generator.rb
|
|
185
|
+
- lib/generators/ruby_llm/upgrade_to_v1_9/templates/add_v1_9_message_columns.rb.tt
|
|
186
|
+
- lib/generators/ruby_llm/upgrade_to_v1_9/upgrade_to_v1_9_generator.rb
|
|
168
187
|
- lib/ruby_llm/active_record/acts_as.rb
|
|
169
188
|
- lib/ruby_llm/active_record/acts_as_legacy.rb
|
|
170
189
|
- lib/ruby_llm/active_record/chat_methods.rb
|
|
@@ -195,10 +214,12 @@ files:
|
|
|
195
214
|
- lib/ruby_llm/models.json
|
|
196
215
|
- lib/ruby_llm/models.rb
|
|
197
216
|
- lib/ruby_llm/models_schema.json
|
|
217
|
+
- lib/ruby_llm/moderation.rb
|
|
198
218
|
- lib/ruby_llm/provider.rb
|
|
199
219
|
- lib/ruby_llm/providers/anthropic.rb
|
|
200
220
|
- lib/ruby_llm/providers/anthropic/capabilities.rb
|
|
201
221
|
- lib/ruby_llm/providers/anthropic/chat.rb
|
|
222
|
+
- lib/ruby_llm/providers/anthropic/content.rb
|
|
202
223
|
- lib/ruby_llm/providers/anthropic/embeddings.rb
|
|
203
224
|
- lib/ruby_llm/providers/anthropic/media.rb
|
|
204
225
|
- lib/ruby_llm/providers/anthropic/models.rb
|
|
@@ -228,6 +249,7 @@ files:
|
|
|
228
249
|
- lib/ruby_llm/providers/gemini/models.rb
|
|
229
250
|
- lib/ruby_llm/providers/gemini/streaming.rb
|
|
230
251
|
- lib/ruby_llm/providers/gemini/tools.rb
|
|
252
|
+
- lib/ruby_llm/providers/gemini/transcription.rb
|
|
231
253
|
- lib/ruby_llm/providers/gpustack.rb
|
|
232
254
|
- lib/ruby_llm/providers/gpustack/chat.rb
|
|
233
255
|
- lib/ruby_llm/providers/gpustack/media.rb
|
|
@@ -248,10 +270,12 @@ files:
|
|
|
248
270
|
- lib/ruby_llm/providers/openai/images.rb
|
|
249
271
|
- lib/ruby_llm/providers/openai/media.rb
|
|
250
272
|
- lib/ruby_llm/providers/openai/models.rb
|
|
273
|
+
- lib/ruby_llm/providers/openai/moderation.rb
|
|
251
274
|
- lib/ruby_llm/providers/openai/response.rb
|
|
252
275
|
- lib/ruby_llm/providers/openai/response_media.rb
|
|
253
276
|
- lib/ruby_llm/providers/openai/streaming.rb
|
|
254
277
|
- lib/ruby_llm/providers/openai/tools.rb
|
|
278
|
+
- lib/ruby_llm/providers/openai/transcription.rb
|
|
255
279
|
- lib/ruby_llm/providers/openai_base.rb
|
|
256
280
|
- lib/ruby_llm/providers/openrouter.rb
|
|
257
281
|
- lib/ruby_llm/providers/openrouter/models.rb
|
|
@@ -259,11 +283,17 @@ files:
|
|
|
259
283
|
- lib/ruby_llm/providers/perplexity/capabilities.rb
|
|
260
284
|
- lib/ruby_llm/providers/perplexity/chat.rb
|
|
261
285
|
- lib/ruby_llm/providers/perplexity/models.rb
|
|
286
|
+
- lib/ruby_llm/providers/red_candle.rb
|
|
287
|
+
- lib/ruby_llm/providers/red_candle/capabilities.rb
|
|
288
|
+
- lib/ruby_llm/providers/red_candle/chat.rb
|
|
289
|
+
- lib/ruby_llm/providers/red_candle/models.rb
|
|
290
|
+
- lib/ruby_llm/providers/red_candle/streaming.rb
|
|
262
291
|
- lib/ruby_llm/providers/vertexai.rb
|
|
263
292
|
- lib/ruby_llm/providers/vertexai/chat.rb
|
|
264
293
|
- lib/ruby_llm/providers/vertexai/embeddings.rb
|
|
265
294
|
- lib/ruby_llm/providers/vertexai/models.rb
|
|
266
295
|
- lib/ruby_llm/providers/vertexai/streaming.rb
|
|
296
|
+
- lib/ruby_llm/providers/vertexai/transcription.rb
|
|
267
297
|
- lib/ruby_llm/providers/xai.rb
|
|
268
298
|
- lib/ruby_llm/providers/xai/capabilities.rb
|
|
269
299
|
- lib/ruby_llm/providers/xai/chat.rb
|
|
@@ -273,6 +303,7 @@ files:
|
|
|
273
303
|
- lib/ruby_llm/streaming.rb
|
|
274
304
|
- lib/ruby_llm/tool.rb
|
|
275
305
|
- lib/ruby_llm/tool_call.rb
|
|
306
|
+
- lib/ruby_llm/transcription.rb
|
|
276
307
|
- lib/ruby_llm/utils.rb
|
|
277
308
|
- lib/ruby_llm/version.rb
|
|
278
309
|
- lib/ruby_llm_community.rb
|
|
@@ -290,10 +321,11 @@ metadata:
|
|
|
290
321
|
changelog_uri: https://github.com/tpaulshippy/ruby_llm_community/commits/main
|
|
291
322
|
documentation_uri: https://rubyllm.com
|
|
292
323
|
bug_tracker_uri: https://github.com/tpaulshippy/ruby_llm_community/issues
|
|
324
|
+
funding_uri: https://github.com/sponsors/crmne
|
|
293
325
|
rubygems_mfa_required: 'true'
|
|
294
326
|
post_install_message: |
|
|
295
|
-
Upgrading from RubyLLM <= 1.
|
|
296
|
-
--> https://rubyllm.com/upgrading
|
|
327
|
+
Upgrading from RubyLLM <= 1.8.x? Check the upgrade guide for new features and migration instructions
|
|
328
|
+
--> https://rubyllm.com/upgrading/
|
|
297
329
|
rdoc_options: []
|
|
298
330
|
require_paths:
|
|
299
331
|
- lib
|