adding fixes
This commit is contained in:
@ -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",
|
||||||
|
Reference in New Issue
Block a user