utilitas 2000.3.54 → 2000.3.55

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/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.54",
4
+ "version": "2000.3.55",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/lib/rag.mjs CHANGED
@@ -98,8 +98,8 @@ const ensureApiKey = (options) => {
98
98
  return options.apiKey;
99
99
  };
100
100
 
101
- const ensureGoogleCredentials = (options) => {
102
- assert(options?.googleCredentials, 'Google credentials are required.', 400);
101
+ const ensureCredentials = (options) => {
102
+ assert(options?.credentials, 'Google credentials are required.', 400);
103
103
  assert(options?.projectId, 'Google project ID is required.', 400);
104
104
  return options;
105
105
  };
@@ -192,7 +192,7 @@ const initReranker = async (options = {}) => {
192
192
  const model = options?.model || DEFAULT_RERANKER_MODELS[provider];
193
193
  switch (provider) {
194
194
  case GOOGLE:
195
- ensureGoogleCredentials(options);
195
+ ensureCredentials(options);
196
196
  const { RankServiceClient } = await need(
197
197
  '@google-cloud/discoveryengine', { raw: true }
198
198
  );
@@ -200,7 +200,7 @@ const initReranker = async (options = {}) => {
200
200
  const clientOptions = {
201
201
  ...location ? { apiEndpoint: `${location}-discoveryengine.googleapis.com` } : {},
202
202
  ...options?.apiEndpoint ? { apiEndpoint: options.apiEndpoint } : {},
203
- keyFilename: options.googleCredentials,
203
+ keyFilename: options.credentials,
204
204
  };
205
205
  const client = new RankServiceClient(clientOptions);
206
206
  rerankerClients[provider] = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.54",
4
+ "version": "2000.3.55",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",