libra-ai-sdk 1.0.1 → 1.0.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/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +17 -1
- package/dist/index.mjs +17 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -55,6 +55,18 @@ declare class LibraAI {
|
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
chat(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Chat with Libra Pro model
|
|
60
|
+
* @param message Your message
|
|
61
|
+
* @param options Optional configuration
|
|
62
|
+
*/
|
|
63
|
+
chatPro(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Chat with Libra Ultra model
|
|
66
|
+
* @param message Your message
|
|
67
|
+
* @param options Optional configuration
|
|
68
|
+
*/
|
|
69
|
+
chatUltra(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
58
70
|
/**
|
|
59
71
|
* Simple chat - returns just the message string
|
|
60
72
|
* @param message Your message to Libra AI
|
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,18 @@ declare class LibraAI {
|
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
chat(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Chat with Libra Pro model
|
|
60
|
+
* @param message Your message
|
|
61
|
+
* @param options Optional configuration
|
|
62
|
+
*/
|
|
63
|
+
chatPro(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Chat with Libra Ultra model
|
|
66
|
+
* @param message Your message
|
|
67
|
+
* @param options Optional configuration
|
|
68
|
+
*/
|
|
69
|
+
chatUltra(message: string, options?: LibraChatOptions): Promise<LibraResponse>;
|
|
58
70
|
/**
|
|
59
71
|
* Simple chat - returns just the message string
|
|
60
72
|
* @param message Your message to Libra AI
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var LibraAI = class {
|
|
|
35
35
|
* const answer = await libra.ask('Hello!');
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
constructor(apiKey, baseUrl = "https://
|
|
38
|
+
constructor(apiKey, baseUrl = "https://www.libraai.site") {
|
|
39
39
|
if (!apiKey || !apiKey.startsWith("lak_")) {
|
|
40
40
|
throw new Error('Invalid API key. API key must start with "lak_"');
|
|
41
41
|
}
|
|
@@ -77,6 +77,22 @@ var LibraAI = class {
|
|
|
77
77
|
}
|
|
78
78
|
return data;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Chat with Libra Pro model
|
|
82
|
+
* @param message Your message
|
|
83
|
+
* @param options Optional configuration
|
|
84
|
+
*/
|
|
85
|
+
async chatPro(message, options = {}) {
|
|
86
|
+
return this.chat(message, { ...options, model: "LibraAI-Pro" });
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Chat with Libra Ultra model
|
|
90
|
+
* @param message Your message
|
|
91
|
+
* @param options Optional configuration
|
|
92
|
+
*/
|
|
93
|
+
async chatUltra(message, options = {}) {
|
|
94
|
+
return this.chat(message, { ...options, model: "LibraAI-Ultra" });
|
|
95
|
+
}
|
|
80
96
|
/**
|
|
81
97
|
* Simple chat - returns just the message string
|
|
82
98
|
* @param message Your message to Libra AI
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var LibraAI = class {
|
|
|
10
10
|
* const answer = await libra.ask('Hello!');
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
constructor(apiKey, baseUrl = "https://
|
|
13
|
+
constructor(apiKey, baseUrl = "https://www.libraai.site") {
|
|
14
14
|
if (!apiKey || !apiKey.startsWith("lak_")) {
|
|
15
15
|
throw new Error('Invalid API key. API key must start with "lak_"');
|
|
16
16
|
}
|
|
@@ -52,6 +52,22 @@ var LibraAI = class {
|
|
|
52
52
|
}
|
|
53
53
|
return data;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Chat with Libra Pro model
|
|
57
|
+
* @param message Your message
|
|
58
|
+
* @param options Optional configuration
|
|
59
|
+
*/
|
|
60
|
+
async chatPro(message, options = {}) {
|
|
61
|
+
return this.chat(message, { ...options, model: "LibraAI-Pro" });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Chat with Libra Ultra model
|
|
65
|
+
* @param message Your message
|
|
66
|
+
* @param options Optional configuration
|
|
67
|
+
*/
|
|
68
|
+
async chatUltra(message, options = {}) {
|
|
69
|
+
return this.chat(message, { ...options, model: "LibraAI-Ultra" });
|
|
70
|
+
}
|
|
55
71
|
/**
|
|
56
72
|
* Simple chat - returns just the message string
|
|
57
73
|
* @param message Your message to Libra AI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libra-ai-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Official Libra AI SDK for JavaScript and TypeScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=16.0.0"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|