@genkit-ai/compat-oai 1.28.0 → 1.29.0

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.
Files changed (47) hide show
  1. package/lib/{audio-CUuCwm-y.d.mts → audio-CJ8rzf35.d.mts} +7 -2
  2. package/lib/{audio-CUuCwm-y.d.ts → audio-CJ8rzf35.d.ts} +7 -2
  3. package/lib/audio.d.mts +2 -1
  4. package/lib/audio.d.ts +2 -1
  5. package/lib/audio.js +14 -5
  6. package/lib/audio.js.map +1 -1
  7. package/lib/audio.mjs +9 -4
  8. package/lib/audio.mjs.map +1 -1
  9. package/lib/deepseek/deepseek.d.mts +2 -1
  10. package/lib/deepseek/deepseek.d.ts +2 -1
  11. package/lib/deepseek/index.d.mts +2 -1
  12. package/lib/deepseek/index.d.ts +2 -1
  13. package/lib/embedder.d.mts +2 -1
  14. package/lib/embedder.d.ts +2 -1
  15. package/lib/image.d.mts +2 -1
  16. package/lib/image.d.ts +2 -1
  17. package/lib/index.d.mts +2 -1
  18. package/lib/index.d.ts +2 -1
  19. package/lib/model.d.mts +2 -1
  20. package/lib/model.d.ts +2 -1
  21. package/lib/model.js +1 -1
  22. package/lib/model.js.map +1 -1
  23. package/lib/model.mjs +1 -1
  24. package/lib/model.mjs.map +1 -1
  25. package/lib/openai/dalle.d.mts +2 -1
  26. package/lib/openai/dalle.d.ts +2 -1
  27. package/lib/openai/index.d.mts +4 -3
  28. package/lib/openai/index.d.ts +4 -3
  29. package/lib/openai/index.js +5 -5
  30. package/lib/openai/index.js.map +1 -1
  31. package/lib/openai/index.mjs +1 -4
  32. package/lib/openai/index.mjs.map +1 -1
  33. package/lib/openai/{whisper.d.mts → stt.d.mts} +1 -0
  34. package/lib/openai/{whisper.d.ts → stt.d.ts} +1 -0
  35. package/lib/openai/{whisper.js → stt.js} +7 -4
  36. package/lib/openai/stt.js.map +1 -0
  37. package/lib/openai/{whisper.mjs → stt.mjs} +4 -1
  38. package/lib/openai/stt.mjs.map +1 -0
  39. package/lib/utils.d.mts +2 -1
  40. package/lib/utils.d.ts +2 -1
  41. package/lib/xai/grok.d.mts +2 -1
  42. package/lib/xai/grok.d.ts +2 -1
  43. package/lib/xai/index.d.mts +2 -1
  44. package/lib/xai/index.d.ts +2 -1
  45. package/package.json +2 -2
  46. package/lib/openai/whisper.js.map +0 -1
  47. package/lib/openai/whisper.mjs.map +0 -1
@@ -11,6 +11,7 @@ declare function openAITranscriptionModelRef<CustomOptions extends z.ZodTypeAny
11
11
  }): genkit.ModelReference<any>;
12
12
  declare const SUPPORTED_STT_MODELS: {
13
13
  'gpt-4o-transcribe': genkit.ModelReference<any>;
14
+ 'gpt-4o-mini-transcribe': genkit.ModelReference<any>;
14
15
  'whisper-1': genkit.ModelReference<any>;
15
16
  };
16
17
 
@@ -11,6 +11,7 @@ declare function openAITranscriptionModelRef<CustomOptions extends z.ZodTypeAny
11
11
  }): genkit.ModelReference<any>;
12
12
  declare const SUPPORTED_STT_MODELS: {
13
13
  'gpt-4o-transcribe': genkit.ModelReference<any>;
14
+ 'gpt-4o-mini-transcribe': genkit.ModelReference<any>;
14
15
  'whisper-1': genkit.ModelReference<any>;
15
16
  };
16
17
 
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var whisper_exports = {};
20
- __export(whisper_exports, {
19
+ var stt_exports = {};
20
+ __export(stt_exports, {
21
21
  SUPPORTED_STT_MODELS: () => SUPPORTED_STT_MODELS,
22
22
  openAITranscriptionModelRef: () => openAITranscriptionModelRef
23
23
  });
24
- module.exports = __toCommonJS(whisper_exports);
24
+ module.exports = __toCommonJS(stt_exports);
25
25
  var import_audio = require("../audio");
26
26
  function openAITranscriptionModelRef(params) {
27
27
  return (0, import_audio.compatOaiTranscriptionModelRef)({ ...params, namespace: "openai" });
@@ -30,6 +30,9 @@ const SUPPORTED_STT_MODELS = {
30
30
  "gpt-4o-transcribe": openAITranscriptionModelRef({
31
31
  name: "gpt-4o-transcribe"
32
32
  }),
33
+ "gpt-4o-mini-transcribe": openAITranscriptionModelRef({
34
+ name: "gpt-4o-mini-transcribe"
35
+ }),
33
36
  "whisper-1": openAITranscriptionModelRef({
34
37
  name: "whisper-1"
35
38
  })
@@ -39,4 +42,4 @@ const SUPPORTED_STT_MODELS = {
39
42
  SUPPORTED_STT_MODELS,
40
43
  openAITranscriptionModelRef
41
44
  });
42
- //# sourceMappingURL=whisper.js.map
45
+ //# sourceMappingURL=stt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/openai/stt.ts"],"sourcesContent":["/**\n * Copyright 2024 The Fire Company\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'genkit';\nimport { ModelInfo } from 'genkit/model';\nimport { compatOaiTranscriptionModelRef } from '../audio';\n\n/** OpenAI transcription ModelRef helper, same as the OpenAI-compatible spec. */\nexport function openAITranscriptionModelRef<\n CustomOptions extends z.ZodTypeAny = z.ZodTypeAny,\n>(params: {\n name: string;\n info?: ModelInfo;\n configSchema?: CustomOptions;\n config?: any;\n}) {\n return compatOaiTranscriptionModelRef({ ...params, namespace: 'openai' });\n}\n\nexport const SUPPORTED_STT_MODELS = {\n 'gpt-4o-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-transcribe',\n }),\n 'gpt-4o-mini-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-mini-transcribe',\n }),\n 'whisper-1': openAITranscriptionModelRef({\n name: 'whisper-1',\n }),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,mBAA+C;AAGxC,SAAS,4BAEd,QAKC;AACD,aAAO,6CAA+B,EAAE,GAAG,QAAQ,WAAW,SAAS,CAAC;AAC1E;AAEO,MAAM,uBAAuB;AAAA,EAClC,qBAAqB,4BAA4B;AAAA,IAC/C,MAAM;AAAA,EACR,CAAC;AAAA,EACD,0BAA0B,4BAA4B;AAAA,IACpD,MAAM;AAAA,EACR,CAAC;AAAA,EACD,aAAa,4BAA4B;AAAA,IACvC,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}
@@ -6,6 +6,9 @@ const SUPPORTED_STT_MODELS = {
6
6
  "gpt-4o-transcribe": openAITranscriptionModelRef({
7
7
  name: "gpt-4o-transcribe"
8
8
  }),
9
+ "gpt-4o-mini-transcribe": openAITranscriptionModelRef({
10
+ name: "gpt-4o-mini-transcribe"
11
+ }),
9
12
  "whisper-1": openAITranscriptionModelRef({
10
13
  name: "whisper-1"
11
14
  })
@@ -14,4 +17,4 @@ export {
14
17
  SUPPORTED_STT_MODELS,
15
18
  openAITranscriptionModelRef
16
19
  };
17
- //# sourceMappingURL=whisper.mjs.map
20
+ //# sourceMappingURL=stt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/openai/stt.ts"],"sourcesContent":["/**\n * Copyright 2024 The Fire Company\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'genkit';\nimport { ModelInfo } from 'genkit/model';\nimport { compatOaiTranscriptionModelRef } from '../audio';\n\n/** OpenAI transcription ModelRef helper, same as the OpenAI-compatible spec. */\nexport function openAITranscriptionModelRef<\n CustomOptions extends z.ZodTypeAny = z.ZodTypeAny,\n>(params: {\n name: string;\n info?: ModelInfo;\n configSchema?: CustomOptions;\n config?: any;\n}) {\n return compatOaiTranscriptionModelRef({ ...params, namespace: 'openai' });\n}\n\nexport const SUPPORTED_STT_MODELS = {\n 'gpt-4o-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-transcribe',\n }),\n 'gpt-4o-mini-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-mini-transcribe',\n }),\n 'whisper-1': openAITranscriptionModelRef({\n name: 'whisper-1',\n }),\n};\n"],"mappings":"AAmBA,SAAS,sCAAsC;AAGxC,SAAS,4BAEd,QAKC;AACD,SAAO,+BAA+B,EAAE,GAAG,QAAQ,WAAW,SAAS,CAAC;AAC1E;AAEO,MAAM,uBAAuB;AAAA,EAClC,qBAAqB,4BAA4B;AAAA,IAC/C,MAAM;AAAA,EACR,CAAC;AAAA,EACD,0BAA0B,4BAA4B;AAAA,IACpD,MAAM;AAAA,EACR,CAAC;AAAA,EACD,aAAa,4BAA4B;AAAA,IACvC,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}
package/lib/utils.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { GenerateRequest } from 'genkit';
2
2
  import { EmbedRequest } from 'genkit/embedder';
3
3
  import OpenAI from 'openai';
4
- import { P as PluginOptions } from './audio-CUuCwm-y.mjs';
4
+ import { P as PluginOptions } from './audio-CJ8rzf35.mjs';
5
5
  import 'genkit/model';
6
+ import 'openai/core.mjs';
6
7
  import 'openai/resources/audio/index.mjs';
7
8
  import 'genkit/plugin';
8
9
  import 'genkit/registry';
package/lib/utils.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { GenerateRequest } from 'genkit';
2
2
  import { EmbedRequest } from 'genkit/embedder';
3
3
  import OpenAI from 'openai';
4
- import { P as PluginOptions } from './audio-CUuCwm-y.js';
4
+ import { P as PluginOptions } from './audio-CJ8rzf35.js';
5
5
  import 'genkit/model';
6
+ import 'openai/core.mjs';
6
7
  import 'openai/resources/audio/index.mjs';
7
8
  import 'genkit/plugin';
8
9
  import 'genkit/registry';
@@ -1,7 +1,8 @@
1
1
  import { z } from 'genkit';
2
2
  import { ModelInfo, ModelReference } from 'genkit/model';
3
- import { M as ModelRequestBuilder } from '../audio-CUuCwm-y.mjs';
3
+ import { M as ModelRequestBuilder } from '../audio-CJ8rzf35.mjs';
4
4
  import 'openai';
5
+ import 'openai/core.mjs';
5
6
  import 'openai/resources/audio/index.mjs';
6
7
  import 'genkit/plugin';
7
8
  import 'genkit/registry';
package/lib/xai/grok.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { z } from 'genkit';
2
2
  import { ModelInfo, ModelReference } from 'genkit/model';
3
- import { M as ModelRequestBuilder } from '../audio-CUuCwm-y.js';
3
+ import { M as ModelRequestBuilder } from '../audio-CJ8rzf35.js';
4
4
  import 'openai';
5
+ import 'openai/core.mjs';
5
6
  import 'openai/resources/audio/index.mjs';
6
7
  import 'genkit/plugin';
7
8
  import 'genkit/registry';
@@ -1,10 +1,11 @@
1
1
  import { z, ModelReference } from 'genkit';
2
2
  import { GenkitPluginV2 } from 'genkit/plugin';
3
- import { P as PluginOptions, I as ImageGenerationCommonConfigSchema } from '../audio-CUuCwm-y.mjs';
3
+ import { P as PluginOptions, I as ImageGenerationCommonConfigSchema } from '../audio-CJ8rzf35.mjs';
4
4
  import { SUPPORTED_IMAGE_MODELS } from './grok-image.mjs';
5
5
  import { SUPPORTED_LANGUAGE_MODELS, XaiChatCompletionConfigSchema } from './grok.mjs';
6
6
  import 'genkit/model';
7
7
  import 'openai';
8
+ import 'openai/core.mjs';
8
9
  import 'openai/resources/audio/index.mjs';
9
10
  import 'genkit/registry';
10
11
  import 'openai/resources/images.mjs';
@@ -1,10 +1,11 @@
1
1
  import { z, ModelReference } from 'genkit';
2
2
  import { GenkitPluginV2 } from 'genkit/plugin';
3
- import { P as PluginOptions, I as ImageGenerationCommonConfigSchema } from '../audio-CUuCwm-y.js';
3
+ import { P as PluginOptions, I as ImageGenerationCommonConfigSchema } from '../audio-CJ8rzf35.js';
4
4
  import { SUPPORTED_IMAGE_MODELS } from './grok-image.js';
5
5
  import { SUPPORTED_LANGUAGE_MODELS, XaiChatCompletionConfigSchema } from './grok.js';
6
6
  import 'genkit/model';
7
7
  import 'openai';
8
+ import 'openai/core.mjs';
8
9
  import 'openai/resources/audio/index.mjs';
9
10
  import 'genkit/registry';
10
11
  import 'openai/resources/images.mjs';
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "genai",
12
12
  "generative-ai"
13
13
  ],
14
- "version": "1.28.0",
14
+ "version": "1.29.0",
15
15
  "type": "commonjs",
16
16
  "repository": {
17
17
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "openai": "^4.95.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "genkit": "^1.28.0"
27
+ "genkit": "^1.29.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@jest/globals": "^29.7.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/openai/whisper.ts"],"sourcesContent":["/**\n * Copyright 2024 The Fire Company\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'genkit';\nimport { ModelInfo } from 'genkit/model';\nimport { compatOaiTranscriptionModelRef } from '../audio';\n\n/** OpenAI transcription ModelRef helper, same as the OpenAI-compatible spec. */\nexport function openAITranscriptionModelRef<\n CustomOptions extends z.ZodTypeAny = z.ZodTypeAny,\n>(params: {\n name: string;\n info?: ModelInfo;\n configSchema?: CustomOptions;\n config?: any;\n}) {\n return compatOaiTranscriptionModelRef({ ...params, namespace: 'openai' });\n}\n\nexport const SUPPORTED_STT_MODELS = {\n 'gpt-4o-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-transcribe',\n }),\n 'whisper-1': openAITranscriptionModelRef({\n name: 'whisper-1',\n }),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,mBAA+C;AAGxC,SAAS,4BAEd,QAKC;AACD,aAAO,6CAA+B,EAAE,GAAG,QAAQ,WAAW,SAAS,CAAC;AAC1E;AAEO,MAAM,uBAAuB;AAAA,EAClC,qBAAqB,4BAA4B;AAAA,IAC/C,MAAM;AAAA,EACR,CAAC;AAAA,EACD,aAAa,4BAA4B;AAAA,IACvC,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/openai/whisper.ts"],"sourcesContent":["/**\n * Copyright 2024 The Fire Company\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { z } from 'genkit';\nimport { ModelInfo } from 'genkit/model';\nimport { compatOaiTranscriptionModelRef } from '../audio';\n\n/** OpenAI transcription ModelRef helper, same as the OpenAI-compatible spec. */\nexport function openAITranscriptionModelRef<\n CustomOptions extends z.ZodTypeAny = z.ZodTypeAny,\n>(params: {\n name: string;\n info?: ModelInfo;\n configSchema?: CustomOptions;\n config?: any;\n}) {\n return compatOaiTranscriptionModelRef({ ...params, namespace: 'openai' });\n}\n\nexport const SUPPORTED_STT_MODELS = {\n 'gpt-4o-transcribe': openAITranscriptionModelRef({\n name: 'gpt-4o-transcribe',\n }),\n 'whisper-1': openAITranscriptionModelRef({\n name: 'whisper-1',\n }),\n};\n"],"mappings":"AAmBA,SAAS,sCAAsC;AAGxC,SAAS,4BAEd,QAKC;AACD,SAAO,+BAA+B,EAAE,GAAG,QAAQ,WAAW,SAAS,CAAC;AAC1E;AAEO,MAAM,uBAAuB;AAAA,EAClC,qBAAqB,4BAA4B;AAAA,IAC/C,MAAM;AAAA,EACR,CAAC;AAAA,EACD,aAAa,4BAA4B;AAAA,IACvC,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}