langtrain 0.1.11 → 0.1.12

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.
@@ -0,0 +1,144 @@
1
+ import * as langvision from 'langvision';
2
+ export { langvision as Vision };
3
+ export { Langvision } from 'langvision';
4
+ import * as langtune from 'langtune';
5
+ export { langtune as Text };
6
+ export { Langtune } from 'langtune';
7
+
8
+ interface Agent {
9
+ id: string;
10
+ workspace_id: string;
11
+ name: string;
12
+ description?: string;
13
+ model_id?: string;
14
+ config: any;
15
+ is_active: boolean;
16
+ created_at: string;
17
+ updated_at: string;
18
+ }
19
+ interface AgentRun {
20
+ id: string;
21
+ conversation_id: string;
22
+ success: boolean;
23
+ output?: any;
24
+ error?: string;
25
+ latency_ms: number;
26
+ tokens_used: number;
27
+ }
28
+ declare class AgentClient {
29
+ private config;
30
+ private client;
31
+ constructor(config: {
32
+ apiKey: string;
33
+ baseUrl?: string;
34
+ });
35
+ list(workspaceId?: string): Promise<Agent[]>;
36
+ get(agentId: string): Promise<Agent>;
37
+ create(agent: AgentCreate): Promise<Agent>;
38
+ delete(agentId: string): Promise<void>;
39
+ execute(agentId: string, input: any, messages?: any[], conversationId?: string): Promise<AgentRun>;
40
+ }
41
+ interface AgentConfig {
42
+ system_prompt?: string;
43
+ temperature?: number;
44
+ max_tokens?: number;
45
+ tools?: string[];
46
+ [key: string]: any;
47
+ }
48
+ interface AgentCreate {
49
+ workspace_id: string;
50
+ name: string;
51
+ description?: string;
52
+ model_id?: string;
53
+ config?: AgentConfig;
54
+ }
55
+
56
+ type agent_Agent = Agent;
57
+ type agent_AgentClient = AgentClient;
58
+ declare const agent_AgentClient: typeof AgentClient;
59
+ type agent_AgentConfig = AgentConfig;
60
+ type agent_AgentCreate = AgentCreate;
61
+ type agent_AgentRun = AgentRun;
62
+ declare namespace agent {
63
+ export { type agent_Agent as Agent, agent_AgentClient as AgentClient, type agent_AgentConfig as AgentConfig, type agent_AgentCreate as AgentCreate, type agent_AgentRun as AgentRun };
64
+ }
65
+
66
+ declare class FileClient {
67
+ private client;
68
+ constructor(config: {
69
+ apiKey: string;
70
+ baseUrl?: string;
71
+ });
72
+ upload(file: any, workspaceId?: string, purpose?: string): Promise<FileResponse>;
73
+ list(workspaceId: string, purpose?: string): Promise<FileResponse[]>;
74
+ }
75
+ interface FileResponse {
76
+ id: string;
77
+ filename: string;
78
+ purpose: string;
79
+ bytes: number;
80
+ created_at: string;
81
+ }
82
+
83
+ declare class TrainingClient {
84
+ private client;
85
+ constructor(config: {
86
+ apiKey: string;
87
+ baseUrl?: string;
88
+ });
89
+ createJob(job: FineTuneJobCreate): Promise<FineTuneJobResponse>;
90
+ listJobs(workspaceId: string, limit?: number): Promise<FineTuneJobList>;
91
+ getJob(jobId: string): Promise<FineTuneJobResponse>;
92
+ cancelJob(jobId: string): Promise<FineTuneJobResponse>;
93
+ }
94
+ interface FineTuneJobCreate {
95
+ name?: string;
96
+ base_model: string;
97
+ model_id?: string;
98
+ dataset_id: string;
99
+ guardrail_id?: string;
100
+ task?: 'text' | 'vision';
101
+ training_method?: 'sft' | 'dpo' | 'rlhf' | 'lora' | 'qlora';
102
+ hyperparameters?: any;
103
+ [key: string]: any;
104
+ }
105
+ interface FineTuneJobResponse {
106
+ id: string;
107
+ name: string;
108
+ status: string;
109
+ progress: number;
110
+ error_message?: string;
111
+ created_at: string;
112
+ [key: string]: any;
113
+ }
114
+ interface FineTuneJobList {
115
+ data: FineTuneJobResponse[];
116
+ has_more: boolean;
117
+ }
118
+
119
+ declare class SubscriptionClient {
120
+ private client;
121
+ constructor(config: {
122
+ apiKey: string;
123
+ baseUrl?: string;
124
+ });
125
+ getStatus(): Promise<SubscriptionInfo>;
126
+ checkFeature(feature: string): Promise<FeatureCheck>;
127
+ getLimits(): Promise<any>;
128
+ }
129
+ interface SubscriptionInfo {
130
+ is_active: boolean;
131
+ plan: string;
132
+ plan_name: string;
133
+ expires_at?: string;
134
+ features: string[];
135
+ limits: any;
136
+ }
137
+ interface FeatureCheck {
138
+ feature: string;
139
+ allowed: boolean;
140
+ limit?: number;
141
+ used?: number;
142
+ }
143
+
144
+ export { type Agent, AgentClient, type AgentCreate, type AgentRun, agent as AgentTypes, type FeatureCheck, FileClient, type FileResponse, type FineTuneJobCreate, type FineTuneJobResponse, SubscriptionClient, type SubscriptionInfo, TrainingClient };
@@ -0,0 +1,144 @@
1
+ import * as langvision from 'langvision';
2
+ export { langvision as Vision };
3
+ export { Langvision } from 'langvision';
4
+ import * as langtune from 'langtune';
5
+ export { langtune as Text };
6
+ export { Langtune } from 'langtune';
7
+
8
+ interface Agent {
9
+ id: string;
10
+ workspace_id: string;
11
+ name: string;
12
+ description?: string;
13
+ model_id?: string;
14
+ config: any;
15
+ is_active: boolean;
16
+ created_at: string;
17
+ updated_at: string;
18
+ }
19
+ interface AgentRun {
20
+ id: string;
21
+ conversation_id: string;
22
+ success: boolean;
23
+ output?: any;
24
+ error?: string;
25
+ latency_ms: number;
26
+ tokens_used: number;
27
+ }
28
+ declare class AgentClient {
29
+ private config;
30
+ private client;
31
+ constructor(config: {
32
+ apiKey: string;
33
+ baseUrl?: string;
34
+ });
35
+ list(workspaceId?: string): Promise<Agent[]>;
36
+ get(agentId: string): Promise<Agent>;
37
+ create(agent: AgentCreate): Promise<Agent>;
38
+ delete(agentId: string): Promise<void>;
39
+ execute(agentId: string, input: any, messages?: any[], conversationId?: string): Promise<AgentRun>;
40
+ }
41
+ interface AgentConfig {
42
+ system_prompt?: string;
43
+ temperature?: number;
44
+ max_tokens?: number;
45
+ tools?: string[];
46
+ [key: string]: any;
47
+ }
48
+ interface AgentCreate {
49
+ workspace_id: string;
50
+ name: string;
51
+ description?: string;
52
+ model_id?: string;
53
+ config?: AgentConfig;
54
+ }
55
+
56
+ type agent_Agent = Agent;
57
+ type agent_AgentClient = AgentClient;
58
+ declare const agent_AgentClient: typeof AgentClient;
59
+ type agent_AgentConfig = AgentConfig;
60
+ type agent_AgentCreate = AgentCreate;
61
+ type agent_AgentRun = AgentRun;
62
+ declare namespace agent {
63
+ export { type agent_Agent as Agent, agent_AgentClient as AgentClient, type agent_AgentConfig as AgentConfig, type agent_AgentCreate as AgentCreate, type agent_AgentRun as AgentRun };
64
+ }
65
+
66
+ declare class FileClient {
67
+ private client;
68
+ constructor(config: {
69
+ apiKey: string;
70
+ baseUrl?: string;
71
+ });
72
+ upload(file: any, workspaceId?: string, purpose?: string): Promise<FileResponse>;
73
+ list(workspaceId: string, purpose?: string): Promise<FileResponse[]>;
74
+ }
75
+ interface FileResponse {
76
+ id: string;
77
+ filename: string;
78
+ purpose: string;
79
+ bytes: number;
80
+ created_at: string;
81
+ }
82
+
83
+ declare class TrainingClient {
84
+ private client;
85
+ constructor(config: {
86
+ apiKey: string;
87
+ baseUrl?: string;
88
+ });
89
+ createJob(job: FineTuneJobCreate): Promise<FineTuneJobResponse>;
90
+ listJobs(workspaceId: string, limit?: number): Promise<FineTuneJobList>;
91
+ getJob(jobId: string): Promise<FineTuneJobResponse>;
92
+ cancelJob(jobId: string): Promise<FineTuneJobResponse>;
93
+ }
94
+ interface FineTuneJobCreate {
95
+ name?: string;
96
+ base_model: string;
97
+ model_id?: string;
98
+ dataset_id: string;
99
+ guardrail_id?: string;
100
+ task?: 'text' | 'vision';
101
+ training_method?: 'sft' | 'dpo' | 'rlhf' | 'lora' | 'qlora';
102
+ hyperparameters?: any;
103
+ [key: string]: any;
104
+ }
105
+ interface FineTuneJobResponse {
106
+ id: string;
107
+ name: string;
108
+ status: string;
109
+ progress: number;
110
+ error_message?: string;
111
+ created_at: string;
112
+ [key: string]: any;
113
+ }
114
+ interface FineTuneJobList {
115
+ data: FineTuneJobResponse[];
116
+ has_more: boolean;
117
+ }
118
+
119
+ declare class SubscriptionClient {
120
+ private client;
121
+ constructor(config: {
122
+ apiKey: string;
123
+ baseUrl?: string;
124
+ });
125
+ getStatus(): Promise<SubscriptionInfo>;
126
+ checkFeature(feature: string): Promise<FeatureCheck>;
127
+ getLimits(): Promise<any>;
128
+ }
129
+ interface SubscriptionInfo {
130
+ is_active: boolean;
131
+ plan: string;
132
+ plan_name: string;
133
+ expires_at?: string;
134
+ features: string[];
135
+ limits: any;
136
+ }
137
+ interface FeatureCheck {
138
+ feature: string;
139
+ allowed: boolean;
140
+ limit?: number;
141
+ used?: number;
142
+ }
143
+
144
+ export { type Agent, AgentClient, type AgentCreate, type AgentRun, agent as AgentTypes, type FeatureCheck, FileClient, type FileResponse, type FineTuneJobCreate, type FineTuneJobResponse, SubscriptionClient, type SubscriptionInfo, TrainingClient };