langtrain 0.1.14 → 0.1.16
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 +33 -11
- package/dist/chunk-PAHGEWDE.js +30 -0
- package/dist/chunk-PAHGEWDE.js.map +1 -0
- package/dist/chunk-Q46V6ODQ.mjs +30 -0
- package/dist/chunk-Q46V6ODQ.mjs.map +1 -0
- package/dist/cli.d.mts +3 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +5 -23508
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +5 -23523
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +45 -3
- package/dist/index.d.ts +45 -3
- package/dist/index.js +1 -23056
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -23044
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
- package/src/cli/auth.ts +76 -0
- package/src/cli/config.ts +28 -0
- package/src/cli/handlers/agent.ts +183 -0
- package/src/cli/handlers/subscription.ts +30 -0
- package/src/cli/handlers/tune.ts +155 -0
- package/src/cli/handlers/vision.ts +159 -0
- package/src/cli/index.ts +154 -0
- package/src/cli/menu.ts +70 -0
- package/src/cli/ui.ts +50 -0
- package/src/index.ts +8 -6
- package/src/{agent.ts → lib/agent.ts} +2 -2
- package/src/lib/models.ts +61 -0
- package/tsup.config.ts +7 -2
- package/src/cli.ts +0 -622
- /package/src/{files.ts → lib/files.ts} +0 -0
- /package/src/{subscription.ts → lib/subscription.ts} +0 -0
- /package/src/{training.ts → lib/training.ts} +0 -0
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<p>
|
|
11
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://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>
|
|
12
13
|
<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
14
|
<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
15
|
<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>
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
30
|
-
##
|
|
31
|
+
## Quickstart (CLI)
|
|
31
32
|
|
|
32
33
|
Install globally with npm:
|
|
33
34
|
|
|
@@ -62,7 +63,7 @@ langtrain status
|
|
|
62
63
|
|
|
63
64
|
---
|
|
64
65
|
|
|
65
|
-
##
|
|
66
|
+
## SDK Usage
|
|
66
67
|
|
|
67
68
|
You can also use `langtrain` as a library in your Node.js applications to build intelligent agents and workflows.
|
|
68
69
|
|
|
@@ -92,21 +93,42 @@ async function analyzeAndTune() {
|
|
|
92
93
|
}
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
##
|
|
96
|
+
## Features
|
|
96
97
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
98
|
+
- **AI Agents**: Create, manage, and chat with custom AI agents hosted on Langtrain Server.
|
|
99
|
+
- **Langtune**: Fine-tune LLMs (Llama 3, Mistral) locally or on the cloud.
|
|
100
|
+
- **Langvision**: Optimize and fine-tune multimodal vision models.
|
|
101
|
+
- **Data Persistence**: Automatically sync datasets and training jobs with your workspace.
|
|
102
|
+
- **Subscription Management**: Verify plan limits and feature access programmatically.
|
|
102
103
|
|
|
103
|
-
##
|
|
104
|
+
## Configuration
|
|
105
|
+
|
|
106
|
+
The SDK and CLI can be configured using environment variables `(dotenv supported)` or via `langtrain login`.
|
|
107
|
+
|
|
108
|
+
| Variable | Description |
|
|
109
|
+
| :--- | :--- |
|
|
110
|
+
| `LANGTRAIN_API_KEY` | Your project API Key (get it from the dashboard). |
|
|
111
|
+
| `LANGTRAIN_WORKSPACE_ID` | (Optional) Workspace ID for specific environment interaction. |
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
// Example: Manually passing config
|
|
115
|
+
const client = new Langvision({
|
|
116
|
+
apiKey: "lt_sk_...",
|
|
117
|
+
workspaceId: "ws_..."
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Community & Support
|
|
122
|
+
|
|
123
|
+
- **[GitHub Discussions](https://github.com/langtrain-ai/langtrain-sdk/discussions)**: Ask questions and share ideas.
|
|
124
|
+
|
|
125
|
+
## Documentation
|
|
104
126
|
|
|
105
127
|
- [**Langtrain Documentation**](https://docs.langtrain.ai)
|
|
106
128
|
- [**SDK Reference**](https://docs.langtrain.ai/sdk)
|
|
107
129
|
- [**Contributing**](./CONTRIBUTING.md)
|
|
108
130
|
|
|
109
|
-
##
|
|
131
|
+
## License
|
|
110
132
|
|
|
111
133
|
This repository is licensed under the [MIT License](LICENSE).
|
|
112
|
-
copyright © [Langtrain
|
|
134
|
+
copyright © [Langtrain](https://langtrain.xyz)
|