segmind 0.4.0 → 0.5.0
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 +4 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -262,6 +262,9 @@ interface RequestRecord {
|
|
|
262
262
|
}
|
|
263
263
|
interface GenerationsListOptions {
|
|
264
264
|
page?: number;
|
|
265
|
+
/** 1–100. Default 10. */
|
|
266
|
+
perPage?: number;
|
|
267
|
+
/** Substring match on the model slug. */
|
|
265
268
|
modelName?: string;
|
|
266
269
|
/** YYYY-MM-DD. */
|
|
267
270
|
startDate?: string;
|
|
@@ -269,6 +272,8 @@ interface GenerationsListOptions {
|
|
|
269
272
|
endDate?: string;
|
|
270
273
|
/** Inside a team, any member's user id; otherwise only your own. */
|
|
271
274
|
userId?: string;
|
|
275
|
+
/** Same as `userId`, by email. Pass one or the other. */
|
|
276
|
+
userEmail?: string;
|
|
272
277
|
signal?: AbortSignal;
|
|
273
278
|
}
|
|
274
279
|
interface HistoryOptions {
|
|
@@ -806,7 +811,7 @@ declare class InferenceTimeout extends SegmindError {
|
|
|
806
811
|
constructor(requestId: string, elapsedMs: number);
|
|
807
812
|
}
|
|
808
813
|
|
|
809
|
-
declare const VERSION = "0.
|
|
814
|
+
declare const VERSION = "0.5.0";
|
|
810
815
|
|
|
811
816
|
/** `new Segmind().run(...)` with the key from `SEGMIND_API_KEY`. */
|
|
812
817
|
declare const run: (slug: string, params?: Params, options?: RunOptions) => Promise<RunResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -262,6 +262,9 @@ interface RequestRecord {
|
|
|
262
262
|
}
|
|
263
263
|
interface GenerationsListOptions {
|
|
264
264
|
page?: number;
|
|
265
|
+
/** 1–100. Default 10. */
|
|
266
|
+
perPage?: number;
|
|
267
|
+
/** Substring match on the model slug. */
|
|
265
268
|
modelName?: string;
|
|
266
269
|
/** YYYY-MM-DD. */
|
|
267
270
|
startDate?: string;
|
|
@@ -269,6 +272,8 @@ interface GenerationsListOptions {
|
|
|
269
272
|
endDate?: string;
|
|
270
273
|
/** Inside a team, any member's user id; otherwise only your own. */
|
|
271
274
|
userId?: string;
|
|
275
|
+
/** Same as `userId`, by email. Pass one or the other. */
|
|
276
|
+
userEmail?: string;
|
|
272
277
|
signal?: AbortSignal;
|
|
273
278
|
}
|
|
274
279
|
interface HistoryOptions {
|
|
@@ -806,7 +811,7 @@ declare class InferenceTimeout extends SegmindError {
|
|
|
806
811
|
constructor(requestId: string, elapsedMs: number);
|
|
807
812
|
}
|
|
808
813
|
|
|
809
|
-
declare const VERSION = "0.
|
|
814
|
+
declare const VERSION = "0.5.0";
|
|
810
815
|
|
|
811
816
|
/** `new Segmind().run(...)` with the key from `SEGMIND_API_KEY`. */
|
|
812
817
|
declare const run: (slug: string, params?: Params, options?: RunOptions) => Promise<RunResult>;
|
package/dist/index.js
CHANGED
|
@@ -575,10 +575,12 @@ var Generations = class {
|
|
|
575
575
|
async list(options = {}) {
|
|
576
576
|
return this.read("/inference-request/generations", options.signal, {
|
|
577
577
|
page: options.page ?? 1,
|
|
578
|
+
per_page: options.perPage,
|
|
578
579
|
model_name: options.modelName,
|
|
579
580
|
start_date: options.startDate,
|
|
580
581
|
end_date: options.endDate,
|
|
581
|
-
user_id: options.userId
|
|
582
|
+
user_id: options.userId,
|
|
583
|
+
user_email: options.userEmail
|
|
582
584
|
});
|
|
583
585
|
}
|
|
584
586
|
/** The newest generations for one model. */
|
|
@@ -804,7 +806,7 @@ function failureDetail(body) {
|
|
|
804
806
|
}
|
|
805
807
|
|
|
806
808
|
// src/version.ts
|
|
807
|
-
var VERSION = "0.
|
|
809
|
+
var VERSION = "0.5.0";
|
|
808
810
|
|
|
809
811
|
// src/webhooks.ts
|
|
810
812
|
var Webhooks = class {
|