Skip to content

Commit ff70044

Browse files
committed
Refactor content extraction in to_llm method and update version to 0.1.0.pre25
1 parent 21a018e commit ff70044

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/ruby_llm/active_record/acts_as.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module MessageMethods
139139
def to_llm
140140
RubyLLM::Message.new(
141141
role: role.to_sym,
142-
content: content,
142+
content: extract_content,
143143
tool_calls: extract_tool_calls,
144144
tool_call_id: extract_tool_call_id,
145145
input_tokens: input_tokens,
@@ -164,6 +164,10 @@ def extract_tool_calls
164164
def extract_tool_call_id
165165
parent_tool_call&.tool_call_id
166166
end
167+
168+
def extract_content
169+
content
170+
end
167171
end
168172
end
169173
end

lib/ruby_llm/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RubyLLM
4-
VERSION = '0.1.0.pre24'
4+
VERSION = '0.1.0.pre25'
55
end

0 commit comments

Comments
 (0)