n8n-nodes-ollama-reranker 1.3.1 → 1.3.2

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.
@@ -51,6 +51,10 @@ class OllamaReranker {
51
51
  required: true,
52
52
  },
53
53
  ],
54
+ requestDefaults: {
55
+ ignoreHttpStatusErrors: true,
56
+ baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
57
+ },
54
58
  properties: [
55
59
  {
56
60
  displayName: 'Model',
@@ -206,10 +210,10 @@ class OllamaReranker {
206
210
  const includeOriginalScores = (_c = additionalOptions.includeOriginalScores) !== null && _c !== void 0 ? _c : false;
207
211
  // Get credentials (n8n's built-in ollamaApi)
208
212
  const credentials = await this.getCredentials('ollamaApi');
209
- if (!(credentials === null || credentials === void 0 ? void 0 : credentials.host)) {
210
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Ollama host not configured. Please add Ollama API credentials with a valid host URL.');
213
+ if (!(credentials === null || credentials === void 0 ? void 0 : credentials.baseUrl)) {
214
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Ollama Base URL not configured. Please add Ollama API credentials with a valid Base URL.');
211
215
  }
212
- const ollamaHost = credentials.host.replace(/\/$/, '');
216
+ const ollamaHost = credentials.baseUrl.replace(/\/$/, '');
213
217
  /**
214
218
  * Reranker Provider Object
215
219
  *
@@ -52,6 +52,10 @@ class OllamaRerankerWorkflow {
52
52
  required: true,
53
53
  },
54
54
  ],
55
+ requestDefaults: {
56
+ ignoreHttpStatusErrors: true,
57
+ baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
58
+ },
55
59
  properties: [
56
60
  // Model selection with dynamic loading (using routing like Ollama Chat Model)
57
61
  {
@@ -296,10 +300,10 @@ class OllamaRerankerWorkflow {
296
300
  const returnData = [];
297
301
  // Get credentials
298
302
  const credentials = await this.getCredentials('ollamaApi');
299
- if (!(credentials === null || credentials === void 0 ? void 0 : credentials.host)) {
300
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Ollama host not configured. Please add Ollama API credentials.');
303
+ if (!(credentials === null || credentials === void 0 ? void 0 : credentials.baseUrl)) {
304
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Ollama Base URL not configured. Please add Ollama API credentials.');
301
305
  }
302
- const ollamaHost = credentials.host.replace(/\/$/, '');
306
+ const ollamaHost = credentials.baseUrl.replace(/\/$/, '');
303
307
  // Get model
304
308
  const model = this.getNodeParameter('model', 0);
305
309
  if (!(model === null || model === void 0 ? void 0 : model.trim())) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-ollama-reranker",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Ollama Reranker for n8n - Dynamic model loading + Ollama/Custom API support (Vector Store provider + workflow node)",
5
5
  "main": "index.js",
6
6
  "author": "Gabriel BRUMENT",