@novaqore/ai 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +8 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  <a href="https://www.npmjs.com/package/@novaqore/ai"><img src="https://img.shields.io/npm/v/@novaqore/ai?color=blue&label=npm" alt="npm version" /></a>
11
11
  <a href="https://github.com/novaqore/ai/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license" /></a>
12
12
  <a href="https://img.shields.io/node/v/@novaqore/ai"><img src="https://img.shields.io/node/v/@novaqore/ai?color=brightgreen" alt="node version" /></a>
13
- <a href="https://discord.gg/novaqore"><img src="https://img.shields.io/discord/1234567890?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" /></a>
13
+ <a href="https://discord.gg/JAzgcf6r"><img src="https://img.shields.io/discord/1234567890?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" /></a>
14
14
  <br><br>
15
15
  <a href="https://novaqore.ai/developer"><strong>🔑 Get Your Quantum Keys</strong></a> &nbsp;|&nbsp;
16
16
  <a href="https://novaqore.ai"><strong>🌐 Website</strong></a> &nbsp;|&nbsp;
@@ -272,7 +272,7 @@ Technical deep dives into the cryptography, architecture, and threat models behi
272
272
  We are building this in the open. Join us.
273
273
 
274
274
  <p>
275
- <a href="https://discord.gg/novaqore"><strong>Discord</strong></a> &nbsp;|&nbsp;
275
+ <a href="https://discord.gg/JAzgcf6r"><strong>Discord</strong></a> &nbsp;|&nbsp;
276
276
  <a href="https://x.com/novaqore"><strong>X (Twitter)</strong></a> &nbsp;|&nbsp;
277
277
  <a href="https://tiktok.com/@novaqore"><strong>TikTok</strong></a> &nbsp;|&nbsp;
278
278
  <a href="https://youtube.com/@novaqore"><strong>YouTube</strong></a>
package/index.js CHANGED
@@ -10,6 +10,7 @@ class NovaQoreAI {
10
10
  #uid;
11
11
  #quantumKey;
12
12
  #keyId;
13
+ #bearerToken;
13
14
 
14
15
  constructor(config) {
15
16
  if (config === undefined) {
@@ -45,6 +46,7 @@ class NovaQoreAI {
45
46
  this.#uid = config.uid;
46
47
  this.#quantumKey = config.quantumKey;
47
48
  this.#keyId = config.keyId;
49
+ this.#bearerToken = config.bearerToken || null;
48
50
  this.version = version;
49
51
  this.description = "NovaQore AI - Quantum-encrypted LLM client by NovaQore";
50
52
  this.methods = ["chat", "health"];
@@ -97,9 +99,14 @@ class NovaQoreAI {
97
99
 
98
100
  const { ciphertext, encrypted, sharedSecret } = await this.#encryptPayload(payload);
99
101
 
102
+ const headers = { "Content-Type": "application/json" };
103
+ if (this.#bearerToken) {
104
+ headers["Authorization"] = `Bearer ${this.#bearerToken}`;
105
+ }
106
+
100
107
  const res = await fetch(`${BASE_URL}/v1/chat/completions`, {
101
108
  method: "POST",
102
- headers: { "Content-Type": "application/json" },
109
+ headers,
103
110
  body: JSON.stringify({
104
111
  uid: this.#uid,
105
112
  keyId: this.#keyId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novaqore/ai",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "The world's first private, quantum-encrypted LLM clients. CRYSTALS-Kyber + AES-256-GCM end-to-end encryption. Zero dependencies.",
5
5
  "main": "index.js",
6
6
  "files": [