Chatbot / app.py

Commit History

  1. Fix: Handle list type in context_priority_used extraction

    882becc
  2. Upgrade to Hybrid Architecture v3 (Fast Lane + Deep Dive)

    e2d9873
  3. Add 21 Groq API keys with fallback mechanism

    f895e11
  4. Update Groq API keys with rotation logic

    3d6dd09

  1. Update Groq API key

    1190215
  2. Update Groq API key

    499a614
  3. feat: migrate from Gemini to Groq API for LLM calls

    f0c4cb2

  1. Increase max_output_tokens to 4096 to prevent response truncation

    dcb1582
  2. Complete rewrite: direct API fetch, proper vegetation indices + cluster stress extraction

    d6e5751
  3. Fix: format specifier error in SAR section

    65058ca
  4. Fix: extract Sentinel-2 vegetation_indices_summary and SAR crop_health

    15baaaf
  5. Improve prompt: force data-specific responses, add context logging

    f11af9a
  6. Fix: handle None values in SAR bands section

    c187541
  7. Fix: add defensive null checks in generate_response

    258275e
  8. Add comprehensive context: all indices, SAR, weather, persona-based responses

    c7df30e
  9. Switch to gemini-2.5-flash (2.0 quota exhausted)

    bec40f7
  10. Fix: use gemini-2.0-flash model

    ee7723b
  11. Add /chat/stream endpoint for Flutter compatibility

    b965fde
  12. Restore original simple chatbot from initial commit

    cb547c1
  13. Simplify chatbot: single LLM call, remove complex reasoning

    aaf7391
  14. Fix: record_api_call once per query, not per key rotation

    83e9fb0
  15. Add strict 5 calls/minute rate limit with smart fallback

    87f35a1
  16. Reduce API usage: default to simple reasoning (1 call), add backoff

    dd7cfa9
  17. Add SSE streaming endpoint /chat/stream for typewriter effect

    5d82df6
  18. Fix: add 400 to rotation triggers for invalid API keys

    0f136d3
  19. Add 5-key Gemini API fallback, conversation memory, historical trends, and zone recommendations

    504a512

  1. Lower confidence thresholds for satellite data fetch and reasoning

    a7903f2
  2. Full Developer Spec implementation: Priority-based Multi-Stage Reasoning⁠

    ee8289e
  3. Add satellite band data injection from HF Space APIs (SAR, Sentinel-2)

    2221290
  4. Auto-fetch field data (coordinates, crop_type) from Supabase

    3fad61c
  5. Implement multi-stage reasoning architecture (Claim→Validate→Contradict→Confirm)

    e2fa5a7
  6. Add auto model discovery to find working Gemini model

    07a23c0
  7. Try gemini-1.5-flash model

    c7be993
  8. Switch to gemini-1.5-flash-8b for higher rate limits

    c36a5b7
  9. Add retry logic for rate limits

    99bff2e
  10. Try gemini-2.0-flash-exp model

    126daae
  11. Fix: Use v1beta API and add better error logging

    fcbe917
  12. Fix: Use gemini-pro with v1 API endpoint

    0a05e0c
  13. Fix: Use direct Gemini REST API instead of SDK

    43f4a4c
  14. Fix: Use models/gemini-1.5-flash format

    5673ba4
  15. Fix: Try multiple Gemini model names for compatibility

    336ef34
  16. Fix: Simplify Gemini integration and update dependencies

    d633941
  17. Fix: Use gemini-pro model

    ba6427c
  18. Initial commit: AGROW Chatbot with Gemini LLM

    b3afc51