token count for search
This commit is contained in:
@@ -5,7 +5,7 @@ export function createSearchRouter(searchService, broadcast) {
|
||||
const router = Router();
|
||||
|
||||
router.post('/', async (request, response) => {
|
||||
const { question } = request.body;
|
||||
const { question, previousClarification, originalQuestion } = request.body;
|
||||
|
||||
if (!question) {
|
||||
response.status(400).json({
|
||||
@@ -16,7 +16,7 @@ export function createSearchRouter(searchService, broadcast) {
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await searchService.search(question);
|
||||
const result = await searchService.search(question, previousClarification, originalQuestion);
|
||||
response.json(result);
|
||||
} catch (error) {
|
||||
if (error instanceof SearchServiceError) {
|
||||
|
||||
Reference in New Issue
Block a user