Skip to content

muna-ai/muna-js

Repository files navigation

Muna for JavaScript

Muna logo

Run AI models anywhere.

Caution

Never embed access keys client-side (i.e. in the browser). Instead, create a proxy URL in your backend.

Installing Muna

Muna is distributed on NPM. Open a terminal and run the following command:

# Run this in Terminal
$ npm install muna

Running a Model

First, create a Muna client, specifying your access key (create one here):

import { Muna } from "muna"

// 💥 Create an OpenAI client
const openai = new Muna({ accessKey: "<ACCESS KEY>" }).beta.openai;

Next, run a model:

// 🔥 Create a chat completion
const completion = openai.chat.completions.create({
  model: "@openai/gpt-oss-20b",
  messages: [
    { role: "user", content: "What is the capital of France?" }
  ],
  acceleration: "local_gpu"
});

Finally, use the results:

// 🚀 Use the results
console.log(completion.choices[0].message);

Useful Links

Muna is a product of NatML Inc.

About

Run AI models in the browser and Node.js. https://muna.ai/explore

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors