Skip to content
Snippets Groups Projects
Commit 9c852fae authored by Embruch, Gerd's avatar Embruch, Gerd
Browse files

fixed output

parent 6fcb8e62
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
......@@ -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
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment