diff --git a/__tests__/auth/confirmpasswordreset.test.js b/__tests__/auth/confirmpasswordreset.test.js index bc46af2310c0295fa8343f998a7d1173356f913b..03b7467f39bae8d26b3becbf8e8519276731ded0 100644 --- a/__tests__/auth/confirmpasswordreset.test.js +++ b/__tests__/auth/confirmpasswordreset.test.js @@ -98,7 +98,7 @@ describe('user confirm password reset', () => { .send(input); }); it('should return a proper status code', () => { - expect(response.status).toBe(403); + expect(response.status).toBe(498); }); it('should respond with a proper body', () => { expect(response.body).toMatchSnapshot(); @@ -117,7 +117,7 @@ describe('user confirm password reset', () => { .send(input); }); it('should return a proper status code', () => { - expect(response.status).toBe(403); + expect(response.status).toBe(498); }); it('should respond with a proper body', () => { expect(response.body).toMatchSnapshot(); diff --git a/utils/handleAI.js b/utils/handleAI.js index b04c72e2f60cddff6fbac13c6d3ff107253db05a..dde2c62e6c1462c8726edcf4b356944445effc31 100644 --- a/utils/handleAI.js +++ b/utils/handleAI.js @@ -65,7 +65,8 @@ export const aiInstallModel = async (model) => { */ export const aiDeleteModel = async (model) => { try { - return await ollama.delete({ model }); + const message = await ollama.delete({ model }); + return { message: `model ${model} deleted` }; } catch (error) { throw error; } @@ -186,6 +187,8 @@ export const chat = async (req, res, next) => { const reliesOnDoc = await isFactual(req.body.model, result.answer, result.context[0].pageContent); let sourceLocation; + + console.log("🚀 ~ chat ~ reliesOnDoc.content.toLowerCase():", reliesOnDoc.content.toLowerCase()); if (reliesOnDoc.content.toLowerCase() === 'true') { const file = path.posix.basename(result.context[0].metadata.source); const posFrom = result.context[0].metadata.loc.lines.from; @@ -208,6 +211,8 @@ export const chat = async (req, res, next) => { + + /** ******************************************************* * CREATE AI SUMMARIZED TEXT */