@skmtc/core 0.0.510 → 0.0.512

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;AAetE,eAAO,MAAM,gBAAgB,GAAU,cAAc,0DAIlD,iBAAiB,CAAC,cAAc,CAAC,oBAqCnC,CAAA;AAGD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
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,GAAU,cAAc,0DAIlD,iBAAiB,CAAC,cAAc,CAAC,oBAuBnC,CAAA;AAGD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
@@ -13,6 +13,9 @@ export const handleEnrichment = async ({ prompt, content, responseSchema: zodRes
13
13
  const responseSchema = zodToJsonSchema(zodResponseSchema, {
14
14
  target: 'openApi3'
15
15
  });
16
+ console.log('RESPONSE SCHEMA', responseSchema);
17
+ console.log('PROMPT', prompt);
18
+ console.log('CONTENT', content);
16
19
  const chatSession = model.startChat({
17
20
  generationConfig: {
18
21
  temperature: 1,
@@ -21,25 +24,7 @@ export const handleEnrichment = async ({ prompt, content, responseSchema: zodRes
21
24
  maxOutputTokens: 8192,
22
25
  responseMimeType: 'application/json',
23
26
  responseSchema: removeProperties(responseSchema, 'additionalProperties')
24
- },
25
- history: [
26
- {
27
- role: 'user',
28
- parts: [
29
- {
30
- text: "Below is part of an openapi schema.\\n- Does the provided endpoint return paginated data\\n- If it does, please provide an object path to access the response list\n\nPaginatedAbilitySummaryList:\n type: object\n properties:\n count:\n type: integer\n example: 123\n next:\n type: string\n nullable: true\n format: uri\n example: http://api.example.org/accounts/?offset=400&limit=100\n previous:\n type: string\n nullable: true\n format: uri\n example: http://api.example.org/accounts/?offset=200&limit=100\n results:\n type: array\n items:\n $ref: '#/components/schemas/AbilitySummary'"
31
- }
32
- ]
33
- },
34
- {
35
- role: 'model',
36
- parts: [
37
- { text: '```json\n' },
38
- { text: '{"isPaginated": true, "pathToList": "results"}' },
39
- { text: '\n```' }
40
- ]
41
- }
42
- ]
27
+ }
43
28
  });
44
29
  const result = await chatSession.sendMessage(`${prompt}\n\n${content}`);
45
30
  return result.response.text();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.510",
3
+ "version": "0.0.512",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -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;AAetE,eAAO,MAAM,gBAAgB,GAAU,cAAc,0DAIlD,iBAAiB,CAAC,cAAc,CAAC,oBAqCnC,CAAA;AAGD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
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,GAAU,cAAc,0DAIlD,iBAAiB,CAAC,cAAc,CAAC,oBAuBnC,CAAA;AAGD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
@@ -40,6 +40,9 @@ const handleEnrichment = async ({ prompt, content, responseSchema: zodResponseSc
40
40
  const responseSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(zodResponseSchema, {
41
41
  target: 'openApi3'
42
42
  });
43
+ console.log('RESPONSE SCHEMA', responseSchema);
44
+ console.log('PROMPT', prompt);
45
+ console.log('CONTENT', content);
43
46
  const chatSession = model.startChat({
44
47
  generationConfig: {
45
48
  temperature: 1,
@@ -48,25 +51,7 @@ const handleEnrichment = async ({ prompt, content, responseSchema: zodResponseSc
48
51
  maxOutputTokens: 8192,
49
52
  responseMimeType: 'application/json',
50
53
  responseSchema: removeProperties(responseSchema, 'additionalProperties')
51
- },
52
- history: [
53
- {
54
- role: 'user',
55
- parts: [
56
- {
57
- text: "Below is part of an openapi schema.\\n- Does the provided endpoint return paginated data\\n- If it does, please provide an object path to access the response list\n\nPaginatedAbilitySummaryList:\n type: object\n properties:\n count:\n type: integer\n example: 123\n next:\n type: string\n nullable: true\n format: uri\n example: http://api.example.org/accounts/?offset=400&limit=100\n previous:\n type: string\n nullable: true\n format: uri\n example: http://api.example.org/accounts/?offset=200&limit=100\n results:\n type: array\n items:\n $ref: '#/components/schemas/AbilitySummary'"
58
- }
59
- ]
60
- },
61
- {
62
- role: 'model',
63
- parts: [
64
- { text: '```json\n' },
65
- { text: '{"isPaginated": true, "pathToList": "results"}' },
66
- { text: '\n```' }
67
- ]
68
- }
69
- ]
54
+ }
70
55
  });
71
56
  const result = await chatSession.sendMessage(`${prompt}\n\n${content}`);
72
57
  return result.response.text();