-
Notifications
You must be signed in to change notification settings - Fork 0
Home
TenzinGayche edited this page Dec 15, 2025
·
2 revisions
Welcome to the comprehensive documentation for the LangGraph Buddhist Text Translation API β a sophisticated, multi-stage pipeline for translating, analyzing, and standardizing Tibetan Buddhist texts.
# Clone the repository
git clone https://github.com/OpenPecha/langraph-api.git
cd langraph-api
# Install dependencies
pip install -r requirements.txt
# Configure API keys in .env
echo "ANTHROPIC_API_KEY=your-key" > .env
# Start the server
uvicorn src.translation_api.api:app --reload --port 8001- Web UI: http://localhost:8001/
- Swagger Docs: http://localhost:8001/docs
| Document | Description |
|---|---|
| Architecture | System design, LangGraph workflow, multi-stage pipeline |
| Concepts & Terminology | Buddhist terms, UCCA, Gloss, technical concepts |
| API Reference | Complete endpoint documentation with examples |
| Model Router | Multi-provider LLM configuration (Anthropic, OpenAI, Google) |
| Workflow System | Combo-key based translation workflows |
| Streaming Guide | SSE patterns and real-time events |
| Installation | Setup, configuration, deployment |
| Usage Guide | Examples, tutorials, best practices |
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
β Translation β β β Glossary β β β Standardization β
β Service β β Service β β Service β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
Each service is independent, giving you full control over your translation workflow.
Real-time Server-Sent Events (SSE) for all long-running operations:
- Watch translations appear as they complete
- Monitor glossary extraction progress
- Track standardization updates live
| Provider | Models |
|---|---|
| Anthropic | Claude Sonnet 4, Claude 4.5, Claude Opus |
| Gemini 2.5 Pro, Gemini 2.5 Flash | |
| OpenAI | GPT-4, GPT-4 Turbo |
| Dharmamitra | Specialized Buddhist translation |
- UCCA Generation: Universal Conceptual Cognitive Annotation graphs
- Gloss Analysis: Word-by-word breakdown with standardization
- Commentary Integration: Use up to 3 commentaries for context
- Sanskrit Parallel: Cross-reference with Sanskrit sources
- Custom Prompts: Full template customization with placeholders
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Server β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β Translationβ β Glossary β β UCCA β β Gloss β β
β β Endpoints β β Endpoints β β Endpoints β β Endpoints β β
β βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ β
β β β β β β
β βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββ β
β β β
β βββββββββββΌββββββββββ β
β β Model Router β β
β β (Multi-Provider) β β
β βββββββββββ¬ββββββββββ β
β β β
β ββββββββββββββββββββΌβββββββββββββββββββ β
β βΌ βΌ βΌ β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β Anthropic β β Google β β OpenAI β β
β β Claude β β Gemini β β GPT-4 β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Category | Endpoints | Description |
|---|---|---|
| Translation |
/translate, /translate/stream
|
Batch & streaming translation |
| Glossary |
/glossary/extract, /glossary/extract/stream
|
Term extraction |
| Standardization |
/standardize/analyze, /standardize/apply
|
Consistency enforcement |
| UCCA |
/ucca/generate, /ucca/generate/stream
|
Semantic graph generation |
| Gloss |
/gloss/generate, /gloss/generate/stream
|
Word analysis |
| Workflow |
/workflow/run, /workflow/run/batch
|
Combo-key workflows |
| Editor |
/editor/comment, /editor/comment/stream
|
Grounded commentary |
| Proxy | /dharmamitra/* |
Dharmamitra integration |
| Resource | URL |
|---|---|
| Repository | https://github.com/OpenPecha/langraph-api |
| OpenPecha | https://openpecha.org |
| LangGraph | https://langchain-ai.github.io/langgraph/ |
This project is licensed under the Apache 2.0 License.
Built with β€οΈ by OpenPecha