AOSSIE-Org / AOSSIE-Org/EduAid

[BUG]: /get_boolq_hard endpoint always crashes with ValueError due to invalid answer_style

Abierto
#454 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
JavaScript
Estrellas
171
Forks
425
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Bug Description

Bug Description :---

The `/get_boolq_hard` endpoint in [server.py] always raises a `ValueError` on every
request because it passes `answer_style="true_false"` which is not a valid value.

Root Cause :---

In [server.py] generated = qg.generate(
article=input_text,
num_questions=input_questions,
answer_style="true_false" #issue

In line 468 of Generator/main.py the only valid values accepted are ["all", "sentences", "multiple_choice"]

### Steps to Reproduce

Send any POST request to /get_boolq_hard with valid input.

### Logs and Screenshots

_No response_

### Environment Details

OS:Windows 11
Python:3.11.9

### Impact

Medium - Feature works but has issues

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.