Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qew21/autoleetcode
Automatically read Leetcode problems using Selenium, hand them over to different large models for processing, and automatically submit solutions while tracking accuracy rates.
https://github.com/qew21/autoleetcode
leetcode llm qwen2 selenium
Last synced: 12 days ago
JSON representation
Automatically read Leetcode problems using Selenium, hand them over to different large models for processing, and automatically submit solutions while tracking accuracy rates.
- Host: GitHub
- URL: https://github.com/qew21/autoleetcode
- Owner: qew21
- Created: 2024-06-13T15:41:55.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-07-03T15:28:05.000Z (6 months ago)
- Last Synced: 2024-11-06T20:15:45.894Z (2 months ago)
- Topics: leetcode, llm, qwen2, selenium
- Language: Python
- Homepage:
- Size: 178 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Autoleetcode
#### 介绍
使用selenium自动读取Leetcode题目,交给不同的大模型处理,自动提交统计正确率目前看顶尖的大模型尚不能高正确率的通过中等难度题目,预期通过微调AlchemistCoder提高准确率
#### 使用说明
1. 下载匹配Chrome浏览器版本的[driver](https://googlechromelabs.github.io/chrome-for-testing/#stable)
2. 将driver放到当前目录下
3. 参考如下配置修改配置中的ApiKey和BaseUrl等参数
4. 安装依赖,运行 ```python main.py```
5. 处于登录状态时,会自动跳转到登录页面,登录成功后会自动跳转到题目页面
```json5
{
"BaseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1", // dashscope api url
"ApiKey": "sk-****", // dashscope api key
"Model": "qwen2-72b-instruct", // model name
"Level": "hard", // difficulty level
"Skip": false, // skip already solved problems
"Count": 100, // problem count
"StartPage": 1 // start page
}
```#### 示例
![demo](demo.jpg)
---
#### Introduction
Automatically read Leetcode problems using Selenium, hand them over to different large models for processing, and automatically submit solutions while tracking accuracy rates.It appears that even top-tier large models struggle to achieve high accuracy on medium difficulty problems. The expectation is to improve accuracy by fine-tuning the AlchemistCoder model.
#### Instructions
1. Download the driver [here](https://googlechromelabs.github.io/chrome-for-testing/#stable) that matches your Chrome browser version.
2. Place the driver in the current directory.
3. Create a `config.json` file based on example below, modifying parameters such as ApiKey and BaseUrl.
4. Install requirements and run ```python main.py```
5. When in a logged-out state, the system will automatically redirect to the login page; after successful login, it will automatically navigate to the problem page.