langtrain 0.1.20 → 0.1.22

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 CHANGED
@@ -1,12 +1,24 @@
1
1
  <div align="center">
2
+ <br />
2
3
  <picture>
3
4
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-white.svg">
4
5
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg">
5
- <img alt="Langtrain Logo" src="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg" width="250">
6
+ <img alt="Langtrain Logo" src="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg" width="280">
6
7
  </picture>
7
- <h3>Langtrain SDK</h3>
8
- <p>The unified intelligence layer for JavaScript applications.</p>
9
8
 
9
+ <br />
10
+ <br />
11
+
12
+ <h1>The Unified AI Engineering Platform</h1>
13
+
14
+ <p style="font-size: 1.2rem; max-width: 600px; margin: 0 auto; color: #666;">
15
+ Build, fine-tune, and deploy autonomous agents with a single workflow.
16
+ <br />
17
+ Langtrain bridges the gap between local development and enterprise-grade cloud infrastructure.
18
+ </p>
19
+
20
+ <br />
21
+
10
22
  <p>
11
23
  <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
24
  <a href="https://www.npmjs.com/package/langtrain"><img src="https://img.shields.io/npm/dm/langtrain?style=flat-square&labelColor=18181b&color=3b82f6" alt="npm downloads" /></a>
@@ -15,123 +27,112 @@
15
27
  <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>
16
28
  </p>
17
29
 
18
- <br/>
19
-
20
- <p align="center"><code>npm i -g langtrain</code></p>
21
- <p><strong>Langtrain CLI</strong> is a unified AI engineering platform that runs locally on your computer and connects to the Langtrain Cloud.</p>
30
+ <br />
22
31
 
23
- <p align="center">
24
- <img src="./assets/cli-demo.png" alt="Langtrain CLI Screenshot" width="800" style="border-radius: 8px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);" />
25
- </p>
32
+ <a href="https://langtrain.xyz">
33
+ <img src="./assets/cli-demo.png" alt="Langtrain CLI Interface" width="100%" style="border-radius: 12px; border: 1px solid #333; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);" />
34
+ </a>
26
35
 
27
- <p>
28
- If you are looking for the <em>web-based platform</em>, <strong>Langtrain Web</strong>, go to <a href="https://langtrain.xyz">langtrain.xyz</a>.
29
- </p>
30
36
  </div>
31
37
 
32
- ---
38
+ <br />
39
+ <br />
33
40
 
34
- ## Quickstart (CLI)
41
+ ## Quick Start
35
42
 
36
- Install globally with npm:
43
+ Get up and running in seconds. Langtrain CLI is your gateway to the entire ecosystem.
37
44
 
38
- ```shell
45
+ ```bash
46
+ # Install globally
39
47
  npm install -g langtrain
40
- ```
41
-
42
- Then run `langtrain` to start the interactive AI engineering studio:
43
48
 
44
- ```shell
49
+ # Start the interactive studio
45
50
  lt
46
51
  ```
47
52
 
48
53
  <details>
49
54
  <summary><strong>Troubleshooting Installation</strong></summary>
50
55
 
51
- If you encounter permission errors, try running with sudo or fix your npm permissions:
56
+ If you encounter permission errors, try running with sudo or check your npm permissions:
52
57
  ```bash
53
58
  sudo npm install -g langtrain
54
59
  ```
55
60
  </details>
56
61
 
57
- ### Using Langtrain with your Cloud Plan
62
+ <br />
63
+
64
+ ## Features
58
65
 
59
- Run `lt 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.xyz/pricing).
66
+ Langtrain provides a complete toolkit for the modern AI engineer.
60
67
 
61
- Check your subscription status and limits:
62
- ```shell
63
- lt status
64
- ```
65
- *Free plans allow local fine-tuning. Upgrade to Pro for cloud-based GPU training.*
68
+ | Feature | Description |
69
+ | :--- | :--- |
70
+ | **Autonomous Agents** | Create, manage, and chat with custom agents. Routable via `lt agent`. |
71
+ | **Langtune** | Fine-tune LLMs (Llama 3, Mistral) locally using QLoRA or dispatch to H100s. |
72
+ | **Langvision** | Optimize multimodal datasets and vision models for edge deployment. |
73
+ | **Enterprise Security** | Local-first architecture. Your data leaves your machine only when you say so. |
74
+ | **Instant Deploy** | Push your verified agents to production endpoints with `lt deploy`. |
66
75
 
67
- ---
76
+ <br />
68
77
 
69
- ## SDK Usage
78
+ ## SDK Integration
70
79
 
71
- You can also use `langtrain` as a library in your Node.js applications to build intelligent agents and workflows.
80
+ Use the power of Langtrain directly in your Node.js or TypeScript applications.
72
81
 
73
82
  ```typescript
74
- import { Langvision, Langtune, SubscriptionClient } from 'langtrain';
83
+ import { Langvision, Langtune } from 'langtrain';
75
84
 
76
- // 1. Initialize Clients
85
+ // Initialize with your project context
77
86
  const vision = new Langvision({ apiKey: process.env.LANGTRAIN_API_KEY });
78
87
  const tune = new Langtune({ apiKey: process.env.LANGTRAIN_API_KEY });
79
88
 
80
- async function analyzeAndTune() {
81
- // Analyze visual user context
82
- const context = await vision.analyze({
83
- image: './dashboard.jpg',
84
- features: ['layout', 'text']
89
+ async function main() {
90
+ // 1. Analyze Visual Context
91
+ const analysis = await vision.analyze({
92
+ image: './dashboard.png',
93
+ prompt: 'Extract UI component hierarchy'
85
94
  });
86
95
 
87
- console.log('Visual Context:', context);
88
-
89
- // Generate optimized response
90
- const response = await tune.generate({
91
- model: 'gpt-4-vision-optimized',
92
- prompt: `Explain this dashboard layout: ${context.description}`
96
+ // 2. Generate Optimized Code
97
+ const code = await tune.generate({
98
+ model: 'gpt-4-turbo',
99
+ prompt: `Create a React component based on: ${analysis.description}`
93
100
  });
94
101
 
95
- console.log(response);
102
+ console.log(code);
96
103
  }
97
104
  ```
98
105
 
99
- ## Features
100
-
101
- - **AI Agents**: Create, manage, and chat with custom AI agents hosted on Langtrain Server.
102
- - **Langtune**: Fine-tune LLMs (Llama 3, Mistral) locally or on the cloud.
103
- - **Langvision**: Optimize and fine-tune multimodal vision models.
104
- - **Data Persistence**: Automatically sync datasets and training jobs with your workspace.
105
- - **Subscription Management**: Verify plan limits and feature access programmatically.
106
+ <br />
106
107
 
107
108
  ## Configuration
108
109
 
109
- The SDK and CLI can be configured using environment variables `(dotenv supported)` or via `lt login`.
110
+ Configure your environment seamlessly via CLI or environment variables.
110
111
 
111
112
  | Variable | Description |
112
113
  | :--- | :--- |
113
- | `LANGTRAIN_API_KEY` | Your project API Key (get it from the dashboard). |
114
- | `LANGTRAIN_WORKSPACE_ID` | (Optional) Workspace ID for specific environment interaction. |
114
+ | `LANGTRAIN_API_KEY` | Your project Secret Key (find it in Settings). |
115
+ | `LANGTRAIN_WORKSPACE_ID` | (Optional) Target specific workspace environments. |
115
116
 
116
- ```typescript
117
- // Example: Manually passing config
118
- const client = new Langvision({
119
- apiKey: "lt_sk_...",
120
- workspaceId: "ws_..."
121
- });
122
- ```
117
+ > **Pro Tip:** Run `lt login` to authenticate continuously without managing `.env` files manually.
123
118
 
124
- ## Community & Support
119
+ <br />
125
120
 
126
- - **[GitHub Discussions](https://github.com/langtrain-ai/langtrain-sdk/discussions)**: Ask questions and share ideas.
121
+ ## Community & Support
127
122
 
128
- ## Documentation
123
+ Join the thousands of engineers building with Langtrain.
129
124
 
130
- - [**Langtrain Documentation**](https://docs.langtrain.xyz)
131
- - [**SDK Reference**](https://docs.langtrain.xyz/sdk)
132
- - [**Contributing**](./CONTRIBUTING.md)
125
+ - **[Documentation](https://docs.langtrain.xyz)** - Guides, API Reference, and Tutorials.
126
+ - **[GitHub Discussions](https://github.com/langtrain-ai/langtrain-sdk/discussions)** - Ask questions, request features.
127
+ - **[Enterprise Support](mailto:support@langtrain.xyz)** - Dedicated support for teams.
133
128
 
134
- ## License
129
+ <br />
130
+
131
+ ---
135
132
 
136
- This repository is licensed under the [MIT License](LICENSE).
137
- copyright © [Langtrain](https://langtrain.xyz)
133
+ <div align="center">
134
+ <p style="color: #666; font-size: 0.9rem;">
135
+ © 2024 Langtrain AI Inc. All rights reserved. <br />
136
+ <a href="https://langtrain.xyz/privacy">Privacy Policy</a> • <a href="https://langtrain.xyz/terms">Terms of Service</a>
137
+ </p>
138
+ </div>
Binary file