-
Notifications
You must be signed in to change notification settings - Fork 1
Project setup #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0ee4c31
7f4d691
e6f0424
c496d32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| venv/ | ||
| .venv/ | ||
| __pycache__/ | ||
| *.pyc | ||
| .env | ||
| temp/ | ||
| chroma_db/ | ||
| node_modules/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,113 @@ | ||
| # scholarai | ||
| AI-powered research assistant designed to help students and scientists navigate large volumes of academic literature. Supports paper discovery, summarization, citation exploration, and question answering across research papers. Helps organize knowledge, identify trends, and accelerate literature review workflows. | ||
| # ScholarAI | ||
|
|
||
| Open-source AI-powered research assistant by Alpha One Labs. | ||
| Ask research questions, summarise papers, discover literature, and generate reviews — | ||
| all powered by **Cloudflare Workers AI** (`@cf/meta/llama-3.1-8b-instruct`). | ||
|
|
||
| --- | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| scholarai/ | ||
| ├── src/ | ||
| │ └── worker.py # Single Python Worker — routing + AI logic | ||
| ├── static/ | ||
| │ └── index.html # Full frontend (HTML/CSS/JS, no build step) | ||
| ├── wrangler.jsonc # Cloudflare Workers config | ||
| ├── package.json # npm scripts for Wrangler CLI | ||
| └── README.md | ||
| ``` | ||
|
Comment on lines
+11
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a language to the project-tree fence. Markdownlint is flagging this block with MD040. A simple 📝 Minimal fix-```
+```text
scholarai/
├── src/
│ └── worker.py # Single Python Worker — routing + AI logic
├── static/
│ └── index.html # Full frontend (HTML/CSS/JS, no build step)
├── wrangler.jsonc # Cloudflare Workers config
├── package.json # npm scripts for Wrangler CLI
└── README.mdVerify each finding against the current code and only fix it if needed. In |
||
|
|
||
| --- | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Node.js](https://nodejs.org/) ≥ 18 | ||
| - A free [Cloudflare account](https://dash.cloudflare.com/sign-up) | ||
|
|
||
| ### 1. Install Wrangler | ||
|
|
||
| ```bash | ||
| npm install | ||
| npx wrangler login | ||
| ``` | ||
|
|
||
| ### 2. Run locally | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| Opens at `http://localhost:8787`. | ||
|
|
||
| ### 3. Deploy | ||
|
|
||
| ```bash | ||
| npm run deploy | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## API Endpoints | ||
|
|
||
| | Method | Endpoint | Description | | ||
| |--------|-----------------|-------------------------------| | ||
| | GET | `/` | Serves the frontend HTML | | ||
| | GET | `/api/health` | Health check | | ||
| | POST | `/api/ask` | Ask a research question | | ||
| | POST | `/api/summarize`| Summarise a paper | | ||
| | POST | `/api/discover` | Discover relevant papers | | ||
| | POST | `/api/review` | Generate a literature review | | ||
|
|
||
| ### `POST /api/ask` | ||
|
|
||
| ```json | ||
| { "question": "What is transfer learning?", "context": "(optional excerpt)" } | ||
| ``` | ||
|
|
||
| ### `POST /api/summarize` | ||
|
|
||
| ```json | ||
| { "title": "...", "abstract": "...", "content": "..." } | ||
| ``` | ||
|
|
||
| At least one field required. | ||
|
|
||
| ### `POST /api/discover` | ||
|
|
||
| ```json | ||
| { "query": "graph neural networks", "fields": ["ML", "biology"], "limit": 10 } | ||
| ``` | ||
|
|
||
| ### `POST /api/review` | ||
|
|
||
| ```json | ||
| { "topic": "self-supervised learning", "style": "comprehensive", "audience": "researchers" } | ||
| ``` | ||
|
|
||
| `style` options: `comprehensive`, `brief`, `systematic` | ||
|
|
||
| --- | ||
|
|
||
| ## Contributing | ||
|
|
||
| 1. Fork the repo | ||
| 2. Create a branch: `git checkout -b feat/your-change` | ||
| 3. Commit and open a Pull Request with a clear description | ||
|
|
||
| Please open an issue first for large changes. | ||
|
|
||
| --- | ||
|
|
||
| ## License | ||
|
|
||
| See [LICENSE](LICENSE). | ||
|
|
||
| --- | ||
|
|
||
| ## Maintained by | ||
|
|
||
| **Alpha One Labs** — open-source AI tooling for practical research workflows. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore Wrangler’s generated workspace before merging.
.wrangler/tmp/**artifacts are already in this PR, and the checked-in bundles contain absolute/home/ghanshyam-singh/...imports. Please ignore.wrangler/and remove the committed temp bundle from the branch so localwrangler dev/deployruns stop churning machine-specific files in source control.🧹 Minimal ignore fix
chroma_db/ node_modules/ +.wrangler/📝 Committable suggestion
🤖 Prompt for AI Agents