AdityaNG / AdityaNG/PaperReview
Add support for selecting GPT Model
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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"
)
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.