@reverbia/sdk 1.0.0-next.20251121094738 → 1.0.0-next.20251124100226

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.
@@ -73,10 +73,10 @@ function useChat(options) {
73
73
  body: {
74
74
  messages,
75
75
  model
76
+ },
77
+ headers: {
78
+ Authorization: `Bearer ${token}`
76
79
  }
77
- // headers: {
78
- // Authorization: `Bearer ${token}`,
79
- // },
80
80
  });
81
81
  if (!completion.data) {
82
82
  const error = completion.error?.error ?? "API did not return a completion response.";
@@ -1161,8 +1161,8 @@ var generateEmbeddingForText = async (text, options = {}) => {
1161
1161
  body: {
1162
1162
  input: text,
1163
1163
  model
1164
- }
1165
- // headers,
1164
+ },
1165
+ headers
1166
1166
  });
1167
1167
  if (!response.data || !response.data.data || response.data.data.length === 0) {
1168
1168
  throw new Error(
@@ -1276,10 +1276,10 @@ function useMemory(options = {}) {
1276
1276
  ...messages
1277
1277
  ],
1278
1278
  model: model || memoryModel
1279
+ },
1280
+ headers: {
1281
+ Authorization: `Bearer ${token}`
1279
1282
  }
1280
- // headers: {
1281
- // Authorization: `Bearer ${token}`,
1282
- // },
1283
1283
  });
1284
1284
  if (!completion.data) {
1285
1285
  console.error(
@@ -35,10 +35,10 @@ function useChat(options) {
35
35
  body: {
36
36
  messages,
37
37
  model
38
+ },
39
+ headers: {
40
+ Authorization: `Bearer ${token}`
38
41
  }
39
- // headers: {
40
- // Authorization: `Bearer ${token}`,
41
- // },
42
42
  });
43
43
  if (!completion.data) {
44
44
  const error = completion.error?.error ?? "API did not return a completion response.";
@@ -1123,8 +1123,8 @@ var generateEmbeddingForText = async (text, options = {}) => {
1123
1123
  body: {
1124
1124
  input: text,
1125
1125
  model
1126
- }
1127
- // headers,
1126
+ },
1127
+ headers
1128
1128
  });
1129
1129
  if (!response.data || !response.data.data || response.data.data.length === 0) {
1130
1130
  throw new Error(
@@ -1238,10 +1238,10 @@ function useMemory(options = {}) {
1238
1238
  ...messages
1239
1239
  ],
1240
1240
  model: model || memoryModel
1241
+ },
1242
+ headers: {
1243
+ Authorization: `Bearer ${token}`
1241
1244
  }
1242
- // headers: {
1243
- // Authorization: `Bearer ${token}`,
1244
- // },
1245
1245
  });
1246
1246
  if (!completion.data) {
1247
1247
  console.error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reverbia/sdk",
3
- "version": "1.0.0-next.20251121094738",
3
+ "version": "1.0.0-next.20251124100226",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",