"llama/ggml-cuda/opt-step-adamw.cuh" did not exist on "de982616f1dde636e46b2cef2edd971b54ef7691"
page.tsx 521 Bytes
Newer Older
Jeffrey Morgan's avatar
Jeffrey Morgan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Octokit } from '@octokit/rest'
import { redirect } from 'next/navigation'

const octokit = new Octokit()

export default async function Download() {
  const { data } = await octokit.repos.getLatestRelease({
    owner: 'jmorganca',
    repo: 'ollama',
  })

  // todo: get the correct asset for the current arch/os
  const asset = data.assets.find(a => a.name.toLowerCase().includes('darwin') && a.name.toLowerCase().includes('.zip'))

  if (asset) {
    redirect(asset.browser_download_url)
  }

  return null
}