Skip to content

txohyeah/aos-llama2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AOS-Llama2

WIP rebuild of the AOS-Sqlite code to run llama2.c.

AOS-SQLite combines the ao operating system module and sqlite to create an ao custom module to add a lightweight but powerful indexer to your aos experience.

The bulk of this effort was done by @elliotsayes during the Hack the Weave competition, Elliot was able to create this WASM Binary that includes both SQLite, LUA, and aos, as an ao Module.

AOS-SQLite Module - GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0

Run a SQLite Database with AOS

AOS_MODULE=GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0 aos my-sqlite

Spawn via a process

Spawn('GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0', {})

Examples

local sqlite3 = require("lsqlite3")
 
db = sqlite3.open_memory()
  
db:exec[[
  CREATE TABLE test (id INTEGER PRIMARY KEY, content);
  INSERT INTO test VALUES (NULL, 'Hello Lua');
  INSERT INTO test VALUES (NULL, 'Hello Sqlite3');
  INSERT INTO test VALUES (NULL, 'Hello ao!!!');
]]
return "ok"
local s = ""
 
for row in db:nrows("SELECT * FROM test") do
  s = s .. row.id .. ": " .. row.content .. "\\n"
end
 
return s

AO Resources


This project builds the AOS-SQLITE WASM Binary and Publishes it to Arweave.

Build Process

  1. Build docker image
cd container
./build.sh
  1. Get Latest aos module
git submodule init
git submodule update --remote
  1. Use docker image to compile process.wasm
cd aos/process
docker run -v .:/src p3rmaw3b/ao emcc-lua
  1. Publish Module with tags via arkb

You will need a funded wallet for this step

export WALLET=~/.wallet.json
npm run deploy

About

Llama.c + aos.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.6%
  • Lua 0.2%
  • Python 0.2%
  • Dockerfile 0.0%
  • Makefile 0.0%
  • JavaScript 0.0%