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/dist/index.d.mts CHANGED
@@ -11,7 +11,7 @@ interface Agent {
11
11
  name: string;
12
12
  description?: string;
13
13
  model_id?: string;
14
- config: any;
14
+ config: Record<string, unknown>;
15
15
  is_active: boolean;
16
16
  created_at: string;
17
17
  updated_at: string;
@@ -20,7 +20,7 @@ interface AgentRun {
20
20
  id: string;
21
21
  conversation_id: string;
22
22
  success: boolean;
23
- output?: any;
23
+ output?: unknown;
24
24
  error?: string;
25
25
  latency_ms: number;
26
26
  tokens_used: number;
@@ -141,4 +141,46 @@ interface FeatureCheck {
141
141
  used?: number;
142
142
  }
143
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 };
144
+ interface Permission {
145
+ id: string;
146
+ object: string;
147
+ created: number;
148
+ allow_create_engine: boolean;
149
+ allow_sampling: boolean;
150
+ allow_logprobs: boolean;
151
+ allow_search_indices: boolean;
152
+ allow_view: boolean;
153
+ allow_fine_tuning: boolean;
154
+ organization: string;
155
+ group: any;
156
+ is_blocking: boolean;
157
+ }
158
+ interface Model {
159
+ id: string;
160
+ object: string;
161
+ created: number;
162
+ owned_by: string;
163
+ permission: Permission[];
164
+ root: string;
165
+ parent: string | null;
166
+ task?: 'text' | 'vision' | 'agent';
167
+ }
168
+ declare class ModelClient {
169
+ private client;
170
+ constructor(config: {
171
+ apiKey: string;
172
+ baseUrl?: string;
173
+ });
174
+ list(task?: string): Promise<Model[]>;
175
+ get(modelId: string): Promise<Model>;
176
+ }
177
+
178
+ type models_Model = Model;
179
+ type models_ModelClient = ModelClient;
180
+ declare const models_ModelClient: typeof ModelClient;
181
+ type models_Permission = Permission;
182
+ declare namespace models {
183
+ export { type models_Model as Model, models_ModelClient as ModelClient, type models_Permission as Permission };
184
+ }
185
+
186
+ export { type Agent, AgentClient, type AgentCreate, type AgentRun, agent as AgentTypes, type FeatureCheck, FileClient, type FileResponse, type FineTuneJobCreate, type FineTuneJobResponse, type Model, ModelClient, models as ModelTypes, SubscriptionClient, type SubscriptionInfo, TrainingClient };
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ interface Agent {
11
11
  name: string;
12
12
  description?: string;
13
13
  model_id?: string;
14
- config: any;
14
+ config: Record<string, unknown>;
15
15
  is_active: boolean;
16
16
  created_at: string;
17
17
  updated_at: string;
@@ -20,7 +20,7 @@ interface AgentRun {
20
20
  id: string;
21
21
  conversation_id: string;
22
22
  success: boolean;
23
- output?: any;
23
+ output?: unknown;
24
24
  error?: string;
25
25
  latency_ms: number;
26
26
  tokens_used: number;
@@ -141,4 +141,46 @@ interface FeatureCheck {
141
141
  used?: number;
142
142
  }
143
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 };
144
+ interface Permission {
145
+ id: string;
146
+ object: string;
147
+ created: number;
148
+ allow_create_engine: boolean;
149
+ allow_sampling: boolean;
150
+ allow_logprobs: boolean;
151
+ allow_search_indices: boolean;
152
+ allow_view: boolean;
153
+ allow_fine_tuning: boolean;
154
+ organization: string;
155
+ group: any;
156
+ is_blocking: boolean;
157
+ }
158
+ interface Model {
159
+ id: string;
160
+ object: string;
161
+ created: number;
162
+ owned_by: string;
163
+ permission: Permission[];
164
+ root: string;
165
+ parent: string | null;
166
+ task?: 'text' | 'vision' | 'agent';
167
+ }
168
+ declare class ModelClient {
169
+ private client;
170
+ constructor(config: {
171
+ apiKey: string;
172
+ baseUrl?: string;
173
+ });
174
+ list(task?: string): Promise<Model[]>;
175
+ get(modelId: string): Promise<Model>;
176
+ }
177
+
178
+ type models_Model = Model;
179
+ type models_ModelClient = ModelClient;
180
+ declare const models_ModelClient: typeof ModelClient;
181
+ type models_Permission = Permission;
182
+ declare namespace models {
183
+ export { type models_Model as Model, models_ModelClient as ModelClient, type models_Permission as Permission };
184
+ }
185
+
186
+ export { type Agent, AgentClient, type AgentCreate, type AgentRun, agent as AgentTypes, type FeatureCheck, FileClient, type FileResponse, type FineTuneJobCreate, type FineTuneJobResponse, type Model, ModelClient, models as ModelTypes, SubscriptionClient, type SubscriptionInfo, TrainingClient };