class RubyLLM::ActiveRecord::ChatFile
A file in a persisted chat’s FileStore, in RubyLLM’s ruby_llm_chat_files table, with its content in Active Storage. It keeps the text a converter made of the file, so each version is converted once.
chat.ruby_llm_chat_files.pluck(:path) # => ["contract.pdf", "results/search-call_1.json"]
Rows with an owner are seen only through a store for that owner (see ChatFiles#with_file_store); rows without one are seen by every store of the chat.
Public Instance Methods
Source
# File lib/ruby_llm/active_record/chat_file.rb, line 31 def to_stored_file RubyLLM::StoredFile.new(path:, byte_size:, content_type:, digest:, updated_at:, owner: (owner if owner_id)) end
Returns the file as a RubyLLM::StoredFile.