class RubyLLM::ActiveRecord::ProviderFile
RubyLLM’s record of the provider files each Active Storage blob was uploaded to, so a chat loaded in another process sends the file it already uploaded instead of uploading the blob again. Rows name the blob by its key, which Active Storage never hands out twice, so a row left by a deleted blob can never match a newer one.
RubyLLM::ActiveRecord::ProviderFile.where(blob_key: document.file.key).pluck(:provider, :file_id)
Its columns:
blob_key-
The key of the Active Storage blob.
provider-
The provider’s slug.
account-
A digest that identifies the provider account the file was uploaded to.
file_id-
The provider’s id for the uploaded file.
expires_at-
When the provider deletes the file, or
nil.
RubyLLM writes these rows. Read and query them, and add scopes, columns, or encryption of your own, but do not create or update them. Encrypt file_id deterministically, since RubyLLM queries it.