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 dbConfig = require('./config/database');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 5000;
|
const PORT = process.env.PORT || 5500;
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ router.post('/process-extraction', authenticateToken, async (req, res) => {
|
|||||||
const { kUmsatzBeleg, markDown } = umsatzResult.recordset[0];
|
const { kUmsatzBeleg, markDown } = umsatzResult.recordset[0];
|
||||||
|
|
||||||
const response = await openai.responses.create({
|
const response = await openai.responses.create({
|
||||||
model: "gpt-4o-mini",
|
model: "gpt-5-mini",
|
||||||
input: [
|
input: [
|
||||||
{ "role": "developer", "content": [{ "type": "input_text", "text": `Extract specified information from provided input and structure it in a JSON format.
|
{ "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 }
|
}, "required": ["date", "invoice_number", "net_amounts_and_tax", "gross_amount", "currency", "country", "sender", "creditorID"], "additionalProperties": false }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reasoning: { "effort": "medium", "summary": "auto" },
|
|
||||||
tools: [],
|
tools: [],
|
||||||
store: false
|
store: false
|
||||||
});
|
});
|
||||||
@@ -250,7 +249,7 @@ router.post('/process-extraction', authenticateToken, async (req, res) => {
|
|||||||
const { kPdfObjekt, markDown } = pdfResult.recordset[0];
|
const { kPdfObjekt, markDown } = pdfResult.recordset[0];
|
||||||
|
|
||||||
const response = await openai.responses.create({
|
const response = await openai.responses.create({
|
||||||
model: "gpt-4o-mini",
|
model: "gpt-5-mini",
|
||||||
input: [
|
input: [
|
||||||
{ "role": "developer", "content": [{ "type": "input_text", "text": `Extract specified information from provided input and structure it in a JSON format.
|
{ "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 }
|
}, "required": ["date", "invoice_number", "net_amounts_and_tax", "gross_amount", "currency", "country", "sender", "creditorID"], "additionalProperties": false }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reasoning: { "effort": "medium", "summary": "auto" },
|
|
||||||
tools: [],
|
tools: [],
|
||||||
store: false
|
store: false
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:5000',
|
target: 'http://localhost:5500',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:5000',
|
target: 'http://localhost:5500',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user