weave-typescript 0.8.0 → 0.10.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.
@@ -1,133 +1,252 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Architecture, Licensing, Safety, TechnicalSpecs, Training } from "./architecture.pb";
3
3
  import { Capability } from "./capabilities.pb";
4
+ import { Pricing } from "./pricing.pb";
4
5
  export declare const protobufPackage = "weaveapi.llmx.v1";
6
+ /**
7
+ * Model represents a complete AI model with all its metadata, capabilities, and pricing.
8
+ * This is the primary entity for model discovery and comparison.
9
+ */
5
10
  export interface Model {
6
- /** Unique internal identifier for this model record in our database */
11
+ /**
12
+ * Unique internal identifier for this model record in our database.
13
+ * Example: "mdl_01234567-89ab-cdef-0123-456789abcdef"
14
+ * Generated by our system, not provider-specific
15
+ */
7
16
  id: string;
8
- /** Provider's unique identifier (e.g., "openai-123", "anthropic-456") */
17
+ /**
18
+ * Provider's unique identifier in our system.
19
+ * Example: "pvd_openai_2024", "pvd_anthropic_2024"
20
+ * Links to Provider entity
21
+ */
9
22
  providerId: string;
10
- /** URL-friendly provider identifier (e.g., "openai", "anthropic") */
23
+ /**
24
+ * URL-friendly provider identifier for routing.
25
+ * Examples: "openai", "anthropic", "google", "meta"
26
+ * Used in API paths like /models/openai/gpt-4
27
+ */
11
28
  providerSlug: string;
12
- /** Human-readable provider name (e.g., "OpenAI", "Anthropic") */
29
+ /**
30
+ * Human-readable provider name for display.
31
+ * Examples: "OpenAI", "Anthropic", "Google AI", "Meta AI"
32
+ */
13
33
  providerName: string;
14
- /** Provider's specific model identifier (e.g., "gpt-4", "claude-3-opus") */
34
+ /**
35
+ * Provider's specific model identifier as they define it.
36
+ * Examples: "gpt-4-turbo-2024-04-09", "claude-3-opus-20240229"
37
+ * This is what you use in their API calls
38
+ */
15
39
  modelId: string;
16
- /** Combined provider/model identifier (e.g., "openai/gpt-4") */
40
+ /**
41
+ * Combined provider/model identifier for unique referencing.
42
+ * Format: "{provider_slug}/{model_id}"
43
+ * Examples: "openai/gpt-4", "anthropic/claude-3-opus"
44
+ */
17
45
  slug: string;
18
- /** Model's technical name (e.g., "gpt-4-turbo-2024-04-09") */
46
+ /**
47
+ * Model's full technical name from the provider.
48
+ * Examples: "gpt-4-turbo-2024-04-09", "claude-3-opus-20240229"
49
+ * May include version dates or technical details
50
+ */
19
51
  name: string;
20
- /** User-friendly display name (e.g., "GPT-4 Turbo") */
52
+ /**
53
+ * User-friendly display name for UI presentation.
54
+ * Examples: "GPT-4 Turbo", "Claude 3 Opus", "Gemini Pro"
55
+ * Simplified version of technical name
56
+ */
21
57
  displayName: string;
22
- /** Human-readable description of the model's purpose and capabilities */
58
+ /**
59
+ * Human-readable description of the model's purpose and capabilities.
60
+ * Example: "Most capable GPT-4 model, optimized for complex tasks requiring
61
+ * advanced reasoning, coding, and creative writing. Supports vision, function
62
+ * calling, and JSON mode."
63
+ */
23
64
  description: string;
24
- /** Model version string (e.g., "2024-04-09", "v1.0") */
65
+ /**
66
+ * Model version string from provider.
67
+ * Examples: "2024-04-09", "v1.0", "preview-0125"
68
+ * May be date-based or semantic versioning
69
+ */
25
70
  version: string;
26
71
  /**
27
- * Dates
28
- * When the model was publicly released
72
+ * When the model was publicly released by the provider.
73
+ * Example: 2024-04-09 for GPT-4 Turbo April release
29
74
  */
30
75
  releaseDate: Date | undefined;
31
- /** Last date of data used in training (knowledge cutoff) */
76
+ /**
77
+ * Last date of data used in training (knowledge cutoff).
78
+ * Example: 2023-12-01 means model knows events up to this date
79
+ * Important for factual queries and current events
80
+ */
32
81
  trainingDataCutoff: Date | undefined;
33
- /** When the model will be/was deprecated (if applicable) */
82
+ /**
83
+ * When the model will be/was deprecated (if scheduled).
84
+ * Example: 2025-01-15 for planned sunset
85
+ * Null if no deprecation planned
86
+ */
34
87
  deprecationDate: Date | undefined;
35
88
  /**
36
- * Capabilities - now uses detailed capability configurations
37
- * List of specific capabilities this model supports (e.g., function calling, vision)
89
+ * List of specific capabilities this model supports.
90
+ * Examples: text_generation, function_calling, vision, code_interpreter
91
+ * See capabilities.proto for full enumeration
38
92
  */
39
93
  capabilities: Capability[];
40
94
  /**
41
- * Classification
42
- * Model type, architecture, and licensing information
95
+ * Model type, architecture, and licensing classification.
96
+ * Categorizes the model for filtering and comparison
43
97
  */
44
98
  classification: ModelClassification | undefined;
45
99
  /**
46
- * Performance
47
- * Benchmark scores and performance metrics
100
+ * Benchmark scores and performance metrics.
101
+ * Standardized scores for comparing model capabilities
48
102
  */
49
103
  performance: ModelPerformance | undefined;
50
104
  /**
51
- * Tokens
52
- * Token limits, processing speed, and tokenizer information
105
+ * Token limits, processing speed, and tokenizer information.
106
+ * Critical for understanding model constraints
53
107
  */
54
108
  tokens: TokenInfo | undefined;
55
109
  /**
56
- * Pricing
57
- * Cost per token for various operations (input, output, caching, etc.)
110
+ * Complete pricing structure for all operations.
111
+ * Includes standard, batch, cached, and tool pricing
58
112
  */
59
113
  pricing: Pricing | undefined;
60
114
  /**
61
- * Configuration
62
- * Supported parameter ranges (temperature, top_p, etc.)
115
+ * Supported parameter ranges for generation.
116
+ * Temperature, top_p, and other sampling parameters
63
117
  */
64
118
  configuration: Configuration | undefined;
65
119
  /**
66
- * API Details
67
- * Endpoint information and rate limits
120
+ * API endpoint information and rate limits.
121
+ * Everything needed to call the model programmatically
68
122
  */
69
123
  apiDetails: APIDetails | undefined;
70
124
  /**
71
- * Availability
72
- * Available regions and platforms where model can be accessed
125
+ * Available regions and platforms.
126
+ * Where and how the model can be accessed
73
127
  */
74
128
  availability: Availability | undefined;
75
129
  /**
76
- * Architecture details
77
- * Technical architecture information (transformer type, layers, etc.)
130
+ * Technical architecture information.
131
+ * Transformer type, layer count, attention mechanism, etc.
78
132
  */
79
133
  architecture: Architecture | undefined;
80
134
  /**
81
- * Training information
82
- * Details about training data, methods, and compute used
135
+ * Training dataset and methodology information.
136
+ * How the model was trained and on what data
83
137
  */
84
138
  training: Training | undefined;
85
139
  /**
86
- * Safety and moderation
87
- * Built-in safety features and content filtering
140
+ * Built-in safety features and content filtering.
141
+ * Moderation capabilities and safety guardrails
88
142
  */
89
143
  safety: Safety | undefined;
90
144
  /**
91
- * Licensing information
92
- * License type and usage restrictions
145
+ * License type and usage restrictions.
146
+ * Legal terms for using the model
93
147
  */
94
148
  licensing: Licensing | undefined;
95
149
  /**
96
- * Technical specifications
97
- * Hardware requirements and technical details
150
+ * Hardware requirements and technical details.
151
+ * Memory, compute requirements for self-hosting
98
152
  */
99
153
  technicalSpecs: TechnicalSpecs | undefined;
100
154
  /**
101
- * Metadata
102
- * When this model information was last updated in our system
155
+ * When this model information was last updated in our system.
156
+ * Example: 2024-08-25T10:30:00Z
157
+ * For tracking data freshness
103
158
  */
104
159
  lastScrapedAt: Date | undefined;
105
- /** Sources where this model information was collected from */
160
+ /**
161
+ * Sources where this model information was collected from.
162
+ * Examples: ["https://openai.com/pricing", "https://platform.openai.com/docs"]
163
+ * For data provenance and verification
164
+ */
106
165
  dataSources: string[];
107
- /** Whether the model is currently available for use */
166
+ /**
167
+ * Whether the model is currently available for use.
168
+ * false if model is down, in maintenance, or discontinued
169
+ */
108
170
  isActive: boolean;
109
- /** Whether the model has been deprecated */
171
+ /**
172
+ * Whether the model has been officially deprecated.
173
+ * true once deprecation_date has passed or provider announces EOL
174
+ */
110
175
  isDeprecated: boolean;
111
- /** If deprecated, the recommended replacement model's ID */
176
+ /**
177
+ * If deprecated, the recommended replacement model's ID.
178
+ * Example: "mdl_gpt4_turbo_2024" replacing "mdl_gpt4_2023"
179
+ * Helps with migration paths
180
+ */
112
181
  replacementModelId: string;
113
182
  }
183
+ /** ModelClassification categorizes models for filtering and comparison. */
114
184
  export interface ModelClassification {
115
- /** foundation, fine-tuned, instruct, chat, reasoning */
185
+ /**
186
+ * Primary model type defining its training approach.
187
+ * Examples: "foundation", "fine-tuned", "instruct", "chat", "reasoning"
188
+ * "foundation" = base model, "instruct" = instruction-following
189
+ */
116
190
  modelType: string;
117
- /** GPT, LLaMA, BERT, etc */
191
+ /**
192
+ * Underlying model architecture family.
193
+ * Examples: "GPT", "LLaMA", "BERT", "T5", "Transformer", "Mamba"
194
+ */
118
195
  architecture: string;
196
+ /**
197
+ * Approximate number of parameters in billions.
198
+ * Examples: 7 (7B), 70 (70B), 175 (175B for GPT-3)
199
+ */
119
200
  parameterCount: number;
201
+ /**
202
+ * Whether model weights are publicly available.
203
+ * true for LLaMA, Mistral; false for GPT-4, Claude
204
+ */
120
205
  isOpenSource: boolean;
206
+ /**
207
+ * Software license if open source.
208
+ * Examples: "MIT", "Apache-2.0", "Custom", "Proprietary"
209
+ */
121
210
  licenseType: string;
122
211
  }
212
+ /** ModelPerformance captures standardized benchmark scores. */
123
213
  export interface ModelPerformance {
124
- /** 0-10 */
214
+ /**
215
+ * General reasoning ability score (0-10 scale).
216
+ * Based on benchmarks like ARC, HellaSwag, MMLU
217
+ * Example: 8.5 for strong reasoning models
218
+ */
125
219
  reasoningScore: number;
220
+ /**
221
+ * Programming and code generation score (0-10).
222
+ * Based on HumanEval, MBPP benchmarks
223
+ * Example: 9.2 for specialized coding models
224
+ */
126
225
  codingScore: number;
226
+ /**
227
+ * Creative writing and generation score (0-10).
228
+ * Based on human evaluations and creative benchmarks
229
+ * Example: 7.8 for models good at storytelling
230
+ */
127
231
  creativeScore: number;
232
+ /**
233
+ * Factual accuracy and knowledge score (0-10).
234
+ * Based on TruthfulQA, factual benchmarks
235
+ * Example: 8.0 for models with good factual recall
236
+ */
128
237
  factualScore: number;
238
+ /**
239
+ * Mathematical reasoning score (0-10).
240
+ * Based on GSM8K, MATH benchmarks
241
+ * Example: 9.5 for models excelling at math
242
+ */
129
243
  mathScore: number;
130
- /** mmlu, humaneval, etc */
244
+ /**
245
+ * Raw benchmark scores by name.
246
+ * Keys: "mmlu", "humaneval", "gsm8k", "truthfulqa", "arc", "hellaswag"
247
+ * Values: Actual benchmark scores (usually 0-100)
248
+ * Example: {"mmlu": 86.4, "humaneval": 92.0, "gsm8k": 95.0}
249
+ */
131
250
  benchmarkScores: {
132
251
  [key: string]: number;
133
252
  };
@@ -136,39 +255,95 @@ export interface ModelPerformance_BenchmarkScoresEntry {
136
255
  key: string;
137
256
  value: number;
138
257
  }
258
+ /** TokenInfo describes token limits and processing capabilities. */
139
259
  export interface TokenInfo {
260
+ /**
261
+ * Maximum tokens the model can process in a single request.
262
+ * Examples: 4096, 8192, 32768, 128000, 200000
263
+ * Includes both input and output tokens
264
+ */
140
265
  contextWindow: number;
266
+ /**
267
+ * Maximum tokens that can be generated in response.
268
+ * Examples: 4096 for most models, 16384 for some
269
+ * May be less than context_window
270
+ */
141
271
  maxOutputTokens: number;
272
+ /**
273
+ * Tokenizer algorithm used.
274
+ * Examples: "cl100k_base" (GPT-4), "claude", "sentencepiece"
275
+ */
142
276
  tokenizer: string;
277
+ /**
278
+ * Average generation speed in tokens per second.
279
+ * Example: 50 for typical API, 100+ for optimized inference
280
+ * May vary based on load and tier
281
+ */
143
282
  tokensPerSecond: number;
144
283
  }
145
- export interface Pricing {
146
- /** per 1M tokens */
147
- inputPrice: number;
148
- outputPrice: number;
149
- cacheReadPrice: number;
150
- cacheWritePrice: number;
151
- fineTuningPrice: number;
152
- /** USD */
153
- currency: string;
154
- }
284
+ /** Configuration defines supported generation parameters. */
155
285
  export interface Configuration {
286
+ /**
287
+ * Minimum allowed temperature value.
288
+ * Usually 0.0 for deterministic output
289
+ */
156
290
  temperatureMin: number;
291
+ /**
292
+ * Maximum allowed temperature value.
293
+ * Usually 1.0 or 2.0 for high randomness
294
+ */
157
295
  temperatureMax: number;
296
+ /**
297
+ * Default temperature if not specified.
298
+ * Typically 0.7 or 1.0
299
+ */
158
300
  temperatureDefault: number;
301
+ /**
302
+ * Minimum allowed top_p (nucleus sampling).
303
+ * Usually 0.0 to disable
304
+ */
159
305
  topPMin: number;
306
+ /**
307
+ * Maximum allowed top_p value.
308
+ * Usually 1.0 for full vocabulary
309
+ */
160
310
  topPMax: number;
161
311
  }
312
+ /** APIDetails provides integration information. */
162
313
  export interface APIDetails {
314
+ /**
315
+ * Base API endpoint URL.
316
+ * Example: "https://api.openai.com/v1/chat/completions"
317
+ */
163
318
  endpoint: string;
319
+ /**
320
+ * API version identifier.
321
+ * Examples: "v1", "2024-02-01", "beta"
322
+ */
164
323
  version: string;
165
- /** requests per minute */
324
+ /**
325
+ * Rate limit in requests per minute.
326
+ * Example: 500 for standard tier, 10000 for enterprise
327
+ */
166
328
  rateLimitRpm: number;
167
- /** tokens per minute */
329
+ /**
330
+ * Rate limit in tokens per minute.
331
+ * Example: 90000 for GPT-4, 200000 for GPT-3.5
332
+ */
168
333
  rateLimitTpm: number;
169
334
  }
335
+ /** Availability describes where the model can be accessed. */
170
336
  export interface Availability {
337
+ /**
338
+ * Geographic regions where available.
339
+ * Examples: ["us-east-1", "eu-west-1", "asia-pacific"]
340
+ * May use provider-specific region codes
341
+ */
171
342
  regions: string[];
343
+ /**
344
+ * Platforms/services offering the model.
345
+ * Examples: ["api", "playground", "azure", "vertex-ai", "bedrock"]
346
+ */
172
347
  platforms: string[];
173
348
  }
174
349
  export declare const Model: MessageFns<Model>;
@@ -176,7 +351,6 @@ export declare const ModelClassification: MessageFns<ModelClassification>;
176
351
  export declare const ModelPerformance: MessageFns<ModelPerformance>;
177
352
  export declare const ModelPerformance_BenchmarkScoresEntry: MessageFns<ModelPerformance_BenchmarkScoresEntry>;
178
353
  export declare const TokenInfo: MessageFns<TokenInfo>;
179
- export declare const Pricing: MessageFns<Pricing>;
180
354
  export declare const Configuration: MessageFns<Configuration>;
181
355
  export declare const APIDetails: MessageFns<APIDetails>;
182
356
  export declare const Availability: MessageFns<Availability>;
@@ -5,12 +5,13 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/llmx/v1/model.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Availability = exports.APIDetails = exports.Configuration = exports.Pricing = exports.TokenInfo = exports.ModelPerformance_BenchmarkScoresEntry = exports.ModelPerformance = exports.ModelClassification = exports.Model = exports.protobufPackage = void 0;
8
+ exports.Availability = exports.APIDetails = exports.Configuration = exports.TokenInfo = exports.ModelPerformance_BenchmarkScoresEntry = exports.ModelPerformance = exports.ModelClassification = exports.Model = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
12
12
  const architecture_pb_1 = require("./architecture.pb");
13
13
  const capabilities_pb_1 = require("./capabilities.pb");
14
+ const pricing_pb_1 = require("./pricing.pb");
14
15
  exports.protobufPackage = "weaveapi.llmx.v1";
15
16
  function createBaseModel() {
16
17
  return {
@@ -101,7 +102,7 @@ exports.Model = {
101
102
  exports.TokenInfo.encode(message.tokens, writer.uint32(138).fork()).join();
102
103
  }
103
104
  if (message.pricing !== undefined) {
104
- exports.Pricing.encode(message.pricing, writer.uint32(146).fork()).join();
105
+ pricing_pb_1.Pricing.encode(message.pricing, writer.uint32(146).fork()).join();
105
106
  }
106
107
  if (message.configuration !== undefined) {
107
108
  exports.Configuration.encode(message.configuration, writer.uint32(154).fork()).join();
@@ -274,7 +275,7 @@ exports.Model = {
274
275
  if (tag !== 146) {
275
276
  break;
276
277
  }
277
- message.pricing = exports.Pricing.decode(reader, reader.uint32());
278
+ message.pricing = pricing_pb_1.Pricing.decode(reader, reader.uint32());
278
279
  continue;
279
280
  }
280
281
  case 19: {
@@ -397,7 +398,7 @@ exports.Model = {
397
398
  classification: isSet(object.classification) ? exports.ModelClassification.fromJSON(object.classification) : undefined,
398
399
  performance: isSet(object.performance) ? exports.ModelPerformance.fromJSON(object.performance) : undefined,
399
400
  tokens: isSet(object.tokens) ? exports.TokenInfo.fromJSON(object.tokens) : undefined,
400
- pricing: isSet(object.pricing) ? exports.Pricing.fromJSON(object.pricing) : undefined,
401
+ pricing: isSet(object.pricing) ? pricing_pb_1.Pricing.fromJSON(object.pricing) : undefined,
401
402
  configuration: isSet(object.configuration) ? exports.Configuration.fromJSON(object.configuration) : undefined,
402
403
  apiDetails: isSet(object.apiDetails) ? exports.APIDetails.fromJSON(object.apiDetails) : undefined,
403
404
  availability: isSet(object.availability) ? exports.Availability.fromJSON(object.availability) : undefined,
@@ -470,7 +471,7 @@ exports.Model = {
470
471
  obj.tokens = exports.TokenInfo.toJSON(message.tokens);
471
472
  }
472
473
  if (message.pricing !== undefined) {
473
- obj.pricing = exports.Pricing.toJSON(message.pricing);
474
+ obj.pricing = pricing_pb_1.Pricing.toJSON(message.pricing);
474
475
  }
475
476
  if (message.configuration !== undefined) {
476
477
  obj.configuration = exports.Configuration.toJSON(message.configuration);
@@ -543,7 +544,7 @@ exports.Model = {
543
544
  ? exports.TokenInfo.fromPartial(object.tokens)
544
545
  : undefined;
545
546
  message.pricing = (object.pricing !== undefined && object.pricing !== null)
546
- ? exports.Pricing.fromPartial(object.pricing)
547
+ ? pricing_pb_1.Pricing.fromPartial(object.pricing)
547
548
  : undefined;
548
549
  message.configuration = (object.configuration !== undefined && object.configuration !== null)
549
550
  ? exports.Configuration.fromPartial(object.configuration)
@@ -1007,135 +1008,6 @@ exports.TokenInfo = {
1007
1008
  return message;
1008
1009
  },
1009
1010
  };
1010
- function createBasePricing() {
1011
- return { inputPrice: 0, outputPrice: 0, cacheReadPrice: 0, cacheWritePrice: 0, fineTuningPrice: 0, currency: "" };
1012
- }
1013
- exports.Pricing = {
1014
- encode(message, writer = new wire_1.BinaryWriter()) {
1015
- if (message.inputPrice !== 0) {
1016
- writer.uint32(9).double(message.inputPrice);
1017
- }
1018
- if (message.outputPrice !== 0) {
1019
- writer.uint32(17).double(message.outputPrice);
1020
- }
1021
- if (message.cacheReadPrice !== 0) {
1022
- writer.uint32(25).double(message.cacheReadPrice);
1023
- }
1024
- if (message.cacheWritePrice !== 0) {
1025
- writer.uint32(33).double(message.cacheWritePrice);
1026
- }
1027
- if (message.fineTuningPrice !== 0) {
1028
- writer.uint32(41).double(message.fineTuningPrice);
1029
- }
1030
- if (message.currency !== "") {
1031
- writer.uint32(50).string(message.currency);
1032
- }
1033
- return writer;
1034
- },
1035
- decode(input, length) {
1036
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1037
- let end = length === undefined ? reader.len : reader.pos + length;
1038
- const message = createBasePricing();
1039
- while (reader.pos < end) {
1040
- const tag = reader.uint32();
1041
- switch (tag >>> 3) {
1042
- case 1: {
1043
- if (tag !== 9) {
1044
- break;
1045
- }
1046
- message.inputPrice = reader.double();
1047
- continue;
1048
- }
1049
- case 2: {
1050
- if (tag !== 17) {
1051
- break;
1052
- }
1053
- message.outputPrice = reader.double();
1054
- continue;
1055
- }
1056
- case 3: {
1057
- if (tag !== 25) {
1058
- break;
1059
- }
1060
- message.cacheReadPrice = reader.double();
1061
- continue;
1062
- }
1063
- case 4: {
1064
- if (tag !== 33) {
1065
- break;
1066
- }
1067
- message.cacheWritePrice = reader.double();
1068
- continue;
1069
- }
1070
- case 5: {
1071
- if (tag !== 41) {
1072
- break;
1073
- }
1074
- message.fineTuningPrice = reader.double();
1075
- continue;
1076
- }
1077
- case 6: {
1078
- if (tag !== 50) {
1079
- break;
1080
- }
1081
- message.currency = reader.string();
1082
- continue;
1083
- }
1084
- }
1085
- if ((tag & 7) === 4 || tag === 0) {
1086
- break;
1087
- }
1088
- reader.skip(tag & 7);
1089
- }
1090
- return message;
1091
- },
1092
- fromJSON(object) {
1093
- return {
1094
- inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : 0,
1095
- outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : 0,
1096
- cacheReadPrice: isSet(object.cacheReadPrice) ? globalThis.Number(object.cacheReadPrice) : 0,
1097
- cacheWritePrice: isSet(object.cacheWritePrice) ? globalThis.Number(object.cacheWritePrice) : 0,
1098
- fineTuningPrice: isSet(object.fineTuningPrice) ? globalThis.Number(object.fineTuningPrice) : 0,
1099
- currency: isSet(object.currency) ? globalThis.String(object.currency) : "",
1100
- };
1101
- },
1102
- toJSON(message) {
1103
- const obj = {};
1104
- if (message.inputPrice !== 0) {
1105
- obj.inputPrice = message.inputPrice;
1106
- }
1107
- if (message.outputPrice !== 0) {
1108
- obj.outputPrice = message.outputPrice;
1109
- }
1110
- if (message.cacheReadPrice !== 0) {
1111
- obj.cacheReadPrice = message.cacheReadPrice;
1112
- }
1113
- if (message.cacheWritePrice !== 0) {
1114
- obj.cacheWritePrice = message.cacheWritePrice;
1115
- }
1116
- if (message.fineTuningPrice !== 0) {
1117
- obj.fineTuningPrice = message.fineTuningPrice;
1118
- }
1119
- if (message.currency !== "") {
1120
- obj.currency = message.currency;
1121
- }
1122
- return obj;
1123
- },
1124
- create(base) {
1125
- return exports.Pricing.fromPartial(base !== null && base !== void 0 ? base : {});
1126
- },
1127
- fromPartial(object) {
1128
- var _a, _b, _c, _d, _e, _f;
1129
- const message = createBasePricing();
1130
- message.inputPrice = (_a = object.inputPrice) !== null && _a !== void 0 ? _a : 0;
1131
- message.outputPrice = (_b = object.outputPrice) !== null && _b !== void 0 ? _b : 0;
1132
- message.cacheReadPrice = (_c = object.cacheReadPrice) !== null && _c !== void 0 ? _c : 0;
1133
- message.cacheWritePrice = (_d = object.cacheWritePrice) !== null && _d !== void 0 ? _d : 0;
1134
- message.fineTuningPrice = (_e = object.fineTuningPrice) !== null && _e !== void 0 ? _e : 0;
1135
- message.currency = (_f = object.currency) !== null && _f !== void 0 ? _f : "";
1136
- return message;
1137
- },
1138
- };
1139
1011
  function createBaseConfiguration() {
1140
1012
  return { temperatureMin: 0, temperatureMax: 0, temperatureDefault: 0, topPMin: 0, topPMax: 0 };
1141
1013
  }