AdityaNG / AdityaNG/PaperReview

Add support for selecting GPT Model

未关闭
#3 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement question
主要语言
Python
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

**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"
)
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。