Small self-contained pure-Go web server with Lua, Teal, Markdown, Ollama, HTTP/2, QUIC, Redis, SQLite and PostgreSQL support ++
BSD-3-CLAUSE License
Bot releases are visible (Hide)
pingcap/tidb
dependency so that Algernon still compiles for ARM 6 and ARM 7.oc:distance()
Lua method for finding the distance between two LLM prompts.embeddedDistance
Lua function take a 3rd argument: euclidean
, manhattan
, chebyshev
, hamming
or cosine
.-m
and -o
are specified..webp
images, if caching of images is enabled.Published by xyproto 4 months ago
base64EncodeFile
(base64-encode a given file), describeImage
(use Ollama and ie. the llava-llama3 model to describe a base64-encoded image) and embeddedDistance
(given two embeddings, try to find how similar they are).fasthttp
(ref #4, thanks for the feature request @iMaxopoly)sanhtml
function for sanitizing HTML.llava-llama3
model.base64
method to UploadedFile
objects.runtime.GOOS
and detect most features at compile time instead.atomic.Bool
variables instead of a mutex for keeping track of how traffic is being served.github.com/pkg/browser
for opening URLs in a browser.logrus
as "logrus" instead of as "log".strconv.FormatInt
instead of fmt.Sprintf
whenever possible.golint
.GOEXPERIMENT=loopvar
since it is no longer needed.Published by xyproto 8 months ago
.prompt
files that contains a content-type, a model name, a blank line and a prompt. See README.md
for more information.ClearCache()
.TUTORIAL.md
).alg2docker
script.Published by xyproto 11 months ago
algernon -m
.Published by xyproto about 1 year ago
servedir
Lua function check the given arguments.orsinium-labs/enum
package for an enum in logo_unix.go
.bmizerany/assert
.dkorunic/betteralign
utility to align struct fields.alg2docker
and benchmark scripts.GOEXPERIMENT=loopvar
feature.Published by xyproto about 1 year ago
-tags=trace
, for benchmarking.welcome.sh
script with regard to ulimit
and sysctl kern.maxfiles
detection.--help
output and the REPL help.Makefile
.Published by xyproto over 1 year ago
README.md
file (thanks Philipp Gillé / @philippgille)..alg
files) from memory if /dev/shm
is writeable, ref #132 (thanks Dialga / @Dialga).github.com/xyproto/env
to github.com/xyproto/env/v2
..json
files a tiny bit faster.Published by xyproto over 1 year ago
blackfriday
to gomarkdown/markdown
.markdown
function.Published by xyproto over 1 year ago
close()
function, ref #124 (thanks Malcolm Ke Win / @diyism).handler.lua
in parent directories, ref #95, #112 and #130 (thanks Giulio Lunati / @giuliolunati).os
and io
instead of the deprecated ioutil
package.any
instead of interface{}
.unix
build constraint.strings.ReplaceAll
and bytes.ReplaceAll
.simpleredis/v2
.math.Round
.ulimit
check to the welcome.sh
script that also works on macOS Ventura.gofumpt
, golint
and staticcheck
.betteralign
tool, to improve struct field alignment.Published by xyproto about 2 years ago
%2F
would appear in the URL instead of /
, ref #117.go fmt
, golint
, staticcheck
and to some extent fieldalignment
.Published by xyproto over 2 years ago
req.Context
since CloseNotifier
has been deprecated--help
outputserve2
function so that the registration form example worksPublished by xyproto about 3 years ago
pwd
, serverdir
and serverfile
ServerDir
function for the server configuration Lua scriptgo vet
, golint
and staticcheck
Published by xyproto almost 4 years ago
darwin
+arm64
. See #49 for more info.The *_nocgo.*
archives are built with CGO_ENABLED=0
and Go 1.16.
Published by xyproto almost 4 years ago
algernon --lua
instances not use the same temporary database..mk
, .ts
and .tsx
be served as text/plain;charset=utf-8
..frm
and .form
files written in SimpleForm..
together with --autorefresh
.staticcheck
utility.Published by xyproto over 4 years ago
mitchellh/colorstring
dependency.algernon_history.txt
as the REPL history filename on Windows.Published by xyproto over 4 years ago
gccgo
are resolved. Algernon now also supports gccgo
.TMPDIR
, for improved Termux support.--dir
is used together with a trailing slash.The Windows and OpenBSD releases does not compile anymore. I want to look into that at some point.
Published by xyproto almost 5 years ago
quic
package, since there were build issues with it (could not build with gccgo
and issue #41).simplebolt
with gccgo
, which is why Algernon can not be compiled with gccgo
in a way where simplebolt
works, yet. This is related to different behavior between go
and gccgo
and will be worked around in simplebolt
. See: https://github.com/golang/go/issues/36430
-a
or --autorefresh
) may now follow symlinks to diretories, to make the ./welcome.sh
script and example more user-friendly when live editing for instance samples/greetings/index.md
.Published by xyproto about 5 years ago
PQ
function, from Lua.-trimpath
.GET
or HTTPClient
.CookieSecret
and SetCookieSecret
can now be used to get and set the secure cookie secret from Lua, or it can be set with the --cookiesecret
flag.Published by xyproto over 5 years ago
serve2
function.help
function on the Lua prompt.IGNOREEOF
environment variable.Updated docker images can be found at https://hub.docker.com/r/xyproto/algernon
Published by xyproto over 5 years ago
vegeta
could make Algernon crash.boltdb
has a new home, TLS 1.3 has further improvements).