weave-typescript 0.5.1 → 0.9.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/dist/weaveapi/llmx/v1/architecture.pb.d.ts +377 -0
- package/dist/weaveapi/llmx/v1/architecture.pb.js +2756 -0
- package/dist/weaveapi/llmx/v1/capabilities.pb.d.ts +491 -0
- package/dist/weaveapi/llmx/v1/capabilities.pb.js +3159 -0
- package/dist/weaveapi/{modex → llmx}/v1/model.pb.d.ts +86 -42
- package/dist/weaveapi/{modex → llmx}/v1/model.pb.js +119 -442
- package/dist/weaveapi/llmx/v1/pricing.pb.d.ts +142 -0
- package/dist/weaveapi/llmx/v1/pricing.pb.js +825 -0
- package/dist/weaveapi/{modex → llmx}/v1/provider.pb.d.ts +1 -3
- package/dist/weaveapi/{modex → llmx}/v1/provider.pb.js +3 -57
- package/dist/weaveapi/{modex → llmx}/v1/service.pb.d.ts +20 -20
- package/dist/weaveapi/{modex → llmx}/v1/service.pb.js +17 -17
- package/dist/weavesql/llmxdb/capabilities_sql.d.ts +151 -0
- package/dist/weavesql/llmxdb/capabilities_sql.js +241 -0
- package/dist/weavesql/llmxdb/changes_sql.d.ts +81 -0
- package/dist/weavesql/llmxdb/changes_sql.js +118 -0
- package/dist/weavesql/llmxdb/models_sql.d.ts +198 -0
- package/dist/weavesql/llmxdb/models_sql.js +244 -0
- package/dist/weavesql/llmxdb/providers_sql.d.ts +122 -0
- package/dist/weavesql/llmxdb/providers_sql.js +179 -0
- package/dist/weavesql/llmxdb/scraper_runs_sql.d.ts +83 -0
- package/dist/weavesql/llmxdb/scraper_runs_sql.js +137 -0
- package/dist/weavesql/llmxdb/search_sql.d.ts +272 -0
- package/dist/weavesql/llmxdb/search_sql.js +348 -0
- package/dist/weavesql/weavedb/dataset_sql.d.ts +17 -0
- package/dist/weavesql/weavedb/dataset_sql.js +21 -0
- package/dist/weavesql/weavedb/relationships_sql.d.ts +16 -0
- package/dist/weavesql/weavedb/relationships_sql.js +32 -0
- package/dist/weavesql/weavedb/storage_sql.d.ts +33 -0
- package/dist/weavesql/weavedb/storage_sql.js +54 -0
- package/dist/weavesql/weavedb/synthesizer_sql.d.ts +28 -0
- package/dist/weavesql/weavedb/synthesizer_sql.js +42 -0
- package/package.json +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
export declare const protobufPackage = "weaveapi.
|
|
2
|
+
export declare const protobufPackage = "weaveapi.llmx.v1";
|
|
3
3
|
export interface Provider {
|
|
4
4
|
id: string;
|
|
5
5
|
slug: string;
|
|
@@ -10,8 +10,6 @@ export interface Provider {
|
|
|
10
10
|
logoUrl: string;
|
|
11
11
|
isActive: boolean;
|
|
12
12
|
modelCount: number;
|
|
13
|
-
createdAt: Date | undefined;
|
|
14
|
-
updatedAt: Date | undefined;
|
|
15
13
|
}
|
|
16
14
|
export declare const Provider: MessageFns<Provider>;
|
|
17
15
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.6.1
|
|
5
5
|
// protoc unknown
|
|
6
|
-
// source: weaveapi/
|
|
6
|
+
// source: weaveapi/llmx/v1/provider.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.Provider = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
-
|
|
12
|
-
exports.protobufPackage = "weaveapi.modex.v1";
|
|
11
|
+
exports.protobufPackage = "weaveapi.llmx.v1";
|
|
13
12
|
function createBaseProvider() {
|
|
14
13
|
return {
|
|
15
14
|
id: "",
|
|
@@ -21,8 +20,6 @@ function createBaseProvider() {
|
|
|
21
20
|
logoUrl: "",
|
|
22
21
|
isActive: false,
|
|
23
22
|
modelCount: 0,
|
|
24
|
-
createdAt: undefined,
|
|
25
|
-
updatedAt: undefined,
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
25
|
exports.Provider = {
|
|
@@ -54,12 +51,6 @@ exports.Provider = {
|
|
|
54
51
|
if (message.modelCount !== 0) {
|
|
55
52
|
writer.uint32(72).int32(message.modelCount);
|
|
56
53
|
}
|
|
57
|
-
if (message.createdAt !== undefined) {
|
|
58
|
-
timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
|
|
59
|
-
}
|
|
60
|
-
if (message.updatedAt !== undefined) {
|
|
61
|
-
timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
|
|
62
|
-
}
|
|
63
54
|
return writer;
|
|
64
55
|
},
|
|
65
56
|
decode(input, length) {
|
|
@@ -132,20 +123,6 @@ exports.Provider = {
|
|
|
132
123
|
message.modelCount = reader.int32();
|
|
133
124
|
continue;
|
|
134
125
|
}
|
|
135
|
-
case 10: {
|
|
136
|
-
if (tag !== 82) {
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
case 11: {
|
|
143
|
-
if (tag !== 90) {
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
126
|
}
|
|
150
127
|
if ((tag & 7) === 4 || tag === 0) {
|
|
151
128
|
break;
|
|
@@ -165,8 +142,6 @@ exports.Provider = {
|
|
|
165
142
|
logoUrl: isSet(object.logoUrl) ? globalThis.String(object.logoUrl) : "",
|
|
166
143
|
isActive: isSet(object.isActive) ? globalThis.Boolean(object.isActive) : false,
|
|
167
144
|
modelCount: isSet(object.modelCount) ? globalThis.Number(object.modelCount) : 0,
|
|
168
|
-
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
169
|
-
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
170
145
|
};
|
|
171
146
|
},
|
|
172
147
|
toJSON(message) {
|
|
@@ -198,19 +173,13 @@ exports.Provider = {
|
|
|
198
173
|
if (message.modelCount !== 0) {
|
|
199
174
|
obj.modelCount = Math.round(message.modelCount);
|
|
200
175
|
}
|
|
201
|
-
if (message.createdAt !== undefined) {
|
|
202
|
-
obj.createdAt = message.createdAt.toISOString();
|
|
203
|
-
}
|
|
204
|
-
if (message.updatedAt !== undefined) {
|
|
205
|
-
obj.updatedAt = message.updatedAt.toISOString();
|
|
206
|
-
}
|
|
207
176
|
return obj;
|
|
208
177
|
},
|
|
209
178
|
create(base) {
|
|
210
179
|
return exports.Provider.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
211
180
|
},
|
|
212
181
|
fromPartial(object) {
|
|
213
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
214
183
|
const message = createBaseProvider();
|
|
215
184
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
216
185
|
message.slug = (_b = object.slug) !== null && _b !== void 0 ? _b : "";
|
|
@@ -221,32 +190,9 @@ exports.Provider = {
|
|
|
221
190
|
message.logoUrl = (_g = object.logoUrl) !== null && _g !== void 0 ? _g : "";
|
|
222
191
|
message.isActive = (_h = object.isActive) !== null && _h !== void 0 ? _h : false;
|
|
223
192
|
message.modelCount = (_j = object.modelCount) !== null && _j !== void 0 ? _j : 0;
|
|
224
|
-
message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
|
|
225
|
-
message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
|
|
226
193
|
return message;
|
|
227
194
|
},
|
|
228
195
|
};
|
|
229
|
-
function toTimestamp(date) {
|
|
230
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
231
|
-
const nanos = (date.getTime() % 1000) * 1000000;
|
|
232
|
-
return { seconds, nanos };
|
|
233
|
-
}
|
|
234
|
-
function fromTimestamp(t) {
|
|
235
|
-
let millis = (t.seconds || 0) * 1000;
|
|
236
|
-
millis += (t.nanos || 0) / 1000000;
|
|
237
|
-
return new globalThis.Date(millis);
|
|
238
|
-
}
|
|
239
|
-
function fromJsonTimestamp(o) {
|
|
240
|
-
if (o instanceof globalThis.Date) {
|
|
241
|
-
return o;
|
|
242
|
-
}
|
|
243
|
-
else if (typeof o === "string") {
|
|
244
|
-
return new globalThis.Date(o);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
196
|
function isSet(value) {
|
|
251
197
|
return value !== null && value !== undefined;
|
|
252
198
|
}
|
|
@@ -2,7 +2,7 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
3
|
import { Model } from "./model.pb";
|
|
4
4
|
import { Provider } from "./provider.pb";
|
|
5
|
-
export declare const protobufPackage = "weaveapi.
|
|
5
|
+
export declare const protobufPackage = "weaveapi.llmx.v1";
|
|
6
6
|
export interface ListProvidersRequest {
|
|
7
7
|
pageSize: number;
|
|
8
8
|
pageToken: string;
|
|
@@ -328,10 +328,10 @@ export declare const ProviderStats: MessageFns<ProviderStats>;
|
|
|
328
328
|
export declare const TypeStats: MessageFns<TypeStats>;
|
|
329
329
|
export declare const PricingStats: MessageFns<PricingStats>;
|
|
330
330
|
export declare const RecentActivity: MessageFns<RecentActivity>;
|
|
331
|
-
export type
|
|
332
|
-
export declare const
|
|
331
|
+
export type LlmXService = typeof LlmXService;
|
|
332
|
+
export declare const LlmXService: {
|
|
333
333
|
readonly listProviders: {
|
|
334
|
-
readonly path: "/weaveapi.
|
|
334
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/ListProviders";
|
|
335
335
|
readonly requestStream: false;
|
|
336
336
|
readonly responseStream: false;
|
|
337
337
|
readonly requestSerialize: (value: ListProvidersRequest) => Buffer<ArrayBuffer>;
|
|
@@ -340,7 +340,7 @@ export declare const ModexService: {
|
|
|
340
340
|
readonly responseDeserialize: (value: Buffer) => ListProvidersResponse;
|
|
341
341
|
};
|
|
342
342
|
readonly getProvider: {
|
|
343
|
-
readonly path: "/weaveapi.
|
|
343
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetProvider";
|
|
344
344
|
readonly requestStream: false;
|
|
345
345
|
readonly responseStream: false;
|
|
346
346
|
readonly requestSerialize: (value: GetProviderRequest) => Buffer<ArrayBuffer>;
|
|
@@ -349,7 +349,7 @@ export declare const ModexService: {
|
|
|
349
349
|
readonly responseDeserialize: (value: Buffer) => GetProviderResponse;
|
|
350
350
|
};
|
|
351
351
|
readonly listModels: {
|
|
352
|
-
readonly path: "/weaveapi.
|
|
352
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/ListModels";
|
|
353
353
|
readonly requestStream: false;
|
|
354
354
|
readonly responseStream: false;
|
|
355
355
|
readonly requestSerialize: (value: ListModelsRequest) => Buffer<ArrayBuffer>;
|
|
@@ -358,7 +358,7 @@ export declare const ModexService: {
|
|
|
358
358
|
readonly responseDeserialize: (value: Buffer) => ListModelsResponse;
|
|
359
359
|
};
|
|
360
360
|
readonly getModel: {
|
|
361
|
-
readonly path: "/weaveapi.
|
|
361
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetModel";
|
|
362
362
|
readonly requestStream: false;
|
|
363
363
|
readonly responseStream: false;
|
|
364
364
|
readonly requestSerialize: (value: GetModelRequest) => Buffer<ArrayBuffer>;
|
|
@@ -367,7 +367,7 @@ export declare const ModexService: {
|
|
|
367
367
|
readonly responseDeserialize: (value: Buffer) => GetModelResponse;
|
|
368
368
|
};
|
|
369
369
|
readonly searchModels: {
|
|
370
|
-
readonly path: "/weaveapi.
|
|
370
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/SearchModels";
|
|
371
371
|
readonly requestStream: false;
|
|
372
372
|
readonly responseStream: false;
|
|
373
373
|
readonly requestSerialize: (value: SearchModelsRequest) => Buffer<ArrayBuffer>;
|
|
@@ -376,7 +376,7 @@ export declare const ModexService: {
|
|
|
376
376
|
readonly responseDeserialize: (value: Buffer) => SearchModelsResponse;
|
|
377
377
|
};
|
|
378
378
|
readonly compareModels: {
|
|
379
|
-
readonly path: "/weaveapi.
|
|
379
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/CompareModels";
|
|
380
380
|
readonly requestStream: false;
|
|
381
381
|
readonly responseStream: false;
|
|
382
382
|
readonly requestSerialize: (value: CompareModelsRequest) => Buffer<ArrayBuffer>;
|
|
@@ -385,7 +385,7 @@ export declare const ModexService: {
|
|
|
385
385
|
readonly responseDeserialize: (value: Buffer) => CompareModelsResponse;
|
|
386
386
|
};
|
|
387
387
|
readonly getModelPriceHistory: {
|
|
388
|
-
readonly path: "/weaveapi.
|
|
388
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetModelPriceHistory";
|
|
389
389
|
readonly requestStream: false;
|
|
390
390
|
readonly responseStream: false;
|
|
391
391
|
readonly requestSerialize: (value: GetModelPriceHistoryRequest) => Buffer<ArrayBuffer>;
|
|
@@ -394,7 +394,7 @@ export declare const ModexService: {
|
|
|
394
394
|
readonly responseDeserialize: (value: Buffer) => GetModelPriceHistoryResponse;
|
|
395
395
|
};
|
|
396
396
|
readonly getModelChanges: {
|
|
397
|
-
readonly path: "/weaveapi.
|
|
397
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetModelChanges";
|
|
398
398
|
readonly requestStream: false;
|
|
399
399
|
readonly responseStream: false;
|
|
400
400
|
readonly requestSerialize: (value: GetModelChangesRequest) => Buffer<ArrayBuffer>;
|
|
@@ -403,7 +403,7 @@ export declare const ModexService: {
|
|
|
403
403
|
readonly responseDeserialize: (value: Buffer) => GetModelChangesResponse;
|
|
404
404
|
};
|
|
405
405
|
readonly getTrendingModels: {
|
|
406
|
-
readonly path: "/weaveapi.
|
|
406
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetTrendingModels";
|
|
407
407
|
readonly requestStream: false;
|
|
408
408
|
readonly responseStream: false;
|
|
409
409
|
readonly requestSerialize: (value: GetTrendingModelsRequest) => Buffer<ArrayBuffer>;
|
|
@@ -412,7 +412,7 @@ export declare const ModexService: {
|
|
|
412
412
|
readonly responseDeserialize: (value: Buffer) => GetTrendingModelsResponse;
|
|
413
413
|
};
|
|
414
414
|
readonly getRecentUpdates: {
|
|
415
|
-
readonly path: "/weaveapi.
|
|
415
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetRecentUpdates";
|
|
416
416
|
readonly requestStream: false;
|
|
417
417
|
readonly responseStream: false;
|
|
418
418
|
readonly requestSerialize: (value: GetRecentUpdatesRequest) => Buffer<ArrayBuffer>;
|
|
@@ -421,7 +421,7 @@ export declare const ModexService: {
|
|
|
421
421
|
readonly responseDeserialize: (value: Buffer) => GetRecentUpdatesResponse;
|
|
422
422
|
};
|
|
423
423
|
readonly exportData: {
|
|
424
|
-
readonly path: "/weaveapi.
|
|
424
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/ExportData";
|
|
425
425
|
readonly requestStream: false;
|
|
426
426
|
readonly responseStream: false;
|
|
427
427
|
readonly requestSerialize: (value: ExportDataRequest) => Buffer<ArrayBuffer>;
|
|
@@ -430,7 +430,7 @@ export declare const ModexService: {
|
|
|
430
430
|
readonly responseDeserialize: (value: Buffer) => ExportDataResponse;
|
|
431
431
|
};
|
|
432
432
|
readonly getStatistics: {
|
|
433
|
-
readonly path: "/weaveapi.
|
|
433
|
+
readonly path: "/weaveapi.llmx.v1.LlmX/GetStatistics";
|
|
434
434
|
readonly requestStream: false;
|
|
435
435
|
readonly responseStream: false;
|
|
436
436
|
readonly requestSerialize: (value: GetStatisticsRequest) => Buffer<ArrayBuffer>;
|
|
@@ -439,7 +439,7 @@ export declare const ModexService: {
|
|
|
439
439
|
readonly responseDeserialize: (value: Buffer) => GetStatisticsResponse;
|
|
440
440
|
};
|
|
441
441
|
};
|
|
442
|
-
export interface
|
|
442
|
+
export interface LlmXServer extends UntypedServiceImplementation {
|
|
443
443
|
listProviders: handleUnaryCall<ListProvidersRequest, ListProvidersResponse>;
|
|
444
444
|
getProvider: handleUnaryCall<GetProviderRequest, GetProviderResponse>;
|
|
445
445
|
listModels: handleUnaryCall<ListModelsRequest, ListModelsResponse>;
|
|
@@ -453,7 +453,7 @@ export interface ModexServer extends UntypedServiceImplementation {
|
|
|
453
453
|
exportData: handleUnaryCall<ExportDataRequest, ExportDataResponse>;
|
|
454
454
|
getStatistics: handleUnaryCall<GetStatisticsRequest, GetStatisticsResponse>;
|
|
455
455
|
}
|
|
456
|
-
export interface
|
|
456
|
+
export interface LlmXClient extends Client {
|
|
457
457
|
listProviders(request: ListProvidersRequest, callback: (error: ServiceError | null, response: ListProvidersResponse) => void): ClientUnaryCall;
|
|
458
458
|
listProviders(request: ListProvidersRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListProvidersResponse) => void): ClientUnaryCall;
|
|
459
459
|
listProviders(request: ListProvidersRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListProvidersResponse) => void): ClientUnaryCall;
|
|
@@ -491,9 +491,9 @@ export interface ModexClient extends Client {
|
|
|
491
491
|
getStatistics(request: GetStatisticsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetStatisticsResponse) => void): ClientUnaryCall;
|
|
492
492
|
getStatistics(request: GetStatisticsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetStatisticsResponse) => void): ClientUnaryCall;
|
|
493
493
|
}
|
|
494
|
-
export declare const
|
|
495
|
-
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>):
|
|
496
|
-
service: typeof
|
|
494
|
+
export declare const LlmXClient: {
|
|
495
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): LlmXClient;
|
|
496
|
+
service: typeof LlmXService;
|
|
497
497
|
serviceName: string;
|
|
498
498
|
};
|
|
499
499
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.6.1
|
|
5
5
|
// protoc unknown
|
|
6
|
-
// source: weaveapi/
|
|
6
|
+
// source: weaveapi/llmx/v1/service.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
exports.LlmXClient = exports.LlmXService = exports.RecentActivity = exports.PricingStats = exports.TypeStats = exports.ProviderStats = exports.OverallStats = exports.GetStatisticsResponse = exports.GetStatisticsRequest = exports.ExportDataResponse = exports.ExportDataRequest = exports.UpdateEntry = exports.GetRecentUpdatesResponse = exports.GetRecentUpdatesRequest = exports.TrendingModel = exports.GetTrendingModelsResponse = exports.GetTrendingModelsRequest = exports.ModelChange = exports.GetModelChangesResponse = exports.GetModelChangesRequest = exports.PriceChange = exports.PricePoint = exports.GetModelPriceHistoryResponse = exports.GetModelPriceHistoryRequest = exports.ComparisonSummary = exports.ModelComparison_HighlightedDifferencesEntry = exports.ModelComparison = exports.CompareModelsResponse = exports.CompareModelsRequest = exports.FacetValue = exports.FacetResult = exports.SearchModelsResponse = exports.PerformanceRange = exports.TokenRange = exports.PriceRange = exports.SearchModelsRequest = exports.GetModelResponse = exports.GetModelRequest = exports.ListModelsResponse = exports.ListModelsRequest = exports.GetProviderResponse = exports.GetProviderRequest = exports.ListProvidersResponse = exports.ListProvidersRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
12
12
|
const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
|
|
13
13
|
const model_pb_1 = require("./model.pb");
|
|
14
14
|
const provider_pb_1 = require("./provider.pb");
|
|
15
|
-
exports.protobufPackage = "weaveapi.
|
|
15
|
+
exports.protobufPackage = "weaveapi.llmx.v1";
|
|
16
16
|
function createBaseListProvidersRequest() {
|
|
17
17
|
return { pageSize: 0, pageToken: "", activeOnly: false };
|
|
18
18
|
}
|
|
@@ -4266,9 +4266,9 @@ exports.RecentActivity = {
|
|
|
4266
4266
|
return message;
|
|
4267
4267
|
},
|
|
4268
4268
|
};
|
|
4269
|
-
exports.
|
|
4269
|
+
exports.LlmXService = {
|
|
4270
4270
|
listProviders: {
|
|
4271
|
-
path: "/weaveapi.
|
|
4271
|
+
path: "/weaveapi.llmx.v1.LlmX/ListProviders",
|
|
4272
4272
|
requestStream: false,
|
|
4273
4273
|
responseStream: false,
|
|
4274
4274
|
requestSerialize: (value) => Buffer.from(exports.ListProvidersRequest.encode(value).finish()),
|
|
@@ -4277,7 +4277,7 @@ exports.ModexService = {
|
|
|
4277
4277
|
responseDeserialize: (value) => exports.ListProvidersResponse.decode(value),
|
|
4278
4278
|
},
|
|
4279
4279
|
getProvider: {
|
|
4280
|
-
path: "/weaveapi.
|
|
4280
|
+
path: "/weaveapi.llmx.v1.LlmX/GetProvider",
|
|
4281
4281
|
requestStream: false,
|
|
4282
4282
|
responseStream: false,
|
|
4283
4283
|
requestSerialize: (value) => Buffer.from(exports.GetProviderRequest.encode(value).finish()),
|
|
@@ -4286,7 +4286,7 @@ exports.ModexService = {
|
|
|
4286
4286
|
responseDeserialize: (value) => exports.GetProviderResponse.decode(value),
|
|
4287
4287
|
},
|
|
4288
4288
|
listModels: {
|
|
4289
|
-
path: "/weaveapi.
|
|
4289
|
+
path: "/weaveapi.llmx.v1.LlmX/ListModels",
|
|
4290
4290
|
requestStream: false,
|
|
4291
4291
|
responseStream: false,
|
|
4292
4292
|
requestSerialize: (value) => Buffer.from(exports.ListModelsRequest.encode(value).finish()),
|
|
@@ -4295,7 +4295,7 @@ exports.ModexService = {
|
|
|
4295
4295
|
responseDeserialize: (value) => exports.ListModelsResponse.decode(value),
|
|
4296
4296
|
},
|
|
4297
4297
|
getModel: {
|
|
4298
|
-
path: "/weaveapi.
|
|
4298
|
+
path: "/weaveapi.llmx.v1.LlmX/GetModel",
|
|
4299
4299
|
requestStream: false,
|
|
4300
4300
|
responseStream: false,
|
|
4301
4301
|
requestSerialize: (value) => Buffer.from(exports.GetModelRequest.encode(value).finish()),
|
|
@@ -4304,7 +4304,7 @@ exports.ModexService = {
|
|
|
4304
4304
|
responseDeserialize: (value) => exports.GetModelResponse.decode(value),
|
|
4305
4305
|
},
|
|
4306
4306
|
searchModels: {
|
|
4307
|
-
path: "/weaveapi.
|
|
4307
|
+
path: "/weaveapi.llmx.v1.LlmX/SearchModels",
|
|
4308
4308
|
requestStream: false,
|
|
4309
4309
|
responseStream: false,
|
|
4310
4310
|
requestSerialize: (value) => Buffer.from(exports.SearchModelsRequest.encode(value).finish()),
|
|
@@ -4313,7 +4313,7 @@ exports.ModexService = {
|
|
|
4313
4313
|
responseDeserialize: (value) => exports.SearchModelsResponse.decode(value),
|
|
4314
4314
|
},
|
|
4315
4315
|
compareModels: {
|
|
4316
|
-
path: "/weaveapi.
|
|
4316
|
+
path: "/weaveapi.llmx.v1.LlmX/CompareModels",
|
|
4317
4317
|
requestStream: false,
|
|
4318
4318
|
responseStream: false,
|
|
4319
4319
|
requestSerialize: (value) => Buffer.from(exports.CompareModelsRequest.encode(value).finish()),
|
|
@@ -4322,7 +4322,7 @@ exports.ModexService = {
|
|
|
4322
4322
|
responseDeserialize: (value) => exports.CompareModelsResponse.decode(value),
|
|
4323
4323
|
},
|
|
4324
4324
|
getModelPriceHistory: {
|
|
4325
|
-
path: "/weaveapi.
|
|
4325
|
+
path: "/weaveapi.llmx.v1.LlmX/GetModelPriceHistory",
|
|
4326
4326
|
requestStream: false,
|
|
4327
4327
|
responseStream: false,
|
|
4328
4328
|
requestSerialize: (value) => Buffer.from(exports.GetModelPriceHistoryRequest.encode(value).finish()),
|
|
@@ -4331,7 +4331,7 @@ exports.ModexService = {
|
|
|
4331
4331
|
responseDeserialize: (value) => exports.GetModelPriceHistoryResponse.decode(value),
|
|
4332
4332
|
},
|
|
4333
4333
|
getModelChanges: {
|
|
4334
|
-
path: "/weaveapi.
|
|
4334
|
+
path: "/weaveapi.llmx.v1.LlmX/GetModelChanges",
|
|
4335
4335
|
requestStream: false,
|
|
4336
4336
|
responseStream: false,
|
|
4337
4337
|
requestSerialize: (value) => Buffer.from(exports.GetModelChangesRequest.encode(value).finish()),
|
|
@@ -4340,7 +4340,7 @@ exports.ModexService = {
|
|
|
4340
4340
|
responseDeserialize: (value) => exports.GetModelChangesResponse.decode(value),
|
|
4341
4341
|
},
|
|
4342
4342
|
getTrendingModels: {
|
|
4343
|
-
path: "/weaveapi.
|
|
4343
|
+
path: "/weaveapi.llmx.v1.LlmX/GetTrendingModels",
|
|
4344
4344
|
requestStream: false,
|
|
4345
4345
|
responseStream: false,
|
|
4346
4346
|
requestSerialize: (value) => Buffer.from(exports.GetTrendingModelsRequest.encode(value).finish()),
|
|
@@ -4349,7 +4349,7 @@ exports.ModexService = {
|
|
|
4349
4349
|
responseDeserialize: (value) => exports.GetTrendingModelsResponse.decode(value),
|
|
4350
4350
|
},
|
|
4351
4351
|
getRecentUpdates: {
|
|
4352
|
-
path: "/weaveapi.
|
|
4352
|
+
path: "/weaveapi.llmx.v1.LlmX/GetRecentUpdates",
|
|
4353
4353
|
requestStream: false,
|
|
4354
4354
|
responseStream: false,
|
|
4355
4355
|
requestSerialize: (value) => Buffer.from(exports.GetRecentUpdatesRequest.encode(value).finish()),
|
|
@@ -4358,7 +4358,7 @@ exports.ModexService = {
|
|
|
4358
4358
|
responseDeserialize: (value) => exports.GetRecentUpdatesResponse.decode(value),
|
|
4359
4359
|
},
|
|
4360
4360
|
exportData: {
|
|
4361
|
-
path: "/weaveapi.
|
|
4361
|
+
path: "/weaveapi.llmx.v1.LlmX/ExportData",
|
|
4362
4362
|
requestStream: false,
|
|
4363
4363
|
responseStream: false,
|
|
4364
4364
|
requestSerialize: (value) => Buffer.from(exports.ExportDataRequest.encode(value).finish()),
|
|
@@ -4367,7 +4367,7 @@ exports.ModexService = {
|
|
|
4367
4367
|
responseDeserialize: (value) => exports.ExportDataResponse.decode(value),
|
|
4368
4368
|
},
|
|
4369
4369
|
getStatistics: {
|
|
4370
|
-
path: "/weaveapi.
|
|
4370
|
+
path: "/weaveapi.llmx.v1.LlmX/GetStatistics",
|
|
4371
4371
|
requestStream: false,
|
|
4372
4372
|
responseStream: false,
|
|
4373
4373
|
requestSerialize: (value) => Buffer.from(exports.GetStatisticsRequest.encode(value).finish()),
|
|
@@ -4376,7 +4376,7 @@ exports.ModexService = {
|
|
|
4376
4376
|
responseDeserialize: (value) => exports.GetStatisticsResponse.decode(value),
|
|
4377
4377
|
},
|
|
4378
4378
|
};
|
|
4379
|
-
exports.
|
|
4379
|
+
exports.LlmXClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.LlmXService, "weaveapi.llmx.v1.LlmX");
|
|
4380
4380
|
function bytesFromBase64(b64) {
|
|
4381
4381
|
if (globalThis.Buffer) {
|
|
4382
4382
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
2
|
+
interface Client {
|
|
3
|
+
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
|
+
}
|
|
5
|
+
export declare const getModelsWithCapabilityQuery = "-- name: GetModelsWithCapability :many\nSELECT id, provider_id, model_id, slug, name, display_name, description, version, capabilities, classification, architecture, performance, token_info, pricing, api_details, training, licensing, safety, availability, technical_specs, release_date, training_data_cutoff, deprecation_date, metadata, last_scraped_at, is_active, is_deprecated, created_at, updated_at\nFROM llm_models\nWHERE is_active = true\n AND capabilities->'configs' ? $1\n AND ($2::uuid IS NULL OR provider_id = $2)\nORDER BY provider_id, name";
|
|
6
|
+
export interface GetModelsWithCapabilityArgs {
|
|
7
|
+
capabilityType: any;
|
|
8
|
+
providerId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetModelsWithCapabilityRow {
|
|
11
|
+
id: string;
|
|
12
|
+
providerId: string;
|
|
13
|
+
modelId: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
name: string;
|
|
16
|
+
displayName: string | null;
|
|
17
|
+
description: string | null;
|
|
18
|
+
version: string | null;
|
|
19
|
+
capabilities: any;
|
|
20
|
+
classification: any;
|
|
21
|
+
architecture: any;
|
|
22
|
+
performance: any;
|
|
23
|
+
tokenInfo: any;
|
|
24
|
+
pricing: any;
|
|
25
|
+
apiDetails: any;
|
|
26
|
+
training: any;
|
|
27
|
+
licensing: any;
|
|
28
|
+
safety: any;
|
|
29
|
+
availability: any;
|
|
30
|
+
technicalSpecs: any;
|
|
31
|
+
releaseDate: Date | null;
|
|
32
|
+
trainingDataCutoff: Date | null;
|
|
33
|
+
deprecationDate: Date | null;
|
|
34
|
+
metadata: any;
|
|
35
|
+
lastScrapedAt: Date | null;
|
|
36
|
+
isActive: boolean | null;
|
|
37
|
+
isDeprecated: boolean | null;
|
|
38
|
+
createdAt: Date | null;
|
|
39
|
+
updatedAt: Date | null;
|
|
40
|
+
}
|
|
41
|
+
export declare function getModelsWithCapability(client: Client, args: GetModelsWithCapabilityArgs): Promise<GetModelsWithCapabilityRow[]>;
|
|
42
|
+
export declare const getModelCapabilitiesQuery = "-- name: GetModelCapabilities :one\nSELECT capabilities\nFROM llm_models\nWHERE slug = $1\n AND is_active = true";
|
|
43
|
+
export interface GetModelCapabilitiesArgs {
|
|
44
|
+
slug: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetModelCapabilitiesRow {
|
|
47
|
+
capabilities: any;
|
|
48
|
+
}
|
|
49
|
+
export declare function getModelCapabilities(client: Client, args: GetModelCapabilitiesArgs): Promise<GetModelCapabilitiesRow | null>;
|
|
50
|
+
export declare const getCapabilityConfigQuery = "-- name: GetCapabilityConfig :one\nSELECT capabilities->'configs'->@capability_type as config\nFROM llm_models\nWHERE slug = $1\n AND is_active = true";
|
|
51
|
+
export interface GetCapabilityConfigArgs {
|
|
52
|
+
slug: string;
|
|
53
|
+
}
|
|
54
|
+
export interface GetCapabilityConfigRow {
|
|
55
|
+
config: string | null;
|
|
56
|
+
}
|
|
57
|
+
export declare function getCapabilityConfig(client: Client, args: GetCapabilityConfigArgs): Promise<GetCapabilityConfigRow | null>;
|
|
58
|
+
export declare const checkModelHasCapabilityQuery = "-- name: CheckModelHasCapability :one\nSELECT EXISTS (\n SELECT 1 \n FROM llm_models \n WHERE id = $1 \n AND capabilities->'configs' ? $2\n) as has_capability";
|
|
59
|
+
export interface CheckModelHasCapabilityArgs {
|
|
60
|
+
modelId: string;
|
|
61
|
+
capabilityType: any;
|
|
62
|
+
}
|
|
63
|
+
export interface CheckModelHasCapabilityRow {
|
|
64
|
+
hasCapability: boolean;
|
|
65
|
+
}
|
|
66
|
+
export declare function checkModelHasCapability(client: Client, args: CheckModelHasCapabilityArgs): Promise<CheckModelHasCapabilityRow | null>;
|
|
67
|
+
export declare const getModelCapabilityTypesQuery = "-- name: GetModelCapabilityTypes :many\nSELECT jsonb_object_keys(capabilities->'configs') as capability_type\nFROM llm_models\nWHERE id = $1\nORDER BY 1";
|
|
68
|
+
export interface GetModelCapabilityTypesArgs {
|
|
69
|
+
modelId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface GetModelCapabilityTypesRow {
|
|
72
|
+
capabilityType: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function getModelCapabilityTypes(client: Client, args: GetModelCapabilityTypesArgs): Promise<GetModelCapabilityTypesRow[]>;
|
|
75
|
+
export declare const getModelsWithStructuredResponseQuery = "-- name: GetModelsWithStructuredResponse :many\nSELECT m.id, m.provider_id, m.model_id, m.slug, m.name, m.display_name, m.description, m.version, m.capabilities, m.classification, m.architecture, m.performance, m.token_info, m.pricing, m.api_details, m.training, m.licensing, m.safety, m.availability, m.technical_specs, m.release_date, m.training_data_cutoff, m.deprecation_date, m.metadata, m.last_scraped_at, m.is_active, m.is_deprecated, m.created_at, m.updated_at, \n c.config->>'max_schema_depth' as max_schema_depth,\n c.config->>'requires_json_mode' as requires_json_mode\nFROM llm_models m,\n LATERAL (\n SELECT capabilities->'configs'->'CAPABILITY_TYPE_STRUCTURED_RESPONSE' as config\n ) c\nWHERE m.is_active = true\n AND m.capabilities->'configs' ? 'CAPABILITY_TYPE_STRUCTURED_RESPONSE'\n AND ($1::uuid IS NULL OR m.provider_id = $1)\nORDER BY m.provider_id, m.name";
|
|
76
|
+
export interface GetModelsWithStructuredResponseArgs {
|
|
77
|
+
providerId: string;
|
|
78
|
+
}
|
|
79
|
+
export interface GetModelsWithStructuredResponseRow {
|
|
80
|
+
id: string;
|
|
81
|
+
providerId: string;
|
|
82
|
+
modelId: string;
|
|
83
|
+
slug: string;
|
|
84
|
+
name: string;
|
|
85
|
+
displayName: string | null;
|
|
86
|
+
description: string | null;
|
|
87
|
+
version: string | null;
|
|
88
|
+
capabilities: any;
|
|
89
|
+
classification: any;
|
|
90
|
+
architecture: any;
|
|
91
|
+
performance: any;
|
|
92
|
+
tokenInfo: any;
|
|
93
|
+
pricing: any;
|
|
94
|
+
apiDetails: any;
|
|
95
|
+
training: any;
|
|
96
|
+
licensing: any;
|
|
97
|
+
safety: any;
|
|
98
|
+
availability: any;
|
|
99
|
+
technicalSpecs: any;
|
|
100
|
+
releaseDate: Date | null;
|
|
101
|
+
trainingDataCutoff: Date | null;
|
|
102
|
+
deprecationDate: Date | null;
|
|
103
|
+
metadata: any;
|
|
104
|
+
lastScrapedAt: Date | null;
|
|
105
|
+
isActive: boolean | null;
|
|
106
|
+
isDeprecated: boolean | null;
|
|
107
|
+
createdAt: Date | null;
|
|
108
|
+
updatedAt: Date | null;
|
|
109
|
+
maxSchemaDepth: string | null;
|
|
110
|
+
requiresJsonMode: string | null;
|
|
111
|
+
}
|
|
112
|
+
export declare function getModelsWithStructuredResponse(client: Client, args: GetModelsWithStructuredResponseArgs): Promise<GetModelsWithStructuredResponseRow[]>;
|
|
113
|
+
export declare const getModelsWithVisionQuery = "-- name: GetModelsWithVision :many\nSELECT m.id, m.provider_id, m.model_id, m.slug, m.name, m.display_name, m.description, m.version, m.capabilities, m.classification, m.architecture, m.performance, m.token_info, m.pricing, m.api_details, m.training, m.licensing, m.safety, m.availability, m.technical_specs, m.release_date, m.training_data_cutoff, m.deprecation_date, m.metadata, m.last_scraped_at, m.is_active, m.is_deprecated, m.created_at, m.updated_at,\n c.config->>'max_images_per_request' as max_images,\n c.config->>'supported_formats' as formats\nFROM llm_models m,\n LATERAL (\n SELECT capabilities->'configs'->'CAPABILITY_TYPE_VISION' as config\n ) c\nWHERE m.is_active = true\n AND m.capabilities->'configs' ? 'CAPABILITY_TYPE_VISION'\n AND ($1::boolean IS NULL OR (c.config->>'supports_ocr')::boolean = $1)\nORDER BY m.provider_id, m.name";
|
|
114
|
+
export interface GetModelsWithVisionArgs {
|
|
115
|
+
supportsOcr: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface GetModelsWithVisionRow {
|
|
118
|
+
id: string;
|
|
119
|
+
providerId: string;
|
|
120
|
+
modelId: string;
|
|
121
|
+
slug: string;
|
|
122
|
+
name: string;
|
|
123
|
+
displayName: string | null;
|
|
124
|
+
description: string | null;
|
|
125
|
+
version: string | null;
|
|
126
|
+
capabilities: any;
|
|
127
|
+
classification: any;
|
|
128
|
+
architecture: any;
|
|
129
|
+
performance: any;
|
|
130
|
+
tokenInfo: any;
|
|
131
|
+
pricing: any;
|
|
132
|
+
apiDetails: any;
|
|
133
|
+
training: any;
|
|
134
|
+
licensing: any;
|
|
135
|
+
safety: any;
|
|
136
|
+
availability: any;
|
|
137
|
+
technicalSpecs: any;
|
|
138
|
+
releaseDate: Date | null;
|
|
139
|
+
trainingDataCutoff: Date | null;
|
|
140
|
+
deprecationDate: Date | null;
|
|
141
|
+
metadata: any;
|
|
142
|
+
lastScrapedAt: Date | null;
|
|
143
|
+
isActive: boolean | null;
|
|
144
|
+
isDeprecated: boolean | null;
|
|
145
|
+
createdAt: Date | null;
|
|
146
|
+
updatedAt: Date | null;
|
|
147
|
+
maxImages: string | null;
|
|
148
|
+
formats: string | null;
|
|
149
|
+
}
|
|
150
|
+
export declare function getModelsWithVision(client: Client, args: GetModelsWithVisionArgs): Promise<GetModelsWithVisionRow[]>;
|
|
151
|
+
export {};
|