From bcd7eea1b406fc8d4f60def22c538fa9c8a27ea4 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Fri, 8 Aug 2025 10:31:33 +0200 Subject: [PATCH] Update API target and port configuration; upgrade OpenAI model version - Changed API proxy target from localhost:5000 to localhost:5500 in both webpack configurations. - Updated server port from 5000 to 5500 in src/index.js for consistency. - Upgraded OpenAI model from "gpt-4o-mini" to "gpt-5-mini" in document processing routes, enhancing processing capabilities. --- src/index.js | 2 +- src/routes/data/documentProcessing.js | 6 ++---- webpack.config.js | 2 +- webpack.prod.config.js | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 9e87cb7..f418d41 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ const dataRoutes = require('./routes/data'); const dbConfig = require('./config/database'); const app = express(); -const PORT = process.env.PORT || 5000; +const PORT = process.env.PORT || 5500; // Middleware app.use(cors()); diff --git a/src/routes/data/documentProcessing.js b/src/routes/data/documentProcessing.js index 8c6c76d..66b0b30 100644 --- a/src/routes/data/documentProcessing.js +++ b/src/routes/data/documentProcessing.js @@ -178,7 +178,7 @@ router.post('/process-extraction', authenticateToken, async (req, res) => { const { kUmsatzBeleg, markDown } = umsatzResult.recordset[0]; const response = await openai.responses.create({ - model: "gpt-4o-mini", + model: "gpt-5-mini", input: [ { "role": "developer", "content": [{ "type": "input_text", "text": `Extract specified information from provided input and structure it in a JSON format. @@ -228,7 +228,6 @@ router.post('/process-extraction', authenticateToken, async (req, res) => { }, "required": ["date", "invoice_number", "net_amounts_and_tax", "gross_amount", "currency", "country", "sender", "creditorID"], "additionalProperties": false } } }, - reasoning: { "effort": "medium", "summary": "auto" }, tools: [], store: false }); @@ -250,7 +249,7 @@ router.post('/process-extraction', authenticateToken, async (req, res) => { const { kPdfObjekt, markDown } = pdfResult.recordset[0]; const response = await openai.responses.create({ - model: "gpt-4o-mini", + model: "gpt-5-mini", input: [ { "role": "developer", "content": [{ "type": "input_text", "text": `Extract specified information from provided input and structure it in a JSON format. @@ -300,7 +299,6 @@ router.post('/process-extraction', authenticateToken, async (req, res) => { }, "required": ["date", "invoice_number", "net_amounts_and_tax", "gross_amount", "currency", "country", "sender", "creditorID"], "additionalProperties": false } } }, - reasoning: { "effort": "medium", "summary": "auto" }, tools: [], store: false }); diff --git a/webpack.config.js b/webpack.config.js index 5c1ecc1..ba5c1c5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -75,7 +75,7 @@ module.exports = { }, proxy: { '/api': { - target: 'http://localhost:5000', + target: 'http://localhost:5500', changeOrigin: true, }, }, diff --git a/webpack.prod.config.js b/webpack.prod.config.js index 36a58a5..7bc5bf9 100644 --- a/webpack.prod.config.js +++ b/webpack.prod.config.js @@ -85,7 +85,7 @@ module.exports = { }, proxy: { '/api': { - target: 'http://localhost:5000', + target: 'http://localhost:5500', changeOrigin: true, }, }, @@ -94,4 +94,4 @@ module.exports = { maxAssetSize: 512000, maxEntrypointSize: 512000, }, -}; \ No newline at end of file +};