Spaces:
Runtime error
Runtime error
File size: 989 Bytes
f0b3015 1171a09 f0b3015 1171a09 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
---
title: Pet Assistant Llama Index
emoji: 😻
colorFrom: gray
colorTo: yellow
sdk: docker
pinned: false
port: 7860
app_port: 7860
---
# Pet Assistant LlamaIndex API
This API provides a chat endpoint powered by LlamaIndex, specifically designed to assist with pet-related queries. The service is compatible with Hugging Face's Chat UI and exposes a REST API on port 7860.
## API Endpoints
### Chat Endpoint
```http
POST /chat
Content-Type: application/json
```
Request body:
```json
{
"messages": [
{
"role": "user",
"content": "How often should I feed my cat?"
}
],
"temperature": 0.7,
"max_tokens": 1024,
"parameters": {}
}
```
Response:
```json
{
"content": "The response from LlamaIndex...",
"stop": null,
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
```
### Health Check
```http
GET /health
```
Response:
```json
{
"status": "healthy"
} |