Types/OpenPackage/get_Modelfile.ps1

<#
.SYNOPSIS
    Gets any Modelfiles in a package
.DESCRIPTION
    Gets any Ollama model files within a package
.LINK
    https://docs.ollama.com/modelfile
#>

[OutputType([string])]
param()

$partPattern = '[/\.]Modelfile$'

foreach ($part in $this.GetParts()) {
    if ($part.Uri -match $partPattern) {
        $part.Read()
    }
}