Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.45 KB

File metadata and controls

71 lines (49 loc) · 1.45 KB

Chinese Novel Translator API

Tiếng Việt | English | 中文

An API that uses Microsoft Agent Framework and DeepSeek to translate Chinese novels into Vietnamese.

Project structure

app/
|-- ai/             Novel analysis workflow powered by DeepSeek
|-- core/           Configuration, database, and pagination
|-- dtos/           Request and response models
|-- ebook/          TXT/EPUB parsing and content extraction
|-- endpoints/      FastAPI endpoints
|-- entities/       SQLAlchemy entities
|-- repositories/   Database access
|-- services/       Business logic
`-- main.py         FastAPI application

Installation

Requirements:

  • Python 3.14 or later
  • uv
  • A DeepSeek API key

Install the dependencies:

uv sync

Create .env from the example file:

Copy-Item .env.example .env

Configure .env:

DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxx
DATABASE_URL=sqlite:///./app.db

DATABASE_URL is optional. The project uses SQLite at app.db by default.

Running the project

uv run fastapi dev

The API runs at http://127.0.0.1:8000 by default.

API documentation:

Swagger UI: http://127.0.0.1:8000/docs
ReDoc:      http://127.0.0.1:8000/redoc
OpenAPI:    http://127.0.0.1:8000/openapi.json

The database and its tables are created automatically when the application starts.

License

This project is licensed under the Apache License 2.0.