sylix 4.2.2 → 5.0.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/README.md +168 -263
- package/dist/index.d.ts +38 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -59
- package/dist/types.d.ts +32 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +15 -9
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,221 +1,136 @@
|
|
|
1
|
-
# Sylix SDK
|
|
1
|
+
# Sylix Node.js SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/sylix)
|
|
4
|
+
[](https://www.npmjs.com/package/sylix)
|
|
5
|
+
[](LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
The official Node.js/TypeScript library for the Sylix AI API, providing convenient access to Charles AI models from Node.js applications.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Table of Contents
|
|
10
|
-
|
|
11
|
-
- [Installation](#installation)
|
|
12
|
-
- [Quick Start](#quick-start)
|
|
13
|
-
- [Charles API](#charles-api)
|
|
14
|
-
- [Available Models](#available-models)
|
|
15
|
-
- [Examples](#examples)
|
|
16
|
-
- [Error Handling](#error-handling)
|
|
17
|
-
- [Configuration](#configuration)
|
|
18
|
-
- [API Reference](#api-reference)
|
|
19
|
-
|
|
20
|
-
---
|
|
9
|
+
> ⚠️ **Important:** This library is intended for server-side usage only. Using it in client-side browser code will expose your API key.
|
|
21
10
|
|
|
22
11
|
## Installation
|
|
23
12
|
|
|
24
13
|
```bash
|
|
25
|
-
npm install
|
|
14
|
+
npm install sylix
|
|
26
15
|
```
|
|
27
16
|
|
|
28
|
-
**Requirements:** Node.js 18
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Quick Start
|
|
17
|
+
**Requirements:** Node.js 18+
|
|
33
18
|
|
|
34
|
-
|
|
19
|
+
## Usage
|
|
35
20
|
|
|
36
21
|
```typescript
|
|
37
|
-
import
|
|
22
|
+
import Sylix from 'sylix';
|
|
38
23
|
|
|
39
|
-
const
|
|
40
|
-
apiKey: process.env
|
|
24
|
+
const client = new Sylix({
|
|
25
|
+
apiKey: process.env['SYLIX_API_KEY'], // This is the default and can be omitted
|
|
41
26
|
});
|
|
42
|
-
```
|
|
43
27
|
|
|
44
|
-
|
|
28
|
+
async function main() {
|
|
29
|
+
const response = await client.charles.chat.completions.create({
|
|
30
|
+
model: 'charles-s1:latest',
|
|
31
|
+
messages: [{ role: 'user', content: 'Hello, Charles!' }],
|
|
32
|
+
});
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
model: CHARLES_MODELS.MINI,
|
|
49
|
-
messages: [
|
|
50
|
-
{ role: "system", content: "You are a helpful assistant." },
|
|
51
|
-
{ role: "user", content: "Hello!" }
|
|
52
|
-
]
|
|
53
|
-
});
|
|
34
|
+
console.log(response.choices[0].message.content);
|
|
35
|
+
}
|
|
54
36
|
|
|
55
|
-
|
|
37
|
+
main();
|
|
56
38
|
```
|
|
57
39
|
|
|
58
|
-
|
|
40
|
+
## Streaming
|
|
59
41
|
|
|
60
|
-
|
|
61
|
-
const models = await sylix.charles.models.list();
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Generate Embeddings
|
|
42
|
+
We support streaming responses using Server Sent Events (SSE):
|
|
65
43
|
|
|
66
44
|
```typescript
|
|
67
|
-
|
|
68
|
-
model: CHARLES_MODELS.MINI,
|
|
69
|
-
input: "Hello world"
|
|
70
|
-
});
|
|
71
|
-
```
|
|
45
|
+
import Sylix from 'sylix';
|
|
72
46
|
|
|
73
|
-
|
|
47
|
+
const client = new Sylix();
|
|
74
48
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
async function main() {
|
|
50
|
+
const stream = await client.charles.chat.completions.create({
|
|
51
|
+
model: 'charles-s1:latest',
|
|
52
|
+
messages: [{ role: 'user', content: 'Write a short poem' }],
|
|
53
|
+
stream: true,
|
|
54
|
+
});
|
|
78
55
|
|
|
79
|
-
|
|
56
|
+
for await (const chunk of stream) {
|
|
57
|
+
process.stdout.write(chunk.choices[0]?.delta?.content || '');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
80
60
|
|
|
81
|
-
|
|
82
|
-
sylix.charles.chat.completions.create(options)
|
|
61
|
+
main();
|
|
83
62
|
```
|
|
84
63
|
|
|
85
|
-
|
|
86
|
-
|-----------|------|----------|-------------|
|
|
87
|
-
| `model` | `string` | Yes | Model ID |
|
|
88
|
-
| `messages` | `ChatMessage[]` | Yes | Conversation messages |
|
|
89
|
-
| `temperature` | `number` | No | Sampling temperature (0-2) |
|
|
90
|
-
| `max_tokens` | `number` | No | Maximum tokens in response |
|
|
91
|
-
| `stream` | `boolean` | No | Enable streaming |
|
|
92
|
-
| `tools` | `Tool[]` | No | Function calling tools |
|
|
93
|
-
| `tool_choice` | `string` | No | Tool selection mode |
|
|
64
|
+
## Request & Response Types
|
|
94
65
|
|
|
95
|
-
|
|
66
|
+
This library includes TypeScript definitions for all request params and response fields:
|
|
96
67
|
|
|
97
68
|
```typescript
|
|
98
|
-
|
|
99
|
-
|
|
69
|
+
import Sylix from 'sylix';
|
|
70
|
+
import { ChatRequest, ChatResponse, ChatMessage } from 'sylix';
|
|
100
71
|
|
|
101
|
-
|
|
102
|
-
const model = await sylix.charles.models.retrieve("charles-mini");
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Embeddings
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
const result = await sylix.charles.embeddings.create({
|
|
109
|
-
model: "charles-mini:latest",
|
|
110
|
-
input: "Text to embed"
|
|
111
|
-
});
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Available Models
|
|
117
|
-
|
|
118
|
-
| Model | ID | Tier | Description |
|
|
119
|
-
|-------|-----|------|-------------|
|
|
120
|
-
| Charles Mini | `charles-mini:latest` | Free | Lightweight, fast responses |
|
|
121
|
-
| Charles S1 | `charles-s1:latest` | Standard | Reasoning and code generation |
|
|
122
|
-
| Charles V1 | `charles-v1:latest` | Advanced | Complex analysis |
|
|
123
|
-
| Charles 2.9 | `charles-2.9:latest` | Premium | State-of-the-art performance |
|
|
124
|
-
| Charles R1 | `charles-r1:latest` | Premium | Advanced reasoning |
|
|
72
|
+
const client = new Sylix();
|
|
125
73
|
|
|
126
|
-
|
|
74
|
+
const messages: ChatMessage[] = [
|
|
75
|
+
{ role: 'system', content: 'You are a helpful assistant.' },
|
|
76
|
+
{ role: 'user', content: 'What is TypeScript?' },
|
|
77
|
+
];
|
|
127
78
|
|
|
128
|
-
|
|
129
|
-
|
|
79
|
+
const params: ChatRequest = {
|
|
80
|
+
model: 'charles-s1:latest',
|
|
81
|
+
messages,
|
|
82
|
+
temperature: 0.7,
|
|
83
|
+
};
|
|
130
84
|
|
|
131
|
-
|
|
132
|
-
CHARLES_MODELS.S1 // "charles-s1:latest"
|
|
133
|
-
CHARLES_MODELS.V1 // "charles-v1:latest"
|
|
134
|
-
CHARLES_MODELS.V2_9 // "charles-2.9:latest"
|
|
85
|
+
const response: ChatResponse = await client.charles.chat.completions.create(params);
|
|
135
86
|
```
|
|
136
87
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## Examples
|
|
88
|
+
## Available Models
|
|
140
89
|
|
|
141
|
-
|
|
90
|
+
| Model | ID | Description |
|
|
91
|
+
|-------|-----|-------------|
|
|
92
|
+
| Charles Mini | `charles-mini:latest` | Lightweight, fast responses |
|
|
93
|
+
| Charles S1 | `charles-s1:latest` | Balanced performance for coding |
|
|
94
|
+
| Charles V1 | `charles-v1:latest` | Advanced reasoning capabilities |
|
|
95
|
+
| Charles 2.9 | `charles-2.9:latest` | State-of-the-art performance |
|
|
96
|
+
| Charles R1 | `charles-r1:latest` | Deep reasoning and analysis |
|
|
142
97
|
|
|
143
98
|
```typescript
|
|
144
|
-
|
|
145
|
-
{ role: "system", content: "You are a coding assistant." },
|
|
146
|
-
{ role: "user", content: "Write hello world in Python" }
|
|
147
|
-
];
|
|
148
|
-
|
|
149
|
-
const response = await sylix.charles.chat.completions.create({
|
|
150
|
-
model: CHARLES_MODELS.S1,
|
|
151
|
-
messages
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
messages.push(response.choices[0].message);
|
|
155
|
-
messages.push({ role: "user", content: "Now in Rust" });
|
|
156
|
-
|
|
157
|
-
const followUp = await sylix.charles.chat.completions.create({
|
|
158
|
-
model: CHARLES_MODELS.S1,
|
|
159
|
-
messages
|
|
160
|
-
});
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Function Calling
|
|
99
|
+
import { CHARLES_MODELS } from 'sylix';
|
|
164
100
|
|
|
165
|
-
|
|
166
|
-
const response = await
|
|
167
|
-
model: CHARLES_MODELS.
|
|
168
|
-
messages: [{ role:
|
|
169
|
-
tools: [{
|
|
170
|
-
type: "function",
|
|
171
|
-
function: {
|
|
172
|
-
name: "get_weather",
|
|
173
|
-
description: "Get weather for a location",
|
|
174
|
-
parameters: {
|
|
175
|
-
type: "object",
|
|
176
|
-
properties: {
|
|
177
|
-
location: { type: "string" }
|
|
178
|
-
},
|
|
179
|
-
required: ["location"]
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}],
|
|
183
|
-
tool_choice: "auto"
|
|
101
|
+
// Use model constants for type safety
|
|
102
|
+
const response = await client.charles.chat.completions.create({
|
|
103
|
+
model: CHARLES_MODELS.S1, // 'charles-s1:latest'
|
|
104
|
+
messages: [{ role: 'user', content: 'Hello!' }],
|
|
184
105
|
});
|
|
185
106
|
```
|
|
186
107
|
|
|
187
|
-
|
|
108
|
+
## Handling Errors
|
|
188
109
|
|
|
189
|
-
|
|
190
|
-
const prompts = ["What is AI?", "Explain ML", "Define DL"];
|
|
191
|
-
|
|
192
|
-
const responses = await Promise.all(
|
|
193
|
-
prompts.map(prompt =>
|
|
194
|
-
sylix.charles.chat.completions.create({
|
|
195
|
-
model: CHARLES_MODELS.MINI,
|
|
196
|
-
messages: [{ role: "user", content: prompt }]
|
|
197
|
-
})
|
|
198
|
-
)
|
|
199
|
-
);
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## Error Handling
|
|
110
|
+
When the API returns a non-success status code, an error is thrown:
|
|
205
111
|
|
|
206
112
|
```typescript
|
|
207
|
-
import
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
113
|
+
import Sylix, { SylixError } from 'sylix';
|
|
114
|
+
|
|
115
|
+
const client = new Sylix();
|
|
116
|
+
|
|
117
|
+
async function main() {
|
|
118
|
+
try {
|
|
119
|
+
const response = await client.charles.chat.completions.create({
|
|
120
|
+
model: 'invalid-model',
|
|
121
|
+
messages: [{ role: 'user', content: 'Hello' }],
|
|
122
|
+
});
|
|
123
|
+
} catch (err) {
|
|
124
|
+
if (err instanceof SylixError) {
|
|
125
|
+
console.log(err.code); // e.g., 'INVALID_MODEL'
|
|
126
|
+
console.log(err.message); // Detailed error message
|
|
127
|
+
} else {
|
|
128
|
+
throw err;
|
|
129
|
+
}
|
|
217
130
|
}
|
|
218
131
|
}
|
|
132
|
+
|
|
133
|
+
main();
|
|
219
134
|
```
|
|
220
135
|
|
|
221
136
|
### Error Codes
|
|
@@ -223,135 +138,125 @@ try {
|
|
|
223
138
|
| Code | Description |
|
|
224
139
|
|------|-------------|
|
|
225
140
|
| `MISSING_API_KEY` | API key not provided |
|
|
226
|
-
| `INVALID_MODEL` | Model not found |
|
|
227
|
-
| `
|
|
228
|
-
| `
|
|
229
|
-
| `
|
|
141
|
+
| `INVALID_MODEL` | Model not found or unavailable |
|
|
142
|
+
| `INVALID_API_KEY` | Invalid or expired API key |
|
|
143
|
+
| `RATE_LIMIT_ERROR` | Too many requests |
|
|
144
|
+
| `STREAM_ERROR` | Streaming connection error |
|
|
145
|
+
| `NETWORK_ERROR` | Network connectivity issue |
|
|
230
146
|
|
|
231
|
-
|
|
147
|
+
## Retries
|
|
232
148
|
|
|
233
|
-
|
|
149
|
+
The library automatically retries on connection errors, 408, 429, and 5XX status codes. You can configure this:
|
|
234
150
|
|
|
235
151
|
```typescript
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
timeout?: number; // Default: 30000 (ms)
|
|
240
|
-
headers?: Record<string, string>; // Custom headers
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const sylix = new Sylix({
|
|
244
|
-
apiKey: process.env.SYLIX_API_KEY,
|
|
245
|
-
baseURL: "https://api.sylixide.com/v1",
|
|
246
|
-
timeout: 60000
|
|
152
|
+
const client = new Sylix({
|
|
153
|
+
maxRetries: 2, // default is 4
|
|
154
|
+
timeout: 30000, // default is 30 seconds
|
|
247
155
|
});
|
|
248
156
|
```
|
|
249
157
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
Store API keys in environment variables:
|
|
158
|
+
## Function Calling
|
|
253
159
|
|
|
254
160
|
```typescript
|
|
255
|
-
|
|
256
|
-
|
|
161
|
+
const response = await client.charles.chat.completions.create({
|
|
162
|
+
model: 'charles-v1:latest',
|
|
163
|
+
messages: [{ role: 'user', content: 'What is the weather in Tokyo?' }],
|
|
164
|
+
tools: [
|
|
165
|
+
{
|
|
166
|
+
type: 'function',
|
|
167
|
+
function: {
|
|
168
|
+
name: 'get_weather',
|
|
169
|
+
description: 'Get current weather for a location',
|
|
170
|
+
parameters: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: {
|
|
173
|
+
location: { type: 'string', description: 'City name' },
|
|
174
|
+
},
|
|
175
|
+
required: ['location'],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
tool_choice: 'auto',
|
|
181
|
+
});
|
|
257
182
|
|
|
258
|
-
//
|
|
259
|
-
|
|
183
|
+
// Check if the model wants to call a function
|
|
184
|
+
if (response.choices[0].message.tool_calls) {
|
|
185
|
+
const toolCall = response.choices[0].message.tool_calls[0];
|
|
186
|
+
console.log('Function:', toolCall.function.name);
|
|
187
|
+
console.log('Arguments:', toolCall.function.arguments);
|
|
188
|
+
}
|
|
260
189
|
```
|
|
261
190
|
|
|
262
|
-
|
|
191
|
+
## Embeddings
|
|
263
192
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
For complete API documentation, see [API_REFERENCE.md](./API_REFERENCE.md).
|
|
267
|
-
|
|
268
|
-
### Types
|
|
193
|
+
Generate vector embeddings for text:
|
|
269
194
|
|
|
270
195
|
```typescript
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// Chat response
|
|
278
|
-
interface ChatResponse {
|
|
279
|
-
id: string;
|
|
280
|
-
object: "chat.completion";
|
|
281
|
-
created: number;
|
|
282
|
-
model: string;
|
|
283
|
-
choices: Array<{
|
|
284
|
-
index: number;
|
|
285
|
-
message: ChatMessage;
|
|
286
|
-
finish_reason: string;
|
|
287
|
-
}>;
|
|
288
|
-
usage: {
|
|
289
|
-
prompt_tokens: number;
|
|
290
|
-
completion_tokens: number;
|
|
291
|
-
total_tokens: number;
|
|
292
|
-
};
|
|
293
|
-
}
|
|
196
|
+
const response = await client.charles.embeddings.create({
|
|
197
|
+
model: 'charles-mini:latest',
|
|
198
|
+
input: 'The quick brown fox jumps over the lazy dog',
|
|
199
|
+
});
|
|
294
200
|
|
|
295
|
-
//
|
|
296
|
-
interface CharlesModel {
|
|
297
|
-
id: string;
|
|
298
|
-
object: "model";
|
|
299
|
-
created: number;
|
|
300
|
-
owned_by: "sylix";
|
|
301
|
-
}
|
|
201
|
+
console.log(response.data[0].embedding); // Vector array
|
|
302
202
|
```
|
|
303
203
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
## Development
|
|
204
|
+
## Models API
|
|
307
205
|
|
|
308
|
-
|
|
206
|
+
```typescript
|
|
207
|
+
// List all available models
|
|
208
|
+
const models = await client.charles.models.list();
|
|
209
|
+
console.log(models.data);
|
|
309
210
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
npm test
|
|
211
|
+
// Get a specific model
|
|
212
|
+
const model = await client.charles.models.retrieve('charles-s1:latest');
|
|
213
|
+
console.log(model);
|
|
314
214
|
```
|
|
315
215
|
|
|
316
|
-
|
|
216
|
+
## Configuration
|
|
317
217
|
|
|
318
|
-
```
|
|
319
|
-
sylix
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
218
|
+
```typescript
|
|
219
|
+
import Sylix from 'sylix';
|
|
220
|
+
|
|
221
|
+
const client = new Sylix({
|
|
222
|
+
apiKey: process.env['SYLIX_API_KEY'], // Required
|
|
223
|
+
baseURL: 'https://api.sylixide.com/v1', // Default
|
|
224
|
+
timeout: 60000, // Request timeout in ms
|
|
225
|
+
maxRetries: 4, // Retry attempts for failed requests
|
|
226
|
+
});
|
|
327
227
|
```
|
|
328
228
|
|
|
329
|
-
|
|
229
|
+
### Environment Variables
|
|
330
230
|
|
|
331
|
-
|
|
231
|
+
| Variable | Description |
|
|
232
|
+
|----------|-------------|
|
|
233
|
+
| `SYLIX_API_KEY` | Your Sylix API key |
|
|
234
|
+
| `SYLIX_BASE_URL` | Override the default base URL |
|
|
332
235
|
|
|
333
|
-
|
|
334
|
-
2. Create a feature branch
|
|
335
|
-
3. Commit changes
|
|
336
|
-
4. Submit a pull request
|
|
236
|
+
## Semantic Versioning
|
|
337
237
|
|
|
338
|
-
|
|
238
|
+
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions.
|
|
339
239
|
|
|
340
|
-
|
|
240
|
+
We recommend pinning to a specific version and upgrading periodically:
|
|
341
241
|
|
|
342
|
-
|
|
242
|
+
```bash
|
|
243
|
+
npm install sylix@4.2.2
|
|
244
|
+
```
|
|
343
245
|
|
|
344
|
-
|
|
246
|
+
## Requirements
|
|
345
247
|
|
|
346
|
-
|
|
248
|
+
- Node.js 18 or higher
|
|
249
|
+
- TypeScript 4.7+ (for TypeScript users)
|
|
347
250
|
|
|
348
251
|
## Support
|
|
349
252
|
|
|
350
|
-
- **Documentation:** [
|
|
253
|
+
- **Documentation:** [docs.sylixide.com](https://docs.sylixide.com)
|
|
254
|
+
- **API Reference:** [api.sylixide.com](https://api.sylixide.com)
|
|
351
255
|
- **Issues:** [GitHub Issues](https://github.com/Curly-09/sylix-ide-sdk/issues)
|
|
352
|
-
- **
|
|
353
|
-
|
|
256
|
+
- **Email:** [support@sylixide.com](mailto:support@sylixide.com)
|
|
257
|
+
|
|
258
|
+
## License
|
|
354
259
|
|
|
355
|
-
|
|
260
|
+
Proprietary License © 2026 Sylix Technologies. All rights reserved.
|
|
356
261
|
|
|
357
|
-
|
|
262
|
+
See [LICENSE](LICENSE) for details.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SylixClient, SylixConfig } from "./client.js";
|
|
2
|
-
import { ChatRequest, ChatResponse, VisionRequest, VisionResponse, CodeRequest, CodeResponse, ReasonRequest, ReasonResponse, ModelInfo,
|
|
2
|
+
import { ChatRequest, ChatResponse, VisionRequest, VisionResponse, CodeRequest, CodeResponse, ReasonRequest, ReasonResponse, ModelInfo, HelixModel, HelixModelsListResponse, CharlesEmbeddingRequest, CharlesEmbeddingResponse, HelixChatRequest, ChatStreamChunk } from "./types.js";
|
|
3
3
|
import { readFile, fileToBase64 } from "./utils.js";
|
|
4
4
|
/**
|
|
5
5
|
* Chat completions namespace
|
|
@@ -59,12 +59,13 @@ declare class Stream<T> implements AsyncIterable<T> {
|
|
|
59
59
|
finalMessage(): Promise<string>;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Helix chat completions namespace
|
|
63
63
|
* Usage: sylix.charles.chat.completions.create()
|
|
64
64
|
*
|
|
65
65
|
* OpenAI-compatible API with streaming, abort controller, and tool calls
|
|
66
|
+
* Endpoint: POST /v1/charles/chat/completions
|
|
66
67
|
*/
|
|
67
|
-
declare class
|
|
68
|
+
declare class HelixChatCompletions {
|
|
68
69
|
private client;
|
|
69
70
|
constructor(client: SylixClient);
|
|
70
71
|
/**
|
|
@@ -78,13 +79,13 @@ declare class CharlesChatCompletions {
|
|
|
78
79
|
* ```typescript
|
|
79
80
|
* // Non-streaming
|
|
80
81
|
* const response = await sylix.charles.chat.completions.create({
|
|
81
|
-
* model: '
|
|
82
|
+
* model: 'helix-1.0',
|
|
82
83
|
* messages: [{ role: 'user', content: 'Hello!' }]
|
|
83
84
|
* });
|
|
84
85
|
*
|
|
85
86
|
* // Streaming (OpenAI-style)
|
|
86
87
|
* const stream = await sylix.charles.chat.completions.create({
|
|
87
|
-
* model: '
|
|
88
|
+
* model: 'helix-1.0',
|
|
88
89
|
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
89
90
|
* stream: true
|
|
90
91
|
* });
|
|
@@ -94,32 +95,32 @@ declare class CharlesChatCompletions {
|
|
|
94
95
|
*
|
|
95
96
|
* // With abort controller
|
|
96
97
|
* const stream = await sylix.charles.chat.completions.create({
|
|
97
|
-
* model: '
|
|
98
|
+
* model: 'helix-code',
|
|
98
99
|
* messages: [...],
|
|
99
100
|
* stream: true
|
|
100
101
|
* });
|
|
101
102
|
* setTimeout(() => stream.abort(), 5000); // Cancel after 5s
|
|
102
103
|
* ```
|
|
103
104
|
*/
|
|
104
|
-
create(payload:
|
|
105
|
+
create(payload: HelixChatRequest & {
|
|
105
106
|
stream: true;
|
|
106
107
|
}, options?: {
|
|
107
108
|
signal?: AbortSignal;
|
|
108
109
|
}): Promise<Stream<ChatStreamChunk>>;
|
|
109
|
-
create(payload:
|
|
110
|
+
create(payload: HelixChatRequest & {
|
|
110
111
|
stream?: false;
|
|
111
112
|
}, options?: {
|
|
112
113
|
signal?: AbortSignal;
|
|
113
114
|
}): Promise<ChatResponse>;
|
|
114
|
-
create(payload:
|
|
115
|
+
create(payload: HelixChatRequest, options?: {
|
|
115
116
|
signal?: AbortSignal;
|
|
116
117
|
}): Promise<ChatResponse | Stream<ChatStreamChunk>>;
|
|
117
118
|
/**
|
|
118
|
-
* Non-streaming completion
|
|
119
|
+
* Non-streaming completion — POST /v1/charles/chat/completions
|
|
119
120
|
*/
|
|
120
121
|
private createNonStream;
|
|
121
122
|
/**
|
|
122
|
-
* Streaming completion
|
|
123
|
+
* Streaming SSE completion — POST /v1/charles/chat/completions
|
|
123
124
|
*/
|
|
124
125
|
private createStream;
|
|
125
126
|
/**
|
|
@@ -129,31 +130,32 @@ declare class CharlesChatCompletions {
|
|
|
129
130
|
private handleError;
|
|
130
131
|
}
|
|
131
132
|
/**
|
|
132
|
-
*
|
|
133
|
+
* Helix chat namespace
|
|
133
134
|
* Usage: sylix.charles.chat.completions
|
|
134
135
|
*/
|
|
135
|
-
declare class
|
|
136
|
-
completions:
|
|
136
|
+
declare class HelixChat {
|
|
137
|
+
completions: HelixChatCompletions;
|
|
137
138
|
constructor(client: SylixClient);
|
|
138
139
|
}
|
|
139
140
|
/**
|
|
140
|
-
*
|
|
141
|
+
* Helix models namespace
|
|
141
142
|
* Usage: sylix.charles.models.list(), sylix.charles.models.retrieve()
|
|
143
|
+
* Endpoint: GET /v1/sylix/models
|
|
142
144
|
*/
|
|
143
|
-
declare class
|
|
145
|
+
declare class HelixModels {
|
|
144
146
|
private client;
|
|
145
147
|
constructor(client: SylixClient);
|
|
146
148
|
/**
|
|
147
|
-
* List all available
|
|
148
|
-
* @returns List of
|
|
149
|
+
* List all available Helix models
|
|
150
|
+
* @returns List of Helix models from GET /v1/sylix/models
|
|
149
151
|
*/
|
|
150
|
-
list(): Promise<
|
|
152
|
+
list(): Promise<HelixModelsListResponse>;
|
|
151
153
|
/**
|
|
152
|
-
* Retrieve a specific model by ID
|
|
153
|
-
* @param modelId - Model ID (e.g., "
|
|
154
|
+
* Retrieve a specific Helix model by ID
|
|
155
|
+
* @param modelId - Model ID (e.g., "helix-1.0" or "helix-code")
|
|
154
156
|
* @returns Model details
|
|
155
157
|
*/
|
|
156
|
-
retrieve(modelId: string): Promise<
|
|
158
|
+
retrieve(modelId: string): Promise<HelixModel>;
|
|
157
159
|
private handleError;
|
|
158
160
|
}
|
|
159
161
|
/**
|
|
@@ -172,30 +174,31 @@ declare class CharlesEmbeddings {
|
|
|
172
174
|
private handleError;
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
175
|
-
*
|
|
177
|
+
* Helix namespace (OpenAI-compatible) — accessible as `sylix.charles.*`
|
|
176
178
|
*
|
|
177
|
-
*
|
|
178
|
-
* - chat.completions
|
|
179
|
-
* - models
|
|
180
|
-
* -
|
|
179
|
+
* API Endpoints:
|
|
180
|
+
* - `chat.completions.create()` → POST /v1/charles/chat/completions
|
|
181
|
+
* - `models.list()` → GET /v1/sylix/models
|
|
182
|
+
* - `models.retrieve(id)` → GET /v1/sylix/models/:id
|
|
183
|
+
* - `embeddings.create()` → POST /v1/charles/embeddings
|
|
181
184
|
*
|
|
182
185
|
* @example
|
|
183
186
|
* ```typescript
|
|
184
187
|
* const sylix = new Sylix({ apiKey: 'sk-...' });
|
|
185
188
|
*
|
|
186
|
-
* // Chat
|
|
189
|
+
* // Chat with Helix
|
|
187
190
|
* const response = await sylix.charles.chat.completions.create({
|
|
188
|
-
* model: '
|
|
191
|
+
* model: 'helix-1.0',
|
|
189
192
|
* messages: [{ role: 'user', content: 'Hello!' }]
|
|
190
193
|
* });
|
|
191
194
|
*
|
|
192
|
-
* // List models
|
|
195
|
+
* // List available Helix models
|
|
193
196
|
* const models = await sylix.charles.models.list();
|
|
194
197
|
* ```
|
|
195
198
|
*/
|
|
196
199
|
declare class Charles {
|
|
197
|
-
chat:
|
|
198
|
-
models:
|
|
200
|
+
chat: HelixChat;
|
|
201
|
+
models: HelixModels;
|
|
199
202
|
embeddings: CharlesEmbeddings;
|
|
200
203
|
constructor(client: SylixClient);
|
|
201
204
|
}
|
|
@@ -212,7 +215,8 @@ export declare class Sylix {
|
|
|
212
215
|
charles: Charles;
|
|
213
216
|
constructor(config: SylixConfig);
|
|
214
217
|
/**
|
|
215
|
-
* Get available models
|
|
218
|
+
* Get available Helix models (static list)
|
|
219
|
+
* For the live list from the API use: sylix.charles.models.list()
|
|
216
220
|
*/
|
|
217
221
|
models(): ModelInfo[];
|
|
218
222
|
/**
|
|
@@ -220,7 +224,7 @@ export declare class Sylix {
|
|
|
220
224
|
*/
|
|
221
225
|
getModel(id: string): ModelInfo | undefined;
|
|
222
226
|
}
|
|
223
|
-
export { ChatRequest, ChatResponse, VisionRequest, VisionResponse, CodeRequest, CodeResponse, ReasonRequest, ReasonResponse, ModelInfo, CHARLES_MODELS, CHARLES_MODEL_IDS, CharlesModel, CharlesModelsListResponse, CharlesEmbeddingRequest, CharlesEmbeddingResponse, CharlesChatRequest, } from "./types.js";
|
|
227
|
+
export { ChatRequest, ChatResponse, VisionRequest, VisionResponse, CodeRequest, CodeResponse, ReasonRequest, ReasonResponse, ModelInfo, HELIX_MODELS, HELIX_MODEL_IDS, HelixModel, HelixModelsListResponse, HelixChatRequest, CHARLES_MODELS, CHARLES_MODEL_IDS, CharlesModel, CharlesModelsListResponse, CharlesEmbeddingRequest, CharlesEmbeddingResponse, CharlesChatRequest, } from "./types.js";
|
|
224
228
|
export type { ChatMessage, SylixConfig } from "./types.js";
|
|
225
229
|
export { APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, SylixError, } from "./errors.js";
|
|
226
230
|
export { readFile, fileToBase64 };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,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ACZ,aAAa,EACb,cAAc,EACd,SAAS,EAET,YAAY,EACZ,eAAe,EACf,UAAU,EACV,uBAAuB,EACvB,gBAAgB,EAEhB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG3D,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,UAAU,GACX,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -107,9 +107,10 @@ class Reason {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
// ============================================================================
|
|
110
|
-
//
|
|
110
|
+
// HELIX v1 NAMESPACE (OpenAI-compatible)
|
|
111
111
|
// Owned by Sylix © 2026
|
|
112
112
|
// ============================================================================
|
|
113
|
+
// Routes: POST /v1/charles/chat/completions | GET /v1/sylix/models
|
|
113
114
|
/**
|
|
114
115
|
* Stream response wrapper with controller
|
|
115
116
|
*/
|
|
@@ -151,12 +152,13 @@ class Stream {
|
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
/**
|
|
154
|
-
*
|
|
155
|
+
* Helix chat completions namespace
|
|
155
156
|
* Usage: sylix.charles.chat.completions.create()
|
|
156
157
|
*
|
|
157
158
|
* OpenAI-compatible API with streaming, abort controller, and tool calls
|
|
159
|
+
* Endpoint: POST /v1/charles/chat/completions
|
|
158
160
|
*/
|
|
159
|
-
class
|
|
161
|
+
class HelixChatCompletions {
|
|
160
162
|
constructor(client) {
|
|
161
163
|
this.client = client;
|
|
162
164
|
}
|
|
@@ -167,7 +169,7 @@ class CharlesChatCompletions {
|
|
|
167
169
|
return this.createNonStream(payload, options);
|
|
168
170
|
}
|
|
169
171
|
/**
|
|
170
|
-
* Non-streaming completion
|
|
172
|
+
* Non-streaming completion — POST /v1/charles/chat/completions
|
|
171
173
|
*/
|
|
172
174
|
async createNonStream(payload, options) {
|
|
173
175
|
try {
|
|
@@ -179,7 +181,7 @@ class CharlesChatCompletions {
|
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
/**
|
|
182
|
-
* Streaming completion
|
|
184
|
+
* Streaming SSE completion — POST /v1/charles/chat/completions
|
|
183
185
|
*/
|
|
184
186
|
async createStream(payload, options) {
|
|
185
187
|
const controller = new AbortController();
|
|
@@ -260,29 +262,30 @@ class CharlesChatCompletions {
|
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
/**
|
|
263
|
-
*
|
|
265
|
+
* Helix chat namespace
|
|
264
266
|
* Usage: sylix.charles.chat.completions
|
|
265
267
|
*/
|
|
266
|
-
class
|
|
268
|
+
class HelixChat {
|
|
267
269
|
constructor(client) {
|
|
268
|
-
this.completions = new
|
|
270
|
+
this.completions = new HelixChatCompletions(client);
|
|
269
271
|
}
|
|
270
272
|
}
|
|
271
273
|
/**
|
|
272
|
-
*
|
|
274
|
+
* Helix models namespace
|
|
273
275
|
* Usage: sylix.charles.models.list(), sylix.charles.models.retrieve()
|
|
276
|
+
* Endpoint: GET /v1/sylix/models
|
|
274
277
|
*/
|
|
275
|
-
class
|
|
278
|
+
class HelixModels {
|
|
276
279
|
constructor(client) {
|
|
277
280
|
this.client = client;
|
|
278
281
|
}
|
|
279
282
|
/**
|
|
280
|
-
* List all available
|
|
281
|
-
* @returns List of
|
|
283
|
+
* List all available Helix models
|
|
284
|
+
* @returns List of Helix models from GET /v1/sylix/models
|
|
282
285
|
*/
|
|
283
286
|
async list() {
|
|
284
287
|
try {
|
|
285
|
-
const response = await this.client.getClient().get("/
|
|
288
|
+
const response = await this.client.getClient().get("/sylix/models");
|
|
286
289
|
return response.data;
|
|
287
290
|
}
|
|
288
291
|
catch (error) {
|
|
@@ -290,13 +293,13 @@ class CharlesModels {
|
|
|
290
293
|
}
|
|
291
294
|
}
|
|
292
295
|
/**
|
|
293
|
-
* Retrieve a specific model by ID
|
|
294
|
-
* @param modelId - Model ID (e.g., "
|
|
296
|
+
* Retrieve a specific Helix model by ID
|
|
297
|
+
* @param modelId - Model ID (e.g., "helix-1.0" or "helix-code")
|
|
295
298
|
* @returns Model details
|
|
296
299
|
*/
|
|
297
300
|
async retrieve(modelId) {
|
|
298
301
|
try {
|
|
299
|
-
const response = await this.client.getClient().get(`/
|
|
302
|
+
const response = await this.client.getClient().get(`/sylix/models/${encodeURIComponent(modelId)}`);
|
|
300
303
|
return response.data;
|
|
301
304
|
}
|
|
302
305
|
catch (error) {
|
|
@@ -338,31 +341,32 @@ class CharlesEmbeddings {
|
|
|
338
341
|
}
|
|
339
342
|
}
|
|
340
343
|
/**
|
|
341
|
-
*
|
|
344
|
+
* Helix namespace (OpenAI-compatible) — accessible as `sylix.charles.*`
|
|
342
345
|
*
|
|
343
|
-
*
|
|
344
|
-
* - chat.completions
|
|
345
|
-
* - models
|
|
346
|
-
* -
|
|
346
|
+
* API Endpoints:
|
|
347
|
+
* - `chat.completions.create()` → POST /v1/charles/chat/completions
|
|
348
|
+
* - `models.list()` → GET /v1/sylix/models
|
|
349
|
+
* - `models.retrieve(id)` → GET /v1/sylix/models/:id
|
|
350
|
+
* - `embeddings.create()` → POST /v1/charles/embeddings
|
|
347
351
|
*
|
|
348
352
|
* @example
|
|
349
353
|
* ```typescript
|
|
350
354
|
* const sylix = new Sylix({ apiKey: 'sk-...' });
|
|
351
355
|
*
|
|
352
|
-
* // Chat
|
|
356
|
+
* // Chat with Helix
|
|
353
357
|
* const response = await sylix.charles.chat.completions.create({
|
|
354
|
-
* model: '
|
|
358
|
+
* model: 'helix-1.0',
|
|
355
359
|
* messages: [{ role: 'user', content: 'Hello!' }]
|
|
356
360
|
* });
|
|
357
361
|
*
|
|
358
|
-
* // List models
|
|
362
|
+
* // List available Helix models
|
|
359
363
|
* const models = await sylix.charles.models.list();
|
|
360
364
|
* ```
|
|
361
365
|
*/
|
|
362
366
|
class Charles {
|
|
363
367
|
constructor(client) {
|
|
364
|
-
this.chat = new
|
|
365
|
-
this.models = new
|
|
368
|
+
this.chat = new HelixChat(client);
|
|
369
|
+
this.models = new HelixModels(client);
|
|
366
370
|
this.embeddings = new CharlesEmbeddings(client);
|
|
367
371
|
}
|
|
368
372
|
}
|
|
@@ -379,47 +383,33 @@ export class Sylix {
|
|
|
379
383
|
this.charles = new Charles(this.client);
|
|
380
384
|
}
|
|
381
385
|
/**
|
|
382
|
-
* Get available models
|
|
386
|
+
* Get available Helix models (static list)
|
|
387
|
+
* For the live list from the API use: sylix.charles.models.list()
|
|
383
388
|
*/
|
|
384
389
|
models() {
|
|
385
390
|
return [
|
|
386
391
|
{
|
|
387
|
-
id: "
|
|
388
|
-
name: "
|
|
389
|
-
displayName: "
|
|
390
|
-
description: "
|
|
391
|
-
capabilities: ["code", "chat", "
|
|
392
|
-
tier: "free",
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
id: "charles-s1",
|
|
396
|
-
name: "Charles S1",
|
|
397
|
-
displayName: "charles-s1:latest",
|
|
398
|
-
description: "Standard reasoning model",
|
|
399
|
-
capabilities: ["code", "chat", "reasoning", "advanced"],
|
|
392
|
+
id: "helix-1.0",
|
|
393
|
+
name: "Helix 1.0",
|
|
394
|
+
displayName: "helix-1.0",
|
|
395
|
+
description: "Primary model — 32B parameters, 32K context, tool calling & reasoning",
|
|
396
|
+
capabilities: ["code", "chat", "reasoning", "tool-calling"],
|
|
400
397
|
tier: "standard",
|
|
401
398
|
},
|
|
402
399
|
{
|
|
403
|
-
id: "
|
|
404
|
-
name: "
|
|
405
|
-
displayName: "
|
|
406
|
-
description: "
|
|
407
|
-
capabilities: ["code", "chat", "
|
|
408
|
-
tier: "
|
|
400
|
+
id: "helix-code",
|
|
401
|
+
name: "Helix Code",
|
|
402
|
+
displayName: "helix-code",
|
|
403
|
+
description: "Coding-optimized model — fast completions and autocomplete",
|
|
404
|
+
capabilities: ["code", "chat", "autocomplete", "lightweight"],
|
|
405
|
+
tier: "standard",
|
|
409
406
|
},
|
|
410
407
|
{
|
|
411
|
-
id: "
|
|
412
|
-
name: "
|
|
413
|
-
displayName: "
|
|
414
|
-
description: "
|
|
415
|
-
capabilities: [
|
|
416
|
-
"code",
|
|
417
|
-
"chat",
|
|
418
|
-
"reasoning",
|
|
419
|
-
"advanced",
|
|
420
|
-
"complex",
|
|
421
|
-
"latest",
|
|
422
|
-
],
|
|
408
|
+
id: "helix-r1",
|
|
409
|
+
name: "Helix R1",
|
|
410
|
+
displayName: "helix-r1",
|
|
411
|
+
description: "Reasoning model — chain-of-thought and complex problem solving",
|
|
412
|
+
capabilities: ["code", "chat", "reasoning", "chain-of-thought"],
|
|
423
413
|
tier: "premium",
|
|
424
414
|
},
|
|
425
415
|
];
|
|
@@ -432,7 +422,11 @@ export class Sylix {
|
|
|
432
422
|
}
|
|
433
423
|
}
|
|
434
424
|
// Type exports
|
|
435
|
-
export {
|
|
425
|
+
export {
|
|
426
|
+
// Helix models (primary)
|
|
427
|
+
HELIX_MODELS, HELIX_MODEL_IDS,
|
|
428
|
+
// Helix types (legacy aliases kept for backward compat)
|
|
429
|
+
CHARLES_MODELS, CHARLES_MODEL_IDS, } from "./types.js";
|
|
436
430
|
// Error exports (OpenAI-compatible)
|
|
437
431
|
export { APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, SylixError, } from "./errors.js";
|
|
438
432
|
// Utilities
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sylix SDK Type Definitions
|
|
3
|
-
* OpenAI-compatible types for
|
|
3
|
+
* OpenAI-compatible types for Helix models
|
|
4
4
|
*
|
|
5
5
|
* Owned by Sylix Technologies © 2026
|
|
6
6
|
*/
|
|
@@ -145,19 +145,31 @@ export interface SylixResponse<T> {
|
|
|
145
145
|
data: T;
|
|
146
146
|
}
|
|
147
147
|
export { SylixError } from "./errors.js";
|
|
148
|
+
/** Helix model IDs available on the Sylix API */
|
|
149
|
+
export declare const HELIX_MODELS: {
|
|
150
|
+
/** helix-1.0 — Primary model (32B, 32K context, tool calling, reasoning) */
|
|
151
|
+
readonly V1: "helix-1.0";
|
|
152
|
+
/** helix-code — Coding-optimized model (fast completions) */
|
|
153
|
+
readonly CODE: "helix-code";
|
|
154
|
+
/** helix-r1 — Reasoning / chain-of-thought model */
|
|
155
|
+
readonly R1: "helix-r1";
|
|
156
|
+
};
|
|
157
|
+
export declare const HELIX_MODEL_IDS: ("helix-1.0" | "helix-code" | "helix-r1")[];
|
|
158
|
+
/** @deprecated Use HELIX_MODELS instead */
|
|
148
159
|
export declare const CHARLES_MODELS: {
|
|
149
|
-
|
|
150
|
-
readonly
|
|
151
|
-
|
|
152
|
-
readonly
|
|
153
|
-
|
|
154
|
-
readonly
|
|
160
|
+
/** helix-1.0 — Primary model (32B, 32K context, tool calling, reasoning) */
|
|
161
|
+
readonly V1: "helix-1.0";
|
|
162
|
+
/** helix-code — Coding-optimized model (fast completions) */
|
|
163
|
+
readonly CODE: "helix-code";
|
|
164
|
+
/** helix-r1 — Reasoning / chain-of-thought model */
|
|
165
|
+
readonly R1: "helix-r1";
|
|
155
166
|
};
|
|
156
|
-
|
|
167
|
+
/** @deprecated Use HELIX_MODEL_IDS instead */
|
|
168
|
+
export declare const CHARLES_MODEL_IDS: ("helix-1.0" | "helix-code" | "helix-r1")[];
|
|
157
169
|
/**
|
|
158
|
-
*
|
|
170
|
+
* Helix model object (OpenAI-compatible)
|
|
159
171
|
*/
|
|
160
|
-
export interface
|
|
172
|
+
export interface HelixModel {
|
|
161
173
|
id: string;
|
|
162
174
|
object: "model";
|
|
163
175
|
created: number;
|
|
@@ -166,13 +178,17 @@ export interface CharlesModel {
|
|
|
166
178
|
root?: string;
|
|
167
179
|
parent?: string | null;
|
|
168
180
|
}
|
|
181
|
+
/** @deprecated Use HelixModel */
|
|
182
|
+
export type CharlesModel = HelixModel;
|
|
169
183
|
/**
|
|
170
|
-
* Response from /v1/
|
|
184
|
+
* Response from GET /v1/sylix/models
|
|
171
185
|
*/
|
|
172
|
-
export interface
|
|
186
|
+
export interface HelixModelsListResponse {
|
|
173
187
|
object: "list";
|
|
174
|
-
data:
|
|
188
|
+
data: HelixModel[];
|
|
175
189
|
}
|
|
190
|
+
/** @deprecated Use HelixModelsListResponse */
|
|
191
|
+
export type CharlesModelsListResponse = HelixModelsListResponse;
|
|
176
192
|
/**
|
|
177
193
|
* Request for /v1/charles/embeddings
|
|
178
194
|
*/
|
|
@@ -243,7 +259,7 @@ export type ChatMode = 'proxy' | 'seek' | 'flashfix' | 'auto';
|
|
|
243
259
|
* - workspacePath: Workspace path for file operations
|
|
244
260
|
* - action: Action type (e.g., "chat")
|
|
245
261
|
*/
|
|
246
|
-
export interface
|
|
262
|
+
export interface HelixChatRequest extends ChatRequest {
|
|
247
263
|
tools?: CharlesFunctionTool[];
|
|
248
264
|
tool_choice?: "auto" | "none" | {
|
|
249
265
|
type: "function";
|
|
@@ -264,4 +280,6 @@ export interface CharlesChatRequest extends ChatRequest {
|
|
|
264
280
|
/** Action type (e.g., "chat") */
|
|
265
281
|
action?: string;
|
|
266
282
|
}
|
|
283
|
+
/** @deprecated Use HelixChatRequest */
|
|
284
|
+
export type CharlesChatRequest = HelixChatRequest;
|
|
267
285
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CA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+1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sylix SDK Type Definitions
|
|
3
|
-
* OpenAI-compatible types for
|
|
3
|
+
* OpenAI-compatible types for Helix models
|
|
4
4
|
*
|
|
5
5
|
* Owned by Sylix Technologies © 2026
|
|
6
6
|
*/
|
|
7
7
|
// Re-export errors from errors.ts
|
|
8
8
|
export { SylixError } from "./errors.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
V1: "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
/** Helix model IDs available on the Sylix API */
|
|
10
|
+
export const HELIX_MODELS = {
|
|
11
|
+
/** helix-1.0 — Primary model (32B, 32K context, tool calling, reasoning) */
|
|
12
|
+
V1: "helix-1.0",
|
|
13
|
+
/** helix-code — Coding-optimized model (fast completions) */
|
|
14
|
+
CODE: "helix-code",
|
|
15
|
+
/** helix-r1 — Reasoning / chain-of-thought model */
|
|
16
|
+
R1: "helix-r1",
|
|
16
17
|
};
|
|
17
|
-
export const
|
|
18
|
+
export const HELIX_MODEL_IDS = Object.values(HELIX_MODELS);
|
|
19
|
+
// Legacy alias — keeps backward-compat if any code still references CHARLES_MODELS
|
|
20
|
+
/** @deprecated Use HELIX_MODELS instead */
|
|
21
|
+
export const CHARLES_MODELS = HELIX_MODELS;
|
|
22
|
+
/** @deprecated Use HELIX_MODEL_IDS instead */
|
|
23
|
+
export const CHARLES_MODEL_IDS = HELIX_MODEL_IDS;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sylix",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The official Sylix AI SDK for TypeScript and JavaScript. Build intelligent applications with
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "The official Sylix AI SDK for TypeScript and JavaScript. Build intelligent applications with Helix models (helix-1.0, helix-code, helix-r1) featuring tool calling, reasoning, streaming, and OpenAI-compatible APIs. Enterprise-grade AI infrastructure for developers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"sylix",
|
|
30
|
-
"
|
|
30
|
+
"helix",
|
|
31
|
+
"helix-1.0",
|
|
32
|
+
"helix-code",
|
|
33
|
+
"helix-r1",
|
|
31
34
|
"ai",
|
|
32
35
|
"llm",
|
|
33
36
|
"sdk",
|
|
@@ -68,4 +71,4 @@
|
|
|
68
71
|
"engines": {
|
|
69
72
|
"node": ">=18.0.0"
|
|
70
73
|
}
|
|
71
|
-
}
|
|
74
|
+
}
|