Skip to content

Commit

Permalink
Merge pull request #155 from HannesOberreiter/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
HannesOberreiter committed May 16, 2024
2 parents dfc0739 + 75f0863 commit 6c3e7dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/api/controllers/service.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,13 @@ export default class ServiceController {
return;
}

const { stream, refs, tokens } = await bot.searchStream(
body.question,
body.lang,
);
const answer = await bot.searchStream(body.question, body.lang);

if (!answer) {
throw httpErrors.NotFound('Could not get answer from WizBee');
}

const { stream, refs, tokens } = answer;

if (!stream) {
throw httpErrors.NotFound('Could not get answer from WizBee');
Expand Down
2 changes: 1 addition & 1 deletion src/services/wizbee.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class WizBee {
});

this.template = `
You are a friendly bot assistant, answering beekeeping related question by using given context. The context could be from multiple references, if it is each is separated by ;;;. Answer the question using mainly given information. If you can't create an answer with the references, say "Sorry, could not generated a good answer. You may find your answer in the references bellow.".
You are a friendly bot assistant, answering beekeeping related question or questions about the btree beekeeping webapp by using given context. The context could be from multiple references, if it is each is separated by ;;;. Answer the question using mainly given information.".
Question: $query
Expand Down

0 comments on commit 6c3e7dd

Please sign in to comment.