langtrain 0.1.13 → 0.1.14

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.
Files changed (2) hide show
  1. package/README.md +63 -20
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,32 +1,41 @@
1
- <p align="center"><code>npm i -g langtrain</code></p>
2
- <p align="center"><strong>Langtrain CLI</strong> is a unified AI engineering platform that runs locally on your computer and connects to the Langtrain Cloud.
3
- <p align="center">
1
+ <div align="center">
4
2
  <picture>
5
3
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-white.svg">
6
4
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg">
7
- <img alt="Langtrain Logo" src="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg" width="60%">
5
+ <img alt="Langtrain Logo" src="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg" width="250">
8
6
  </picture>
9
- </p>
10
- <br/>
11
- <p align="center">
12
- If you want Langtrain in your code editor, <a href="https://langtrain.ai/docs/vscode">install the VS Code Extension.</a>
13
- <br/>If you are looking for the <em>web-based platform</em>, <strong>Langtrain Web</strong>, go to <a href="https://langtrain.ai">langtrain.ai</a>.
14
- </p>
7
+ <h3>Langtrain SDK</h3>
8
+ <p>The unified intelligence layer for JavaScript applications.</p>
9
+
10
+ <p>
11
+ <a href="https://www.npmjs.com/package/langtrain"><img src="https://img.shields.io/npm/v/langtrain?style=flat-square&labelColor=18181b&color=22c55e" alt="npm version" /></a>
12
+ <a href="https://langtrain.ai"><img src="https://img.shields.io/badge/website-langtrain.ai-18181b?style=flat-square&labelColor=18181b" alt="website" /></a>
13
+ <a href="https://docs.langtrain.ai"><img src="https://img.shields.io/badge/docs-documentation-18181b?style=flat-square&labelColor=18181b" alt="documentation" /></a>
14
+ <a href="https://github.com/langtrain-ai/langtrain-sdk/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/langtrain?style=flat-square&labelColor=18181b&color=3b82f6" alt="license" /></a>
15
+ </p>
16
+
17
+ <br/>
18
+
19
+ <p align="center"><code>npm i -g langtrain</code></p>
20
+ <p><strong>Langtrain CLI</strong> is a unified AI engineering platform that runs locally on your computer and connects to the Langtrain Cloud.</p>
21
+
22
+ <p>
23
+ If you want Langtrain in your code editor, <a href="https://langtrain.ai/docs/vscode">install the VS Code Extension.</a><br/>
24
+ If you are looking for the <em>web-based platform</em>, <strong>Langtrain Web</strong>, go to <a href="https://langtrain.ai">langtrain.ai</a>.
25
+ </p>
26
+ </div>
15
27
 
16
28
  ---
17
29
 
18
- ## Quickstart
19
-
20
- ### Installing and running Langtrain CLI
30
+ ## 🚀 Quickstart (CLI)
21
31
 
22
32
  Install globally with npm:
23
33
 
24
34
  ```shell
25
- # Install using npm
26
35
  npm install -g langtrain
27
36
  ```
28
37
 
29
- Then simply run `langtrain` to get started with the interactive menu.
38
+ Then run `langtrain` to start the interactive AI engineering studio:
30
39
 
31
40
  ```shell
32
41
  langtrain
@@ -45,25 +54,59 @@ sudo npm install -g langtrain
45
54
 
46
55
  Run `langtrain login` and enter your API Key from the dashboard to authenticate. We recommend signing into your Langtrain account to use **Cloud Finetuning**, **Agent Persistence**, and **Model Hosting** as part of your Pro or Enterprise plan. [Learn more about Langtrain Plans](https://langtrain.ai/pricing).
47
56
 
48
- You can check your current subscription status and limits directly from the CLI:
49
-
57
+ Check your subscription status and limits:
50
58
  ```shell
51
59
  langtrain status
52
60
  ```
61
+ *Free plans allow local fine-tuning. Upgrade to Pro for cloud-based GPU training.*
62
+
63
+ ---
64
+
65
+ ## 📦 SDK Usage
66
+
67
+ You can also use `langtrain` as a library in your Node.js applications to build intelligent agents and workflows.
53
68
 
54
- *Free plans allow local fine-tuning and limited cloud agent interactions. Upgrade to Pro for cloud-based GPU training.*
69
+ ```typescript
70
+ import { Langvision, Langtune, SubscriptionClient } from 'langtrain';
55
71
 
56
- ## Features
72
+ // 1. Initialize Clients
73
+ const vision = new Langvision({ apiKey: process.env.LANGTRAIN_API_KEY });
74
+ const tune = new Langtune({ apiKey: process.env.LANGTRAIN_API_KEY });
75
+
76
+ async function analyzeAndTune() {
77
+ // Analyze visual user context
78
+ const context = await vision.analyze({
79
+ image: './dashboard.jpg',
80
+ features: ['layout', 'text']
81
+ });
82
+
83
+ console.log('Visual Context:', context);
84
+
85
+ // Generate optimized response
86
+ const response = await tune.generate({
87
+ model: 'gpt-4-vision-optimized',
88
+ prompt: `Explain this dashboard layout: ${context.description}`
89
+ });
90
+
91
+ console.log(response);
92
+ }
93
+ ```
94
+
95
+ ## ✨ Features
57
96
 
58
97
  - **🤖 AI Agents**: Create, manage, and chat with custom AI agents hosted on Langtrain Server.
59
98
  - **🧠 Langtune**: Fine-tune LLMs (Llama 3, Mistral) locally or on the cloud.
60
99
  - **👁️ Langvision**: Optimize and fine-tune multimodal vision models.
61
100
  - **☁️ Data Persistence**: Automatically sync datasets and training jobs with your workspace.
101
+ - **📊 Subscription Management**: Verify plan limits and feature access programmatically.
62
102
 
63
- ## Docs
103
+ ## 📚 Documentation
64
104
 
65
105
  - [**Langtrain Documentation**](https://docs.langtrain.ai)
66
106
  - [**SDK Reference**](https://docs.langtrain.ai/sdk)
67
107
  - [**Contributing**](./CONTRIBUTING.md)
68
108
 
109
+ ## 📄 License
110
+
69
111
  This repository is licensed under the [MIT License](LICENSE).
112
+ copyright © [Langtrain AI](https://langtrain.ai)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langtrain",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Unified JavaScript SDK for Langtrain Ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",