How anushdaivat7/groq-translation-api works
This small FastAPI service accepts translation requests at LangServe’s /chain endpoint and runs them through a prompt, Groq’s Llama model, and a string output parser. serve.py also loads the Groq API key from the environment and configures the model. The README documents the endpoint and Groq integration; the source excerpt shows the chain and route registration, but not request handling internals.
Main entry points: serve.py Groq chat model
Components 8
API serving
- Chain endpoint
serve.py - FastAPI app
serve.py
Translation chain
- Translation prompt
serve.py - Groq chat model
serve.py - String parser
serve.py
Configuration
- Environment
Other components
- API client
- Groq API
Connections 7
- API client → Chain endpoint: sends request
README.md - FastAPI app → Chain endpoint: registers route
serve.py - Chain endpoint → Translation prompt: invokes chain
serve.py - Translation prompt → Groq chat model: formats input
serve.py - Groq chat model → String parser: returns output
serve.py - Groq chat model → Groq API: calls model
README.md - Environment → Groq chat model: provides API key
serve.py