@skmtc/core 0.0.488 → 0.0.490

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 +1 @@
1
- {"version":3,"file":"handleEnrichment.d.ts","sourceRoot":"","sources":["../../src/run/handleEnrichment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AActE,eAAO,MAAM,gBAAgB,wCAA+C,iBAAiB,oBAmC5F,CAAA"}
1
+ {"version":3,"file":"handleEnrichment.d.ts","sourceRoot":"","sources":["../../src/run/handleEnrichment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAetE,eAAO,MAAM,gBAAgB,wCAA+C,iBAAiB,oBAmC5F,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { GoogleGenerativeAI } from '@google/generative-ai';
3
+ import { zodToJsonSchema } from 'zod-to-json-schema';
3
4
  const apiKey = dntShim.Deno.env.get('GEMINI_API_KEY');
4
5
  if (!apiKey) {
5
6
  throw new Error('GEMINI_API_KEY is not set');
@@ -16,7 +17,7 @@ export const handleEnrichment = async ({ prompt, content, responseSchema }) => {
16
17
  topK: 40,
17
18
  maxOutputTokens: 8192,
18
19
  responseMimeType: 'application/json',
19
- responseSchema
20
+ responseSchema: zodToJsonSchema(responseSchema)
20
21
  },
21
22
  history: [
22
23
  {
@@ -1,8 +1,8 @@
1
1
  import "../_dnt.polyfills.js";
2
- import type { ResponseSchema } from '@google/generative-ai';
2
+ import type { z } from 'zod';
3
3
  export type EnrichmentRequest = {
4
4
  prompt: string;
5
- responseSchema: ResponseSchema;
5
+ responseSchema: z.ZodType<unknown>;
6
6
  content: string;
7
7
  };
8
8
  //# sourceMappingURL=EnrichmentRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnrichmentRequest.d.ts","sourceRoot":"","sources":["../../src/types/EnrichmentRequest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA"}
1
+ {"version":3,"file":"EnrichmentRequest.d.ts","sourceRoot":"","sources":["../../src/types/EnrichmentRequest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.488",
3
+ "version": "0.0.490",
4
4
  "module": "./esm/mod.js",
5
5
  "exports": {
6
6
  ".": {
@@ -54,7 +54,8 @@
54
54
  "openapi-types": "12.1.3",
55
55
  "tiny-invariant": "1.3.3",
56
56
  "ts-pattern": "5.6.0",
57
- "zod": "3.24.1"
57
+ "zod": "3.24.1",
58
+ "zod-to-json-schema": "3.24.1"
58
59
  },
59
60
  "devDependencies": {
60
61
  "@types/lodash-es": "4.17.12",