Package Exports
- @novaqore/ai
- @novaqore/ai/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@novaqore/ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NovaQore AI
@novaqore/ai
Private LLM client.
π Website |
πΊοΈ Roadmap |
π White Papers
Install
npm install @novaqore/ai// CommonJS
const NovaQoreAI = require("@novaqore/ai");
// ES Module
import NovaQoreAI from "@novaqore/ai";Quick Start
Streaming (default)
const { chat } = new NovaQoreAI();
const { stream } = await chat({
messages: [{ role: "user", content: "Hello" }],
});
for await (const chunk of stream) {
const content = chunk.choices[0]?.delta?.content;
if (content) process.stdout.write(content);
}One-shot (non-streaming)
const { result } = await chat({
messages: [{ role: "user", content: "Hello" }],
stream: false,
});
console.log(result.choices[0].message.content);Cancel a request
chat() returns an abort() function. Call it to tear down the request and its underlying connection at any time.
const { stream, abort } = await chat({
messages: [{ role: "user", content: "Count to 100." }],
});
// e.g. abort after 1s, or wire to a stop button
setTimeout(abort, 1000);
try {
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
} catch (err) {
if (err.name !== "AbortError") throw err;
}Tool use
const { stream } = await chat({
messages: [{ role: "user", content: "List the files in the current directory." }],
tools: [{
type: "function",
function: {
name: "bash",
description: "Run a bash command and return stdout",
parameters: {
type: "object",
properties: {
command: { type: "string", description: "Shell command to run" },
},
required: ["command"],
},
},
}],
});
let name = "";
let args = "";
for await (const chunk of stream) {
const call = chunk.choices[0]?.delta?.tool_calls?.[0];
if (call?.function?.name) name = call.function.name;
if (call?.function?.arguments) args += call.function.arguments;
}
console.log(name); // "bash"
console.log(args); // '{"command":"ls"}'Run local
NovaQore AI uses the standard /v1/chat/completions endpoint, so any compatible server works. llama.cpp is a common choice for self-hosting on your own GPU.
Start the server:
llama-server -m your-model.gguf --port 8080Point the client at it:
const nq = new NovaQoreAI({ base_url: "http://localhost:8080" });Requests hit ${base_url}/v1/chat/completions. Streaming, tools, tool_choice, and one-shot all behave the same.
Options
Constructor: new NovaQoreAI(options?)
| Option | Type | Default | Description |
|---|---|---|---|
base_url |
string | https://api.novaqore.ai |
Override the API base URL |
chat(params)
| Param | Type | Default | Description |
|---|---|---|---|
messages |
array | (required) | Chat messages |
tools |
array | [] |
Tool definitions |
tool_choice |
string | object | "auto" |
"auto", "none", "required", or { type: "function", function: { name } } |
stream |
boolean | true |
Stream the response. When false, resolves to { result } instead of { stream } |
Roadmap
We are actively building the next generation of private AI infrastructure. Multi-model support, streaming improvements, and more.
Community
We are building this in the open. Join us.
Discord | X (Twitter) | TikTok | YouTube
Disclaimer
NovaQore AI is provided as-is. We do not store your conversations, log your prompts or responses, or use your data to train models. We do not keep copies of your requests.
We built NovaQore AI to give people and businesses a genuinely private way to use AI. That said, NovaQore AI is not a tool for illegal activity. We do not tolerate unlawful use of our service. While we cannot see your data, we will cooperate with law enforcement when presented with a valid legal order as required by law.
By using NovaQore AI, you agree to use it responsibly and in compliance with all applicable laws.
License
MIT
π¬ Start Chat: Private AI
Powered by NovaQore Tech