fixing console

This commit is contained in:
Carlos
2025-04-10 00:40:22 -04:00
parent a9ebaee9aa
commit 537c62f808

View File

@ -42,10 +42,10 @@ app.post("/api/generate/chat/completions", validateApiKey, async (req, res) => {
"http://localhost:11434/api/generate",
req.body,
);
console.log("Response: ", response);
console.log("Response: ", response.data);
// Send the response from localhost:11434 back to the client
res.status(200).json(response.data);
res.status(response.status).json(response.data);
} catch (error) {
// Enhanced error logging
console.error(
@ -72,7 +72,7 @@ app.post("/api/generate", validateApiKey, async (req, res) => {
);
// Send the response from localhost:11434 back to the client
res.status(200).json(response.data);
res.status(response.status).json(response.data);
} catch (error) {
// Enhanced error logging
console.error(