@naturali/cli 0.178.1 → 0.179.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.
- package/dist/index.mjs +85 -13
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.179.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1755,14 +1755,38 @@ var Assistant = class {
|
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
1757
|
/**
|
|
1758
|
-
*
|
|
1758
|
+
* List your conversations
|
|
1759
1759
|
*
|
|
1760
|
-
*
|
|
1760
|
+
* Your conversations with the Assistant in the app, newest first. Each is a session of its own; a conversation on Discord or WhatsApp is not listed here.
|
|
1761
1761
|
*
|
|
1762
1762
|
*/
|
|
1763
|
-
static
|
|
1763
|
+
static listAssistantSessions(options) {
|
|
1764
1764
|
return (options?.client ?? client).get({
|
|
1765
|
-
url: "/v1/assistant/
|
|
1765
|
+
url: "/v1/assistant/sessions",
|
|
1766
|
+
...options
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Start a conversation
|
|
1771
|
+
*
|
|
1772
|
+
* Opens a new, empty conversation with the Assistant. It costs nothing until a message is sent, and it does not expire.
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
static createAssistantSession(options) {
|
|
1776
|
+
return (options?.client ?? client).post({
|
|
1777
|
+
url: "/v1/assistant/sessions",
|
|
1778
|
+
...options
|
|
1779
|
+
});
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Read a conversation
|
|
1783
|
+
*
|
|
1784
|
+
* The newest 100 messages of one conversation, oldest first.
|
|
1785
|
+
*
|
|
1786
|
+
*/
|
|
1787
|
+
static listAssistantSessionMessages(options) {
|
|
1788
|
+
return (options.client ?? client).get({
|
|
1789
|
+
url: "/v1/assistant/sessions/{session_id}/messages",
|
|
1766
1790
|
...options
|
|
1767
1791
|
});
|
|
1768
1792
|
}
|
|
@@ -1772,9 +1796,9 @@ var Assistant = class {
|
|
|
1772
1796
|
* Runs one turn as your account and answers with the messages it added: yours, then the Assistant's reply. The turn is paid from your credit and refused before it runs when the balance is below zero.
|
|
1773
1797
|
*
|
|
1774
1798
|
*/
|
|
1775
|
-
static
|
|
1799
|
+
static sendAssistantSessionMessage(options) {
|
|
1776
1800
|
return (options.client ?? client).post({
|
|
1777
|
-
url: "/v1/assistant/messages",
|
|
1801
|
+
url: "/v1/assistant/sessions/{session_id}/messages",
|
|
1778
1802
|
...options,
|
|
1779
1803
|
headers: {
|
|
1780
1804
|
"Content-Type": "application/json",
|
|
@@ -9451,29 +9475,77 @@ const routes = {
|
|
|
9451
9475
|
"in": "body"
|
|
9452
9476
|
}]
|
|
9453
9477
|
},
|
|
9454
|
-
"list-assistant-
|
|
9478
|
+
"list-assistant-sessions": {
|
|
9455
9479
|
serviceClass: "Assistant",
|
|
9456
|
-
operationId: "
|
|
9457
|
-
description: "
|
|
9480
|
+
operationId: "listAssistantSessions",
|
|
9481
|
+
description: "Your conversations with the Assistant in the app, newest first. Each is a session of its own; a conversation on Discord or WhatsApp is not listed here.",
|
|
9458
9482
|
moduleDocsUrl: "https://naturali.ai/docs/modules/assistant",
|
|
9459
9483
|
httpMethod: "get",
|
|
9460
9484
|
pathParams: [],
|
|
9485
|
+
queryParams: ["limit", "cursor"],
|
|
9486
|
+
headerParams: [],
|
|
9487
|
+
cookieParams: [],
|
|
9488
|
+
flags: [{
|
|
9489
|
+
"name": "limit",
|
|
9490
|
+
"description": "Maximum items per page — an integer from 1 to 100 (default 20).",
|
|
9491
|
+
"required": false,
|
|
9492
|
+
"type": "integer",
|
|
9493
|
+
"in": "query"
|
|
9494
|
+
}, {
|
|
9495
|
+
"name": "cursor",
|
|
9496
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
9497
|
+
"required": false,
|
|
9498
|
+
"type": "string",
|
|
9499
|
+
"in": "query"
|
|
9500
|
+
}]
|
|
9501
|
+
},
|
|
9502
|
+
"create-assistant-session": {
|
|
9503
|
+
serviceClass: "Assistant",
|
|
9504
|
+
operationId: "createAssistantSession",
|
|
9505
|
+
description: "Opens a new, empty conversation with the Assistant. It costs nothing until a message is sent, and it does not expire.",
|
|
9506
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/assistant",
|
|
9507
|
+
httpMethod: "post",
|
|
9508
|
+
pathParams: [],
|
|
9461
9509
|
queryParams: [],
|
|
9462
9510
|
headerParams: [],
|
|
9463
9511
|
cookieParams: [],
|
|
9464
9512
|
flags: []
|
|
9465
9513
|
},
|
|
9466
|
-
"
|
|
9514
|
+
"list-assistant-session-messages": {
|
|
9515
|
+
serviceClass: "Assistant",
|
|
9516
|
+
operationId: "listAssistantSessionMessages",
|
|
9517
|
+
description: "The newest 100 messages of one conversation, oldest first.",
|
|
9518
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/assistant",
|
|
9519
|
+
httpMethod: "get",
|
|
9520
|
+
pathParams: ["session_id"],
|
|
9521
|
+
queryParams: [],
|
|
9522
|
+
headerParams: [],
|
|
9523
|
+
cookieParams: [],
|
|
9524
|
+
flags: [{
|
|
9525
|
+
"name": "session_id",
|
|
9526
|
+
"description": "Assistant session ID, as listed.",
|
|
9527
|
+
"required": true,
|
|
9528
|
+
"type": "string",
|
|
9529
|
+
"in": "path"
|
|
9530
|
+
}]
|
|
9531
|
+
},
|
|
9532
|
+
"send-assistant-session-message": {
|
|
9467
9533
|
serviceClass: "Assistant",
|
|
9468
|
-
operationId: "
|
|
9534
|
+
operationId: "sendAssistantSessionMessage",
|
|
9469
9535
|
description: "Runs one turn as your account and answers with the messages it added: yours, then the Assistant's reply. The turn is paid from your credit and refused before it runs when the balance is below zero.",
|
|
9470
9536
|
moduleDocsUrl: "https://naturali.ai/docs/modules/assistant",
|
|
9471
9537
|
httpMethod: "post",
|
|
9472
|
-
pathParams: [],
|
|
9538
|
+
pathParams: ["session_id"],
|
|
9473
9539
|
queryParams: [],
|
|
9474
9540
|
headerParams: [],
|
|
9475
9541
|
cookieParams: [],
|
|
9476
9542
|
flags: [{
|
|
9543
|
+
"name": "session_id",
|
|
9544
|
+
"description": "Assistant session ID, as listed.",
|
|
9545
|
+
"required": true,
|
|
9546
|
+
"type": "string",
|
|
9547
|
+
"in": "path"
|
|
9548
|
+
}, {
|
|
9477
9549
|
"name": "text",
|
|
9478
9550
|
"description": "",
|
|
9479
9551
|
"required": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.179.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"yaml": "^2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@naturali/sdk": "0.
|
|
34
|
+
"@naturali/sdk": "0.179.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|