Skip to content

Commit

Permalink
Ollama
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Sep 7, 2024
1 parent 57166ce commit b99b848
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 0 deletions.
13 changes: 13 additions & 0 deletions automatic/ollama/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[![](https://img.shields.io/chocolatey/v/ollama?color=green&label=ollama)](https://chocolatey.org/packages/ollama) [![](https://img.shields.io/chocolatey/dt/ollama)](https://chocolatey.org/packages/ollama)

## Ollama Large Language Models

Get up and running with large language models locally with Ollama.

#### [choco://ollama](choco://ollama)
To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://chocolatey.org/packages/choco-protocol-support)

### Package-specific issue
If this package isn't up-to-date for some days, [Create an issue](https://github.com/tunisiano187/Chocolatey-packages/issues/new/choose)

Support the package maintainer and [![Patreon](https://cdn.jsdelivr.net/gh/tunisiano187/Chocolatey-packages@d15c4e19c709e7148588d4523ffc6dd3cd3c7e5e/icons/patreon.png)](https://www.patreon.com/bePatron?u=39585820)
36 changes: 36 additions & 0 deletions automatic/ollama/ollama.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>ollama</id>
<version>0.0.0</version>
<title>Ollama Large Language Models</title>
<authors>Jeffrey Morgan</authors>
<owners>Spencer Churchill</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/ollama/ollama/blob/main/LICENSE</licenseUrl>
<projectUrl>https://ollama.com/</projectUrl>
<iconUrl>https://ollama.com/public/ollama.png</iconUrl>
<description><![CDATA[## Ollama Large Language Models
Get up and running with large language models locally with Ollama.
#### [choco://ollama](choco://ollama)
To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://chocolatey.org/packages/choco-protocol-support)
### Package-specific issue
If this package isn't up-to-date for some days, [Create an issue](https://github.com/tunisiano187/Chocolatey-packages/issues/new/choose)
Support the package maintainer and [![Patreon](https://cdn.jsdelivr.net/gh/tunisiano187/Chocolatey-packages@d15c4e19c709e7148588d4523ffc6dd3cd3c7e5e/icons/patreon.png)](https://www.patreon.com/bePatron?u=39585820)
]]></description>
<summary>Effortlessly run large language models locally with Ollama.</summary>
<releaseNotes>https://github.com/ollama/ollama/releases/tag/v0.3.9</releaseNotes>
<tags>ollama llm models local</tags>
<projectSourceUrl>https://github.com/ollama/ollama</projectSourceUrl>
<packageSourceUrl>https://github.com/splch/ollama-chocolatey-package</packageSourceUrl>
<docsUrl>https://github.com/ollama/ollama/tree/main/docs</docsUrl>
<bugTrackerUrl>https://github.com/ollama/ollama/issues</bugTrackerUrl>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
16 changes: 16 additions & 0 deletions automatic/ollama/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ErrorActionPreference = 'Stop';
$url = 'https://github.com/ollama/ollama/releases/download/v0.3.9/OllamaSetup.exe'
$checksum = 'eecce97ef53eb577dbf3e2cbfae2055acae5ebfb20df22ce7285d9eed7adcce8'
$checksumType = 'sha256'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'EXE'
url = $url
checksum = $checksum
checksumType = $checksumType
silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
validExitCodes = @(0)
}

Install-ChocolateyPackage @packageArgs
37 changes: 37 additions & 0 deletions automatic/ollama/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$ErrorActionPreference = 'Stop'
import-module au

$releases = 'https://github.com/ollama/ollama/releases/latest'
$Owner = $releases.Split('/') | Select-Object -Last 1 -Skip 3
$repo = $releases.Split('/') | Select-Object -Last 1 -Skip 2

function global:au_SearchReplace {
@{
'tools/chocolateyInstall.ps1' = @{
"(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
"(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
"(^[$]checksumtype\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
}
}
}

function global:au_AfterUpdate($Package) {
Invoke-VirusTotalScan $Package
}

function global:au_GetLatest {
$tags = Get-GitHubRelease -OwnerName $Owner -RepositoryName $repo -Latest
$url32 = $tags.assets.browser_download_url | Where-Object {$_ -match ".exe$"}

Update-Metadata -key "releaseNotes" -value $tags.html_url
$version = $tags.tag_name.Replace('v','')
if($tags.prerelease -match "true") {
$date = $tags.published_at.ToString("yyyyMMdd")
$version = "$version-pre$($date)"
}

$Latest = @{ URL32 = $url32; Version = $version }
return $Latest
}

update -ChecksumFor 32
Binary file removed icons/airshipper.png
Binary file not shown.
Binary file removed icons/axcrypt.png
Binary file not shown.
Binary file added icons/ollama.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b99b848

Please sign in to comment.