CoolFace
Apppublic

ARICEMUSIC/caregiver

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

Caregiver AI Chat API

This is a Flask-based API that provides an interface to interact with the Phi-3-mini-4k-instruct model from Hugging Face. The API supports conversation history and provides endpoints for health checks and chat interactions.

API Endpoints

Health Check

  • —GET /
  • —Returns the server status
  • —Response: {"status": "success", "message": "Hugging Space server is running normally"}

Chat Endpoint

  • —POST /api/data
  • —Accepts chat prompts and maintains conversation history
  • —Request Body: {"prompt": "your message here"}
  • —Response: {"status": "success", "generated_text": "AI response", "session_id": "unique_session_id"}

Environment Variables

  • —HF_TOKEN: Your Hugging Face API token (required)

Technical Details

  • —Python Version: 3.9
  • —Framework: Flask 2.1.1
  • —Model: microsoft/Phi-3-mini-4k-instruct

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference