-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ec5f249
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- Send me some wrapped arweave!! | ||
-- Go to aox.xyz to wrap your arweave tokens. Around 0.01 should be enough | ||
-- You should see: | ||
-- New Message From xU9...h10: Action = Credit-Notice | ||
|
||
-- Install APM | ||
-- aos> .load-blueprint apm | ||
|
||
-- Loading... apm | ||
-- 📦 Loaded APM Client | ||
|
||
-- Update APM | ||
-- aos> APM.update() | ||
|
||
-- 📤 Update request sent | ||
-- ℹ️ Attempting to load client 1.1.0 | ||
-- 📦 Loaded APM Client | ||
-- ✨ Client has been updated to 1.1.0 | ||
|
||
-- Install Llama-Herder | ||
-- aos> APM.install("@sam/Llama-Herder") | ||
|
||
-- 📤 Download request sent | ||
-- ℹ️ Attempting to load @sam/Llama-Herder@1.0.3 package | ||
-- 📦 Package has been loaded, you can now import it using require function | ||
-- 📦 Downloading package bKy3WSRCw5P0G4lOBtkwpChHSl8woPKh7FTUXvOCLrs | @sam/Llama-Herder@1.0.3 | ||
-- Assignment added to outbox. | ||
|
||
-- For details on how to use Llama-Herder, see: | ||
-- https://github.com/permaweb/llama-herder | ||
|
||
-- Load the Llama Herder library | ||
Llama = require("@sam/Llama-Herder") | ||
Llama.getPrices() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
OUTPUTS = OUTPUTS or {} | ||
|
||
-- Full inference arguments: | ||
Llama.run( | ||
"What is the meaning of life?", -- Your prompt | ||
20, -- Number of tokens to generate | ||
function(generated_text) -- Optional: A function to handle the response | ||
print(generated_text) | ||
table.insert(OUTPUTS, generated_text) | ||
end, | ||
{ | ||
Fee = 100, -- Optional: The total fee in Winston you would like to pay; OR | ||
Multiplier = 1.1 -- Optional: If not using an automatic or static fee, | ||
-- you can set the multiplier on the last accepted fee that you would like to pay | ||
} | ||
) | ||
|
||
-- Example inference message: | ||
-- https://www.ao.link/#/message/WRIWus6LVM35ENHTNzypc8RExEVbNycX3Ku3lVhnvZQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
local system = [[ | ||
<|system|> | ||
Only tell jokes about cats | ||
<|end|> | ||
<|user|> | ||
]] | ||
|
||
local rest = [[ | ||
<|end|> | ||
<|assistant|> | ||
]] | ||
|
||
local userContent = "Tell me a joke" | ||
|
||
local prompt = system .. userContent .. rest | ||
|
||
OUTPUTS = OUTPUTS or {} | ||
|
||
-- Full inference arguments: | ||
Llama.run( | ||
prompt, -- Your prompt | ||
20, -- Number of tokens to generate | ||
function(generated_text) -- Optional: A function to handle the response | ||
print(generated_text) | ||
table.insert(OUTPUTS, generated_text) | ||
end, | ||
{ | ||
Fee = 100, -- Optional: The total fee in Winston you would like to pay; OR | ||
Multiplier = 1.1 -- Optional: If not using an automatic or static fee, | ||
-- you can set the multiplier on the last accepted fee that you would like to pay | ||
} | ||
) | ||
|
||
-- Example inference message: | ||
-- https://www.ao.link/#/message/WRIWus6LVM35ENHTNzypc8RExEVbNycX3Ku3lVhnvZQ |