langtrain 0.1.11 → 0.1.13

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,100 +1,69 @@
1
- <div align="center">
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">
2
4
  <picture>
3
5
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-white.svg">
4
6
  <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">
7
+ <img alt="Langtrain Logo" src="https://raw.githubusercontent.com/langtrain-ai/langtrain-sdk/main/public/langtrain-black.svg" width="60%">
6
8
  </picture>
7
- <h3>Langtrain SDK</h3>
8
- <p>
9
- The unified intelligence layer for JavaScript applications. <br/>
10
- Combine computer vision and LLM fine-tuning in a single, high-performance SDK.
11
- </p>
12
-
13
- <p>
14
- <a href="https://www.npmjs.com/package/langtrain"><img src="https://img.shields.io/npm/v/langtrain?style=flat-square&labelColor=231f20&color=000000" alt="npm version" /></a>
15
- <a href="https://langtrain.ai"><img src="https://img.shields.io/badge/website-langtrain.ai-000000?style=flat-square&labelColor=231f20" alt="website" /></a>
16
- <a href="https://docs.langtrain.ai"><img src="https://img.shields.io/badge/docs-documentation-000000?style=flat-square&labelColor=231f20" alt="documentation" /></a>
17
- <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=231f20&color=000000" alt="license" /></a>
18
- </p>
19
-
20
- <br/>
21
-
22
- <pre>npm install langtrain</pre>
23
-
24
- <br/>
25
- </div>
26
-
27
- ## Overview
28
-
29
- Langtrain brings the power of **Langvision** (Computer Vision) and **Langtune** (LLM Optimization) into your JavaScript/TypeScript workflow. It is designed to be the only SDK you need to build intelligent, multimodal AI applications.
30
-
31
- ## Key Features
32
-
33
- | Feature | Description |
34
- | :--- | :--- |
35
- | **👁️ Computer Vision** | Advanced image analysis, object detection, and visual reasoning powered by `Langvision`. |
36
- | **🧠 LLM Optimization** | Fine-tune and optimize language models effortlessly with `Langtune`. |
37
- | **📦 Unified & Bundled** | A single dependency for your entire AI stack. Zero configuration required. |
38
- | **⚡ Type-Safe** | Built with TypeScript for a robust, developer-friendly experience. |
39
-
40
- ## Quick Start
41
-
42
- ```typescript
43
- import { Langvision, Langtune } from 'langtrain';
44
-
45
- // 1. Initialize Clients
46
- const vision = new Langvision({ apiKey: process.env.LANGVISION_API_KEY });
47
- const tune = new Langtune({ apiKey: process.env.LANGTUNE_API_KEY });
48
-
49
- // 2. Build Intelligence
50
- async function analyzeAndTune() {
51
- try {
52
- // Analyze visual user context
53
- const context = await vision.analyze({
54
- image: 'https://example.com/dashboard.jpg',
55
- features: ['layout', 'text']
56
- });
57
-
58
- console.log('Visual Context:', context);
59
-
60
- // Generate optimized response based on visual context
61
- const response = await tune.generate({
62
- model: 'gpt-4-vision-optimized',
63
- prompt: `Explain this dashboard layout: ${context.description}`
64
- });
65
-
66
- console.log('AI Response:', response);
67
- } catch (error) {
68
- console.error('Error processing AI request:', error);
69
- }
70
- }
71
-
72
- analyzeAndTune();
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>
15
+
16
+ ---
17
+
18
+ ## Quickstart
19
+
20
+ ### Installing and running Langtrain CLI
21
+
22
+ Install globally with npm:
23
+
24
+ ```shell
25
+ # Install using npm
26
+ npm install -g langtrain
27
+ ```
28
+
29
+ Then simply run `langtrain` to get started with the interactive menu.
30
+
31
+ ```shell
32
+ langtrain
73
33
  ```
74
34
 
75
- ## Advanced Usage
35
+ <details>
36
+ <summary><strong>Troubleshooting Installation</strong></summary>
37
+
38
+ If you encounter permission errors, try running with sudo or fix your npm permissions:
39
+ ```bash
40
+ sudo npm install -g langtrain
41
+ ```
42
+ </details>
76
43
 
77
- For more complex workflows, you can leverage specific modules:
44
+ ### Using Langtrain with your Cloud Plan
78
45
 
79
- ### Fine-Tuning a Model
46
+ 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).
80
47
 
81
- ```typescript
82
- // Start a fine-tuning job
83
- const job = await tune.createFineTune({
84
- trainingFile: 'file-id-123',
85
- model: 'gpt-3.5-turbo',
86
- hyperparameters: {
87
- nEpochs: 4
88
- }
89
- });
48
+ You can check your current subscription status and limits directly from the CLI:
90
49
 
91
- console.log(`Fine-tuning started: ${job.id}`);
50
+ ```shell
51
+ langtrain status
92
52
  ```
93
53
 
94
- ## Documentation
54
+ *Free plans allow local fine-tuning and limited cloud agent interactions. Upgrade to Pro for cloud-based GPU training.*
55
+
56
+ ## Features
57
+
58
+ - **🤖 AI Agents**: Create, manage, and chat with custom AI agents hosted on Langtrain Server.
59
+ - **🧠 Langtune**: Fine-tune LLMs (Llama 3, Mistral) locally or on the cloud.
60
+ - **👁️ Langvision**: Optimize and fine-tune multimodal vision models.
61
+ - **☁️ Data Persistence**: Automatically sync datasets and training jobs with your workspace.
95
62
 
96
- Visit [docs.langtrain.ai](https://docs.langtrain.ai) for comprehensive guides and API reference.
63
+ ## Docs
97
64
 
98
- ## License
65
+ - [**Langtrain Documentation**](https://docs.langtrain.ai)
66
+ - [**SDK Reference**](https://docs.langtrain.ai/sdk)
67
+ - [**Contributing**](./CONTRIBUTING.md)
99
68
 
100
- MIT © [Langtrain AI](https://langtrain.ai)
69
+ This repository is licensed under the [MIT License](LICENSE).
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node