Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pglez82 committed Feb 17, 2025
1 parent 7f08852 commit d527833
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion llmservice/llm-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ app.post('/ask', async (req, res) => {
//load the api key from an environment variable
const apiKey = process.env.LLM_API_KEY;
if (!apiKey) {
console.log("LLM API key missing")
return res.status(400).json({ error: 'API key is missing.' });
}
const answer = await sendQuestionToLLM(question, apiKey, model);
Expand Down
3 changes: 3 additions & 0 deletions llmservice/llm-service.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//set a fake api key
process.env.LLM_API_KEY = 'test-api-key';

const request = require('supertest');
const axios = require('axios');
const app = require('./llm-service');
Expand Down

0 comments on commit d527833

Please sign in to comment.