AI validation improvements, misc changes related to migrating to netcup

This commit is contained in:
2025-10-02 20:59:48 -04:00
parent 60875c25a6
commit 7b7274f72c
22 changed files with 454 additions and 266 deletions

View File

@@ -68,8 +68,6 @@ const AI_VALIDATION_JSON_SCHEMA = {
"changes",
"warnings",
"summary",
"qualityNotes",
"nextSteps",
"metadata"
],
properties: {
@@ -102,20 +100,6 @@ const AI_VALIDATION_JSON_SCHEMA = {
type: "string",
default: "",
},
qualityNotes: {
type: "array",
items: {
type: "string",
},
default: [],
},
nextSteps: {
type: "array",
items: {
type: "string",
},
default: [],
},
metadata: {
type: "object",
properties: {},
@@ -1023,7 +1007,7 @@ router.post("/validate", async (req, res) => {
input: [
{
role: "developer",
content: `${promptData.systemInstructions}\n\nYou MUST respond with a single valid JSON object containing the following top-level keys: correctedData, changes, warnings, summary, qualityNotes, nextSteps, metadata.\n- correctedData: array of product objects reflecting the updated data.\n- changes: array of human-readable bullet points summarizing the nature of updates.\n- warnings: array of caveats or risks that still require review.\n- summary: a concise paragraph (<=75 words) describing overall data quality and improvements.\n- qualityNotes: array of short comments (<=40 words each) about validation quality or notable observations.\n- nextSteps: array of recommended manual follow-up actions (if none, provide an empty array).\n- metadata: object containing any supplemental machine-readable information (optional fields allowed).\nDo NOT include Markdown code fences or any text outside the JSON object.`,
content: `${promptData.systemInstructions}\n\nYou MUST respond with a single valid JSON object containing the following top-level keys: correctedData, changes, warnings, summary, metadata.\n- correctedData: array of product objects reflecting the updated data.\n- changes: array of human-readable bullet points summarizing the nature of updates.\n- warnings: array of caveats or risks that still require review.\n- summary: a concise paragraph (<=75 words) describing overall data quality and improvements.\n- metadata: object containing any supplemental machine-readable information (optional fields allowed).\nDo NOT include Markdown code fences or any text outside the JSON object.`,
},
{
role: "user",

0
inventory-server/src/routes/products.js Executable file → Normal file
View File

0
inventory-server/src/server.js Executable file → Normal file
View File

0
inventory-server/src/utils/csvImporter.js Executable file → Normal file
View File