AdityaNG / AdityaNG/PaperReview

Add support for selecting GPT Model

Abierto
#3 3 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement question
Lenguaje dominante
Python
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Is your feature request related to a problem? Please describe.**
Currently, the PaperReview tool only has support for the "text-davinci-003" GPT model. Users would like to have the option to be able to select the specific model by providing a CLI argument.

**Describe the solution you'd like**
I would like an additional command line argument along the following lines to accept the model name as input

```bash
paperreview --model text-davinci-003
```

**Additional context**
Following are a few relevant code snippets which are to be modified

```python
# helper.py
def ask_paper_text(
text: str,
question: str,
api_key: str = OPENAI_API_KEY,
model: str = "text-davinci-003",
max_tokens: int = 1000,
temperature: float = 0.5,
): # pragma: no cover
"""
Ask a question about a research paper using GPT.
"""
```

```python
# cli.py
with open(output_path, "w") as f:
for i, question in tqdm(
enumerate(Q_LIST), desc="Asking questions", total=len(Q_LIST)
):
print(f"Q{i+1}. {question}")
answer = ask_paper_text(text, question) # TODO: Add support for various GPT models
print(answer)
print("=" * 50)

f.write(
f"Question: {question}\nAnswer:\n{answer}\n"
+ ("=" * 50)
+ "\n"
)
```

Guía de contribución

Abrir la guía de contribución

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.