@supabase/functions-js 2.4.1 → 2.4.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.
@@ -1,2 +1,2 @@
1
- export declare const version = "2.4.1";
1
+ export declare const version = "2.4.2";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '2.4.1';
4
+ exports.version = '2.4.2';
5
5
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const version = "2.4.1";
1
+ export declare const version = "2.4.2";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,2 +1,2 @@
1
- export const version = '2.4.1';
1
+ export const version = '2.4.2';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/functions-js",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "JS Client library to interact with Supabase Functions.",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -48,9 +48,9 @@
48
48
  "jsonwebtoken": "^9.0.0",
49
49
  "nanoid": "^3.3.1",
50
50
  "npm-run-all": "^4.1.5",
51
+ "openai": "^4.52.5",
51
52
  "prettier": "^2.6.0",
52
53
  "rimraf": "^3.0.2",
53
- "semantic-release": "^19.0.2",
54
54
  "semantic-release-plugin-update-version-in-files": "^1.1.0",
55
55
  "testcontainers": "^8.5.1",
56
56
  "ts-jest": "^28.0.0",
@@ -1,3 +1,5 @@
1
+ import OpenAI from 'openai'
2
+
1
3
  declare namespace Supabase {
2
4
  export interface ModelOptions {
3
5
  /**
@@ -19,6 +21,12 @@ declare namespace Supabase {
19
21
  * Automatically abort the request to the model after specified time (in seconds). Applies only for LLMs like `mistral` (default: 60)
20
22
  */
21
23
  timeout?: number
24
+
25
+ /**
26
+ * Mode for the inference API host. (default: 'ollama')
27
+ */
28
+ mode?: 'ollama' | 'openaicompatible'
29
+ signal?: AbortSignal
22
30
  }
23
31
 
24
32
  export class Session {
@@ -30,7 +38,10 @@ declare namespace Supabase {
30
38
  /**
31
39
  * Execute the given prompt in model session
32
40
  */
33
- run(prompt: string, modelOptions?: ModelOptions): unknown
41
+ run(
42
+ prompt: string | Omit<OpenAI.Chat.ChatCompletionCreateParams, 'model' | 'stream'>,
43
+ modelOptions?: ModelOptions
44
+ ): unknown
34
45
  }
35
46
 
36
47
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.4.1'
1
+ export const version = '2.4.2'