French verb conjugation using modern .NET and AI
- AI-Powered Conjugations: Leverages various AI providers through Semantic Kernel
- Flexible AI Provider: Supports OpenRouter, OpenAI, Ollama, and other compatible endpoints
- Rate Limiting: Built-in protection against API abuse
- Docker Support: Containerized deployment with security best practices
- .NET 9 with C# 12
- ASP.NET Core Minimal APIs
- Semantic Kernel for AI orchestration
- Docker with Alpine Linux for lightweight containers
git clone https://github.com/yourusername/conj-ai.git
cd conj-ai
dotnet restore
Using Docker
docker build -t conj-ai .
docker run -p 8080:8080 -e OpenAI__ApiKey="key" conj-ai
- Use .NET user secrets for secure local development and set your key:
dotnet user-secrets init
dotnet user-secrets set "OpenAI:ApiKey" "sk-or-v1-your-key"
- Alternative:
appsettings.Development.json
{
"OpenAI": {
"ApiKey": "sk-or-v1-your-key"
}
}
⚠️ Never commit API keys to version control
- OpenRouter:
{
"OpenAI": {
"Endpoint": "https://openrouter.ai/api/v1"
}
}
- OpenAI:
{
"OpenAI": {
"Endpoint": "https://api.openai.com/v1"
}
}
- Ollama:
{
"OpenAI": {
"Endpoint": "http://localhost:11434/v1"
}
}
- Open WebUI:
{
"OpenAI": {
"Endpoint": "http://localhost:8080/ollama/api"
}
}
Create a .env file (ignored by Git):
OPENAI_MODEL=meta-llama/llama-3.2-3b-instruct:free
OPENAI_ENDPOINT=https://openrouter.ai/api/v1
OPENAI_API_KEY=<your-api-key>
Then run:
docker-compose up -d
⚠️ For production, use proper secret management
- Example Request:
curl http://localhost:8080/parler
- Example Response:
{
"infinitive": "parler",
"present": {
"je": "parle",
"tu": "parles",
"il": "parle",
"nous": "parlons",
"vous": "parlez",
"ils": "parlent"
},
"passeCompose": {
"je": "ai parlé",
"tu": "as parlé",
...
}
}