feat: add ollama (LLM, like ChatGPT)

This commit is contained in:
Tod Hansmann
2023-10-28 17:05:12 -06:00
committed by AJ ONeal
parent 4dc9e2d699
commit ccc0ed17b9
4 changed files with 72 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
---
title: ollama
homepage: https://github.com/jmorganca/ollama
tagline: |
ollama is a golang LLM server built for ease of use.
---
To update or switch versions, run `webi ollama@stable` (or `@v0.1.5`, etc).
## Cheat Sheet
> `ollama` is an LLM serving platform written in golang. It makes LLMs built on
> Llama standards easy to run with an API.
To get started quickly with the open source LLM Mistral-7b as an example is two
commands.
`ollama serve`
Then in a separate terminal:
`ollama run mistral`
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env pwsh
Write-Host "Error: ollama doesn't have Windows support yet:"
Write-Host "See https://github.com/jmorganca/ollama/issues/403"
exit 1
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
set -e
set -u
__init_ollama() {
##############
# Install ollama #
##############
WEBI_SINGLE=true
pkg_get_current_version() {
# 'ollama --version' has output in this format:
# ollama version 0.1.3
# This trims it down to just the version number:
# 0.1.3
ollama --version 2> /dev/null | head -n 1 | sed 's:^ollama version ::'
}
}
__init_ollama
+22
View File
@@ -0,0 +1,22 @@
'use strict';
var github = require('../_common/github.js');
var owner = 'jmorganca';
var repo = 'ollama';
module.exports = function (request) {
return github(request, owner, repo).then(function (all) {
all.releases.forEach(function (rel) {
rel.version = String(rel.version).replace(/^v/, '');
});
return all;
});
};
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
all = require('../_webi/normalize.js')(all);
console.info(JSON.stringify(all));
//console.info(JSON.stringify(all, null, 2));
});
}