Spaces:
Sleeping
Sleeping
File size: 1,062 Bytes
b3afc51 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ---
title: AGROW Chatbot
emoji: 🌾
colorFrom: green
colorTo: yellow
sdk: docker
pinned: false
license: mit
---
# AGROW Agricultural Chatbot
AI-powered agricultural advisor using Gemini LLM with Supabase conversation storage.
## Features
- Gemini 1.5 Flash for intelligent responses
- Agricultural expertise (crop health, soil, weather)
- Conversation history persistence
- Pipeline context integration
## API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/chat` | POST | Send message, get AI response |
| `/session/new` | POST | Create new chat session |
| `/session/{id}/history` | GET | Get conversation history |
| `/sessions/{user_id}` | GET | List user's sessions |
## Environment Variables
- `GEMINI_API_KEY` - Google Gemini API key
- `SUPABASE_URL` - Supabase project URL
- `SUPABASE_KEY` - Supabase anon key
## Example Request
```bash
curl -X POST https://YOUR-SPACE.hf.space/chat \
-H "Content-Type: application/json" \
-d '{"session_id": "abc123", "message": "What is my crop health status?"}'
```
|