This Go application serves as a simple proxy for interacting with the Groq API. It forwards requests to the Groq API for chat completions and returns the responses to the client. The app also includes basic CORS support, environment configuration via .env
file, and a health check endpoint.
The application is built using the chi
router and can be run as a standalone Go application or containerized using Docker.
- API Proxy: Forwards chat completion requests to the Groq API and returns the results.
- CORS Support: Configures cross-origin resource sharing (CORS) to allow requests from different domains.
- Health Check: Exposes a
/healthz
endpoint for server readiness checks. - Environment Configuration: Loads environment variables like the Groq API key from a
.env
file.
- Docker (Optional): Use Docker to containerize and run the application.
- .env File: This file should contain environment variables such as the API key for Groq.
-
Clone the repository:
git clone https://github.com/indenigrate/iykyk.git cd iykyk
-
Build and run:
docker compose build docker compose up
-
Make the .env file as per .env.example
-
Access the API
http://localhost:5000/healthz
http://localhost:5000/enter your request argument
- GET
/enter your request here
- Description: Returns a response after processing the request
- Response: Returns a response text.