langtrain 0.1.21 → 0.1.23
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/chunk-PGDJTY7T.mjs +13 -0
- package/dist/chunk-PGDJTY7T.mjs.map +1 -0
- package/dist/chunk-TZNQ5KWQ.js +13 -0
- package/dist/chunk-TZNQ5KWQ.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -3
- package/src/lib/files.ts +5 -5
- package/src/lib/subscription.ts +3 -2
- package/src/lib/training.ts +3 -2
- package/dist/chunk-QZ6U7AJN.js +0 -30
- package/dist/chunk-QZ6U7AJN.js.map +0 -1
- package/dist/chunk-TDQXC2RA.mjs +0 -30
- package/dist/chunk-TDQXC2RA.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkTZNQ5KWQ_js=require('./chunk-TZNQ5KWQ.js');chunkTZNQ5KWQ_js.r();Object.defineProperty(exports,"AgentClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.h}});Object.defineProperty(exports,"AgentTypes",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.i}});Object.defineProperty(exports,"FileClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.j}});Object.defineProperty(exports,"GuardrailClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.q}});Object.defineProperty(exports,"Langtune",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.f}});Object.defineProperty(exports,"Langvision",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.d}});Object.defineProperty(exports,"ModelClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.m}});Object.defineProperty(exports,"ModelTypes",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.n}});Object.defineProperty(exports,"SecretClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.o}});Object.defineProperty(exports,"SecretTypes",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.p}});Object.defineProperty(exports,"SubscriptionClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.l}});Object.defineProperty(exports,"Text",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.g}});Object.defineProperty(exports,"TrainingClient",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.k}});Object.defineProperty(exports,"Vision",{enumerable:true,get:function(){return chunkTZNQ5KWQ_js.e}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {r}from'./chunk-
|
|
1
|
+
import {r}from'./chunk-PGDJTY7T.mjs';export{h as AgentClient,i as AgentTypes,j as FileClient,q as GuardrailClient,f as Langtune,d as Langvision,m as ModelClient,n as ModelTypes,o as SecretClient,p as SecretTypes,l as SubscriptionClient,g as Text,k as TrainingClient,e as Vision}from'./chunk-PGDJTY7T.mjs';r();//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langtrain",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Unified JavaScript SDK for Langtrain Ecosystem",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"author": "Langtrain AI",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@types/form-data": "^2.2.1",
|
|
34
35
|
"@types/gradient-string": "^1.1.6",
|
|
35
36
|
"@types/node": "^25.2.3",
|
|
36
|
-
"langtune": "
|
|
37
|
-
"langvision": "
|
|
37
|
+
"langtune": "^0.1.1",
|
|
38
|
+
"langvision": "^0.1.1",
|
|
38
39
|
"tsup": "^8.0.2",
|
|
39
40
|
"typescript": "^5.4.2"
|
|
40
41
|
},
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"axios": "^1.13.5",
|
|
44
45
|
"cli-table3": "^0.6.5",
|
|
45
46
|
"commander": "^14.0.3",
|
|
47
|
+
"form-data": "^4.0.5",
|
|
46
48
|
"gradient-string": "^3.0.0",
|
|
47
49
|
"kleur": "^4.1.5",
|
|
48
50
|
"langtrain": "^0.1.15"
|
package/src/lib/files.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import axios, { AxiosInstance } from 'axios';
|
|
2
|
+
import FormData from 'form-data';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
|
|
1
5
|
export class FileClient {
|
|
2
|
-
private client:
|
|
6
|
+
private client: AxiosInstance;
|
|
3
7
|
|
|
4
8
|
constructor(config: { apiKey: string, baseUrl?: string }) {
|
|
5
|
-
const axios = require('axios');
|
|
6
9
|
this.client = axios.create({
|
|
7
10
|
baseURL: config.baseUrl || 'https://api.langtrain.ai/api/v1',
|
|
8
11
|
headers: {
|
|
@@ -12,9 +15,6 @@ export class FileClient {
|
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
async upload(file: any, workspaceId?: string, purpose: string = 'fine-tune'): Promise<FileResponse> {
|
|
15
|
-
const FormData = require('form-data');
|
|
16
|
-
const fs = require('fs');
|
|
17
|
-
|
|
18
18
|
const form = new FormData();
|
|
19
19
|
// Check if file is a path or buffer. Assuming path for CLI
|
|
20
20
|
if (typeof file === 'string') {
|
package/src/lib/subscription.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import axios, { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
1
3
|
export class SubscriptionClient {
|
|
2
|
-
private client:
|
|
4
|
+
private client: AxiosInstance;
|
|
3
5
|
|
|
4
6
|
constructor(config: { apiKey: string, baseUrl?: string }) {
|
|
5
|
-
const axios = require('axios');
|
|
6
7
|
this.client = axios.create({
|
|
7
8
|
baseURL: config.baseUrl || 'https://api.langtrain.ai/api/v1',
|
|
8
9
|
headers: {
|
package/src/lib/training.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import axios, { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
1
3
|
export class TrainingClient {
|
|
2
|
-
private client:
|
|
4
|
+
private client: AxiosInstance;
|
|
3
5
|
|
|
4
6
|
constructor(config: { apiKey: string, baseUrl?: string }) {
|
|
5
|
-
const axios = require('axios');
|
|
6
7
|
this.client = axios.create({
|
|
7
8
|
baseURL: config.baseUrl || 'https://api.langtrain.ai/api/v1',
|
|
8
9
|
headers: {
|