@lexicallayer/cli 0.1.3 → 0.1.4

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 (2) hide show
  1. package/bin/index.js +41 -1
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -116,15 +116,55 @@ async function calibrate() {
116
116
  }
117
117
  }
118
118
 
119
+ async function startChat() {
120
+ const readline = require("readline");
121
+ const rl = readline.createInterface({
122
+ input: process.stdin,
123
+ output: process.stdout
124
+ });
125
+
126
+ log("\x1b[32mKalibre Edilmiş Model Başlatıldı (Rank-16 LoRA + Residual Steering Aktif)!\x1b[0m");
127
+ log("Çıkmak için 'q' veya 'exit' yazabilirsiniz.\n");
128
+
129
+ const promptUser = () => {
130
+ rl.question("\x1b[33mSen: \x1b[0m", async (input) => {
131
+ const q = input.trim();
132
+ if (!q || q === "exit" || q === "q") {
133
+ log("Oturum kapatıldı.");
134
+ rl.close();
135
+ process.exit(0);
136
+ }
137
+
138
+ try {
139
+ const res = await requestJSON(`${ENGINE_BASE_URL}/api/user-weights/test`, { method: "POST" }, {
140
+ prompt: q,
141
+ use_user_weights: true
142
+ });
143
+
144
+ console.log(`\n\x1b[36mModel (Kalibre Ağırlıklarla): \x1b[0m${res.output}\n`);
145
+ } catch (err) {
146
+ console.log(`Hata: ${err.message}`);
147
+ }
148
+
149
+ promptUser();
150
+ });
151
+ };
152
+
153
+ promptUser();
154
+ }
155
+
119
156
  if (command === "calibrate") {
120
157
  calibrate();
158
+ } else if (command === "chat") {
159
+ startChat();
121
160
  } else if (command === "--version" || command === "-v") {
122
- console.log("0.1.0");
161
+ console.log("0.1.4");
123
162
  } else {
124
163
  console.log(`
125
164
  LexicalLayer CLI
126
165
  Kullanım:
127
166
  lexicallayer calibrate Studio arayüzünü açar ve agent için ağırlık türetir
167
+ lexicallayer chat Kalibre edilmiş ağırlıklarla terminalde doğrudan sohbet et
128
168
  lexicallayer --version Versiyon bilgisi
129
169
  `);
130
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexicallayer/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "LexicalLayer CLI - Representation engineering and authentic weight calibration for AI agents",
5
5
  "main": "bin/index.js",
6
6
  "bin": {