English | 中文
AutoToxReporter is a locally running AI-assisted toxicology report writing website for chemical retrieval, report outline generation, report writing, citation traceability, and report export.
The project uses a frontend-backend separated architecture:
- Frontend: Vue 3 + Vite + Tailwind CSS + Element Plus + Pinia + vue-i18n
- Backend: FastAPI
- Core capabilities: toxicology report generation, report evaluation, and related utility code under
backend/tox_core/
- Chemical retrieval: retrieve CAS, names, SMILES, and structure images through a local QSAR Toolbox API.
- Outline generation: supports normal mode and professional mode, where multiple models can generate outlines separately and then integrate them.
- Custom outline: supports directly entering, pasting, or editing report outlines.
- Report generation: supports report writing, deep reflection, secondary reflection, and format checking.
- Real-time progress: pushes report generation phase status to the frontend through SSE.
- Report preview: supports Markdown rendering, table display, citation markers, and data traceability cards.
- Report export: supports Markdown, TXT, and PDF.
- Model configuration: users can configure model providers, API keys, Base URLs, and model pools in the web settings.
.
├── .gitignore # Git ignore rules for dependencies, build artifacts, environment files, and generated outputs
├── README.md # Project README
├── index.html # Vite frontend entry HTML
├── package.json # Frontend dependencies, scripts, and project metadata
├── package-lock.json # Frontend dependency lock file
├── requirements.txt # Backend Python dependency list
├── vite.config.js # Vite build configuration
├── backend/ # FastAPI backend and toxicology core code
│ ├── __init__.py # Python package marker
│ ├── main.py # FastAPI app entry, CORS configuration, and router registration
│ ├── routers/ # Backend API routers
│ │ ├── __init__.py # Router package marker
│ │ ├── chemical.py # Chemical retrieval and service connectivity test APIs
│ │ ├── outline.py # Report outline generation API
│ │ └── report.py # Report task, SSE stream, task cancellation, and report export APIs
│ └── tox_core/ # Toxicology report generation, evaluation, and utility code
│ ├── .env.example # Backend environment variable example file without real secrets
│ ├── prompts.py # Prompts for report generation, reflection, checking, and evaluation
│ ├── template_generation.py # Core report outline generation logic
│ ├── report_generation.py # Core multi-phase toxicology report generation logic
│ ├── templates_g_eval.py # Offline report outline evaluation script
│ ├── reports_g_eval.py # Offline report evaluation script
│ ├── reports_gemini_g_evel.py # Gemini/OpenRouter-style multi-round report evaluation script
│ └── utils/ # QSAR, PubMed, admetSAR, file I/O, citation formatting, and other utilities
├── src/ # Vue frontend source code
│ ├── App.vue # Frontend app shell, header, and global settings modal
│ ├── main.js # Vue app initialization entry
│ ├── api/ # Axios instance and backend API wrappers
│ ├── assets/ # Frontend static assets, such as the site logo
│ ├── components/ # Reusable Vue components
│ ├── i18n/ # Chinese and English UI text
│ ├── router/ # Vue Router configuration
│ ├── stores/ # Pinia state management, including local configuration persistence
│ └── views/ # Page-level components, including the home workflow and report workspace
-
Download and install QSAR Toolbox.
Go to the official QSAR Toolbox download page (https://qsartoolbox.org/download/) to download QSAR Toolbox and complete the installation process.
-
Start QSAR Toolbox WebSuite.
Search for and start QSAR Toolbox WebSuite. Wait for about 1 minute. When the following interface appears, startup is successful. Record the port number shown in the red box.
After completing the "QSAR Toolbox Configuration" steps above, open this project with an AI programming tool such as Claude Code or Codex, then enter the following prompt:
I have completed the "QSAR Toolbox Configuration". Help me configure the remaining steps for this project and open the project website: https://github.com/Our-Stars/AutoToxReporter.
Alternatively, you can manually configure the following steps.
After installing Node.js, install frontend dependencies in the project root directory:
npm installIt is recommended to use Conda to create an isolated backend environment. The environment name can be changed as needed. The example below uses the project name autotoxreporter:
conda create -n autotoxreporter python=3.11
conda activate autotoxreporter
pip install -r requirements.txtRun the following commands in the project root directory:
conda activate autotoxreporter
python -m uvicorn backend.main:app --host 0.0.0.0 --port 8000Default backend URL:
http://localhost:8000
Run the following command in the project root directory:
npm run devDefault frontend URL:
http://localhost:5173
After both the frontend and backend are running, open the following URL in a browser:
http://localhost:5173
On first use, complete the following settings from the upper-right settings panel:
-
Model services
Fill in the provider, API Key, Base URL, and available models.
-
General settings
Fill in the QSAR Toolbox API URL and PubMed API Key (optional but recommended), and select the interface language. The QSAR Toolbox API URL format is
http://localhost:[PORT]/api/v6, where[PORT]should be replaced with the port number recorded in the "QSAR Toolbox Configuration" step. For example:http://localhost:52813/api/v6. -
Save the configuration, then return to the home page to start chemical retrieval and report generation.
Generated outlines are saved to generated/outlines/ by default.
Generated reports are saved to generated/reports/ by default.
Exported files are saved to generated/exports/ by default.
This project is licensed under the Apache License 2.0. See LICENSE.
This project includes code from or adapted from
VHP4Safety/O-QT-OECD-QSAR-Toolbox-AI-assistant. See
THIRD_PARTY_NOTICES.md for attribution and third-party licensing details.


