Skip to main content

Welcome to Groq Microservice

Groq Microservice is a specialized API service that leverages Groq’s powerful LLM API to generate institutional document templates tailored for Mexican government entities (Ayuntamientos). The service automates the creation of formal administrative documents with proper formatting, structure, and variable placeholders.

Key Features

AI-Powered Generation

Uses Groq’s LLM API with Llama models to generate contextually appropriate institutional documents

RESTful API

Simple HTTP endpoint for easy integration with existing government systems

Variable Placeholders

Automatically generates templates with {{Variable}} placeholders for dynamic content

Area-Specific Customization

Tailors document structure and content based on the government department or area

What You’ll Find Here

Quick Start

Get the microservice running in minutes with our step-by-step guide

Setup Guide

Detailed installation and configuration instructions

API Reference

Complete documentation of the template generation endpoint

Deployment

Deploy to production environments with confidence

How It Works

The microservice accepts a natural language prompt describing the type of institutional document needed, along with an optional department area. It then:
  1. Processes the request through a specialized system prompt designed for Mexican institutional writing
  2. Sends the formatted prompt to Groq’s API using the Llama 3.1 8B Instant model
  3. Returns a properly structured document template with variable placeholders
  4. Includes all required elements: institutional header, ASUNTO, date/location, body, closing, signature block, and carbon copy (C.c.p.) sections
The service is optimized for speed and cost-efficiency using the Llama 3.1 8B Instant model, with support for the more powerful Llama 3.3 70B Versatile model when needed.

Use Cases

  • Administrative Communications: Generate official memos, notices, and communications
  • Form Letters: Create standardized letters for citizen services
  • Internal Documents: Produce interdepartmental documentation with proper formatting
  • Template Libraries: Build reusable document templates for common scenarios

Technology Stack

  • Runtime: Node.js with Express 5
  • AI Provider: Groq API with Llama models
  • Configuration: Environment-based with dotenv
  • CORS: Enabled for cross-origin integration

Ready to Get Started?

Quick Start Guide

Follow our quickstart guide to get your first template generated in under 5 minutes

Build docs developers (and LLMs) love