Tune is a handy extension for Visual Studio Code and plugin for Neovim that lets you chat with large language models (LLMs) in a text file. With tune javascript sdk you can make apps and agents.
How to connect LLMs or how to use tools
npm install tune-sdk
const tune = require("tune-sdk");
const sonnet = require("./sonnet.llm.js");
require('dotenv').config();
async function main() {
const ctx = tune.makeContext({
echo: "You are echo, you print everything back",
OPENROUTER_KEY: process.env.OPENROUTER_KEY,
"default": {
type: "llm",
exec: sonnet
}
})
const text = "s: @echo\nu: hello world";
const messages = await tune.text2run(text, ctx)
console.log(tune.msg2text(messages))
// a: hello world
}
main()
read more about javascript sdk
For any inquiries or support, feel free to open an issue on GitHub. Or drop a message to Tune Discord Channel