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.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ module.exports = {
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:5000',
|
||||
target: 'http://localhost:5500',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user