class RubyLLM::Content
def encode_file(source)
def encode_file(source) if source.start_with?('http') response = Faraday.get(source) Base64.strict_encode64(response.body) else Base64.strict_encode64(File.read(source)) end end
def encode_file(source) if source.start_with?('http') response = Faraday.get(source) Base64.strict_encode64(response.body) else Base64.strict_encode64(File.read(source)) end end