adding fixes

This commit is contained in:
Carlos
2025-04-10 00:33:28 -04:00
parent c54e4197f2
commit 063efc4d1c

View File

@ -37,9 +37,6 @@ const validateApiKey = (req, res, next) => {
app.post("/api/generate/chat/completions", validateApiKey, async (req, res) => { app.post("/api/generate/chat/completions", validateApiKey, async (req, res) => {
try { try {
// Forwarding the request to localhost:11434 with the prompt // Forwarding the request to localhost:11434 with the prompt
const authHeader = req.headers["authorization"];
console.log("Authorization header:", authHeader);
console.log("checking api", apiKey !== process.env.API_KEY);
console.log("Body: ", req.body); console.log("Body: ", req.body);
const response = await axios.post( const response = await axios.post(
"http://localhost:11434/api/generate", "http://localhost:11434/api/generate",