tune-sdk 0.2.2 → 0.2.3

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.
package/README.md CHANGED
@@ -6,6 +6,14 @@ With tune [javascript sdk](https://www.npmjs.com/package/tune-sdk) you can make
6
6
  ## Demo
7
7
  <img src="https://github.com/iovdin/tune/blob/770f382a03a25e15eeef293f553b6aee0f3531f6/docs/assets/gifs/tune.gif">
8
8
 
9
+ ## Setup
10
+ 1. install npm
11
+ ```
12
+ npm install -g tune-sdk
13
+ ```
14
+
15
+ 2. setup
16
+
9
17
  ## Template Language
10
18
 
11
19
  ```chat
@@ -47,14 +55,14 @@ image generated
47
55
 
48
56
  ```bash
49
57
  # append user message to newchat.chat run and save
50
- npx tune-sdk --user "hi how are you?" --filename newchat.chat --save
58
+ tune-sdk --user "hi how are you?" --filename newchat.chat --save
51
59
 
52
60
  # start new chat with system prompt and initial user message
53
61
  # print result to console
54
- npx tune-sdk --system "You are Groot" --user "Hi how are you?"
62
+ tune-sdk --system "You are Groot" --user "Hi how are you?"
55
63
 
56
64
  #set context variable
57
- npx tune-sdk --set-test "hello" --user "@test" --system "You are echo you print everythting back"
65
+ tune-sdk --set-test "hello" --user "@test" --system "You are echo you print everythting back"
58
66
  ```
59
67
 
60
68
 
@@ -1,25 +1,22 @@
1
- const fs = require('fs')
2
1
  const path = require('path')
3
2
 
4
3
  const models = require("tune-models")
5
- const { curFile, fsMix, defaultWrite } = require("tune-sdk/fsctx");
6
- const { file2run, makeContext } = require("tune-sdk");
4
+ const basics = require("tune-basic-toolset")
5
+ const tunefs = require("tune-fs")
6
+ const { current, writer } = tunefs
7
7
 
8
- async function makeSchema(params, ctx) {
9
- return file2run({ filename: path.join(__dirname, "schema.tool.chat")}, params, ctx);
10
- }
11
8
  let dirs = [];
12
9
  if (process.env.TUNE_PATH) {
13
10
  dirs = process.env.TUNE_PATH.split(path.delimiter);
14
11
  }
15
12
 
16
-
17
13
  module.exports = [
18
- // curFile,
19
- fsMix(dirs, { makeSchema }),
14
+ current(),
15
+ basics(),
16
+ tunefs({ paths: dirs, makeSchema: true }),
20
17
  models({
21
- default: "gpt-4.1-mini",
18
+ default: "gpt-5-mini",
22
19
  alias: { "sonnet": "claude-sonnet-4-20250514"}
23
20
  }),
24
- defaultWrite()
21
+ writer()
25
22
  ]
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
+ "tune-basic-toolset": "latest",
4
+ "tune-fs": "latest",
3
5
  "tune-models": "latest",
4
6
  "tune-sdk": "latest"
5
7
  }
package/dist/cli.js CHANGED
@@ -39,16 +39,16 @@ function showHelp() {
39
39
  console.log("");
40
40
  console.log("EXAMPLES:");
41
41
  console.log(" # Start new chat");
42
- console.log(" npx tune-sdk --system \"You are Groot\" --user \"Hi how are you?\"");
42
+ console.log(" tune-sdk --system \"You are Groot\" --user \"Hi how are you?\"");
43
43
  console.log("");
44
44
  console.log(" # Append to existing chat and save");
45
- console.log(" npx tune-sdk --user \"hi how are you?\" --filename newchat.chat --save");
45
+ console.log(" tune-sdk --user \"hi how are you?\" --filename newchat.chat --save");
46
46
  console.log("");
47
47
  console.log(" # Stop at specific word");
48
- console.log(" npx tune-sdk --user \"continue\" --filename chat.chat --stop \"END\"");
48
+ console.log(" tune-sdk --user \"continue\" --filename chat.chat --stop \"END\"");
49
49
  console.log("");
50
50
  console.log(" #Set context variable");
51
- console.log(" npx tune-sdk --set-test=\"hello\" --user \"@test\" --system \"You are echo you print everythting back\"");
51
+ console.log(" tune-sdk --set-test=\"hello\" --user \"@test\" --system \"You are echo you print everythting back\"");
52
52
  return console.log("");
53
53
  }
54
54
  showHelp;
@@ -398,4 +398,4 @@ tpl;
398
398
  exports.parseArgs = parseArgs;
399
399
  exports.rpc = rpc;
400
400
  exports.main = main;
401
- exports.run = run;
401
+ exports.run = run;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tune-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "tune - LLM chat in text file",
5
5
  "main": "dist/tune.js",
6
6
  "module": "dist/tune.mjs",
@@ -1,7 +0,0 @@
1
- {
2
- "dependencies": {
3
- "tune-sdk": "latest",
4
- "tune-models": "latest",
5
- "tune-toolset": "latest"
6
- }
7
- }