@alpic80/rivet-ai-sdk-provider 2.0.4 → 2.0.5

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
@@ -53,6 +53,10 @@ declare const rivetLanguageModelOptions: z.ZodObject<{
53
53
  pcm16: "pcm16";
54
54
  }>>;
55
55
  }, z.core.$strip>;
56
+ rivetInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
57
+ type: z.ZodString;
58
+ value: z.ZodUnknown;
59
+ }, z.core.$strip>>>;
56
60
  }, z.core.$strip>;
57
61
  type RivetLanguageModelOptions = z.infer<typeof rivetLanguageModelOptions>;
58
62
 
package/dist/index.d.ts CHANGED
@@ -53,6 +53,10 @@ declare const rivetLanguageModelOptions: z.ZodObject<{
53
53
  pcm16: "pcm16";
54
54
  }>>;
55
55
  }, z.core.$strip>;
56
+ rivetInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
57
+ type: z.ZodString;
58
+ value: z.ZodUnknown;
59
+ }, z.core.$strip>>>;
56
60
  }, z.core.$strip>;
57
61
  type RivetLanguageModelOptions = z.infer<typeof rivetLanguageModelOptions>;
58
62
 
package/dist/index.js CHANGED
@@ -942,6 +942,14 @@ var rivetRunParamsSchema = import_v4.z.object({
942
942
  streamNode: import_v4.z.string().optional(),
943
943
  events: import_v4.z.string().optional()
944
944
  });
945
+ var graphInputSchema = import_v4.z.record(
946
+ import_v4.z.string(),
947
+ // key type
948
+ import_v4.z.object({
949
+ type: import_v4.z.string(),
950
+ value: import_v4.z.unknown()
951
+ })
952
+ ).optional();
945
953
  var standardChatConfigSchema = import_v4.z.object({
946
954
  temperature: import_v4.z.number().optional(),
947
955
  top_p: import_v4.z.number().optional(),
@@ -989,7 +997,8 @@ var rivetCustomChatConfigSchema = import_v4.z.object({
989
997
  });
990
998
  var rivetLanguageModelOptions = import_v4.z.object({
991
999
  runParams: rivetRunParamsSchema,
992
- chatConfig: rivetCustomChatConfigSchema
1000
+ chatConfig: rivetCustomChatConfigSchema,
1001
+ rivetInputs: graphInputSchema
993
1002
  });
994
1003
  var rivetChatConfigSchema = standardChatConfigSchema.merge(rivetCustomChatConfigSchema);
995
1004
  var rivetToolOptions = import_v4.z.record(
@@ -1115,7 +1124,7 @@ prepare tools input:${printObject(tools)}`);
1115
1124
  }
1116
1125
 
1117
1126
  // src/version.ts
1118
- var VERSION = true ? "2.0.4" : "0.0.0-test";
1127
+ var VERSION = true ? "2.0.5" : "0.0.0-test";
1119
1128
 
1120
1129
  // src/post-to-api.ts
1121
1130
  var getOriginalFetch = () => globalThis.fetch;
@@ -1323,11 +1332,12 @@ var RivetChatLanguageModel = class {
1323
1332
  toolChoice
1324
1333
  //in Rivet tool section
1325
1334
  }) {
1326
- var _a15, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1335
+ var _a15, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
1327
1336
  const warnings = [];
1328
1337
  const emptyOptions = {
1329
1338
  runParams: {},
1330
- chatConfig: {}
1339
+ chatConfig: {},
1340
+ rivetInputs: {}
1331
1341
  };
1332
1342
  debugLog(`providerOptions:${printObject(providerOptions)}`);
1333
1343
  const options = (_a15 = await parseProviderOptions({
@@ -1344,15 +1354,16 @@ var RivetChatLanguageModel = class {
1344
1354
  } = await prepareTools({ tools, toolChoice });
1345
1355
  options.runParams = (_b = options.runParams) != null ? _b : {};
1346
1356
  options.chatConfig = (_c = options.chatConfig) != null ? _c : {};
1357
+ options.rivetInputs = (_d = options.rivetInputs) != null ? _d : {};
1347
1358
  const chatConfig = __spreadValues({}, options.chatConfig);
1348
- chatConfig.maxTokens = (_d = chatConfig.maxTokens) != null ? _d : maxOutputTokens;
1349
- chatConfig.temperature = (_e = chatConfig.temperature) != null ? _e : temperature;
1350
- chatConfig.top_p = (_f = chatConfig.top_p) != null ? _f : topP;
1351
- chatConfig.top_k = (_g = chatConfig.top_k) != null ? _g : topK;
1352
- chatConfig.stop_sequences = (_h = chatConfig.stop_sequences) != null ? _h : stopSequences;
1353
- chatConfig.frequencyPenalty = (_i = chatConfig.frequencyPenalty) != null ? _i : frequencyPenalty;
1354
- chatConfig.presencePenalty = (_j = chatConfig.presencePenalty) != null ? _j : presencePenalty;
1355
- chatConfig.seed = (_k = chatConfig.seed) != null ? _k : seed;
1359
+ chatConfig.maxTokens = (_e = chatConfig.maxTokens) != null ? _e : maxOutputTokens;
1360
+ chatConfig.temperature = (_f = chatConfig.temperature) != null ? _f : temperature;
1361
+ chatConfig.top_p = (_g = chatConfig.top_p) != null ? _g : topP;
1362
+ chatConfig.top_k = (_h = chatConfig.top_k) != null ? _h : topK;
1363
+ chatConfig.stop_sequences = (_i = chatConfig.stop_sequences) != null ? _i : stopSequences;
1364
+ chatConfig.frequencyPenalty = (_j = chatConfig.frequencyPenalty) != null ? _j : frequencyPenalty;
1365
+ chatConfig.presencePenalty = (_k = chatConfig.presencePenalty) != null ? _k : presencePenalty;
1366
+ chatConfig.seed = (_l = chatConfig.seed) != null ? _l : seed;
1356
1367
  if (responseFormat) {
1357
1368
  const isJson = (responseFormat == null ? void 0 : responseFormat.type) === "json";
1358
1369
  const hasSchema = isJson && !!(responseFormat == null ? void 0 : responseFormat.schema);
@@ -1365,7 +1376,7 @@ var RivetChatLanguageModel = class {
1365
1376
  }
1366
1377
  const messages = convertToRivetChatMessages(prompt);
1367
1378
  return {
1368
- args: {
1379
+ args: __spreadValues({
1369
1380
  chatConfig: {
1370
1381
  type: "object",
1371
1382
  value: chatConfig
@@ -1384,7 +1395,7 @@ var RivetChatLanguageModel = class {
1384
1395
  value: rivetSchemas
1385
1396
  },
1386
1397
  runParams: __spreadValues({}, options.runParams)
1387
- },
1398
+ }, (_m = options.rivetInputs) != null ? _m : {}),
1388
1399
  warnings: [...warnings, ...toolWarnings]
1389
1400
  };
1390
1401
  }
@@ -1704,8 +1715,8 @@ var rivetChatResponseSchema = import_v43.z.object({
1704
1715
  usage: rivetUsageSchema
1705
1716
  });
1706
1717
  var rivetChatResponseHandler = (id, model) => async ({
1707
- url,
1708
- requestBodyValues,
1718
+ url: _url,
1719
+ requestBodyValues: _requestBodyValues,
1709
1720
  response
1710
1721
  }) => {
1711
1722
  const raw = await response.json();