jsvelox 1.9.1 â 1.9.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 +21 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# jsvelox ðĶĪ
|
|
2
|
+
**Codename: Dodo** â v1.9.3
|
|
2
3
|
|
|
3
|
-
Lightweight JavaScript library for AI integration.
|
|
4
|
+
Lightweight JavaScript library for AI integration. Connect Claude, OpenAI and Gemini with just a few lines of code.
|
|
4
5
|
|
|
5
6
|
## Install
|
|
6
7
|
```bash
|
|
7
|
-
npm install
|
|
8
|
+
npm install jsvelox
|
|
8
9
|
```
|
|
9
10
|
|
|
10
11
|
## Usage
|
|
11
12
|
```js
|
|
12
|
-
import { VeloxAI } from '
|
|
13
|
+
import { VeloxAI } from 'jsvelox'
|
|
13
14
|
|
|
14
15
|
const ai = new VeloxAI({
|
|
15
|
-
provider: '
|
|
16
|
-
apiKey: 'your-api-key'
|
|
16
|
+
provider: 'gemini', // 'claude', 'openai' or 'gemini'
|
|
17
|
+
apiKey: 'your-api-key',
|
|
18
|
+
memoryLimit: 10, // optional
|
|
19
|
+
timeout: 15000 // optional, ms
|
|
17
20
|
})
|
|
18
21
|
|
|
19
22
|
const reply = await ai.send('Hello!')
|
|
20
23
|
console.log(reply)
|
|
24
|
+
|
|
25
|
+
// Get memory
|
|
26
|
+
console.log(ai.getMemory())
|
|
27
|
+
|
|
28
|
+
// Clear memory
|
|
29
|
+
ai.clearMemory()
|
|
21
30
|
```
|
|
22
31
|
|
|
23
32
|
## Providers
|
|
24
33
|
- `claude` â Anthropic Claude
|
|
25
34
|
- `openai` â OpenAI GPT
|
|
35
|
+
- `gemini` â Google Gemini
|
|
26
36
|
|
|
27
|
-
##
|
|
28
|
-
|
|
37
|
+
## Methods
|
|
38
|
+
- `send(message)` â Send a message
|
|
39
|
+
- `sendWithRetry(message, retries)` â Send with auto retry
|
|
40
|
+
- `getMemory()` â Get conversation history
|
|
41
|
+
- `clearMemory()` â Clear conversation history
|