Logo Lanfrica

danielAdama/hausa-customer-service

Domain:

natural language processing

Record type:

software
Creator:
dan
Host:
# Hausa Customer Service AI This application is a Flask-based API that uses the LangChain framework and Groq for Natural Language Processing. It enables an AI customer support agent fluent in Hausa to interact conversationally with users. --- ## Features - **Hausa Language Support**: Receives and responds to messages in Hausa. - **LLM-Powered**: Utilizes Llama 3 model for generating responses. - **Flask Backend**: Provides RESTful API endpoints for easy integration. - **Environment Configuration**: Securely stores and uses API keys via environment variables. - **CORS Support**: Allows cross-origin requests. --- ## Getting Started ### Prerequisites Ensure you have the following installed: - Python 3.9+ - Poetry (Python dependency manager) - A Groq API key --- ### Installation 1. **Clone the repository**: ```bash git clone github.com cd hausa-customer-service/api ``` 2. **Set up Poetry**: Install Poetry globally if you haven't already: ```bash curl -sSL install.python-poetry.org | python3 - ``` 3. **Install dependencies using Poetry**: ```bash poetry install ``` 4. **Activate the virtual environment**: ```bash poetry shell ``` --- ### Environment Setup 1. **Create a `.env` file** in the `api/` directory with the following content: ``` GROQ_API_KEY=your_groq_api_key_here ``` 2. Replace `your_groq_api_key_here` with your actual Groq API key. --- ### Running the Application 1. **Start the Flask server**: ```bash poetry run python main.py ``` 2. The server will run on `127.0.0.1` by default. --- ### Usage - **API Endpoint**: `POST /api/assistant/` - **Request Body**: ```json { "message": "Your message in Hausa here" } ``` - **Example cURL Command**: ```bash curl -X POST 127.0.0.1 \ -H "Content-Type: application/json" \ -d '{"message": "Ina so in taimako"}' ``` - **Response**: ```json { "response": "Your AI-generated response in Hausa" } ``` --- # …

Languages