https://github.com/trungnt13/rag-backend
Simulation Backend for Retrival-based Augmented Generation
https://github.com/trungnt13/rag-backend
Last synced: 3 months ago
JSON representation
Simulation Backend for Retrival-based Augmented Generation
- Host: GitHub
- URL: https://github.com/trungnt13/rag-backend
- Owner: trungnt13
- License: mit
- Created: 2023-11-13T19:31:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T15:33:00.000Z (almost 2 years ago)
- Last Synced: 2023-11-14T22:36:44.866Z (almost 2 years ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RAG Server
## Requirements
* Python 3.8
* `pip install -r requirements.txt`## Local Development
`. run.sh`
Go to web browser and open `http://localhost:8000/docs` to see the API documentation.
Example of a request body for `/api/rag`:
```json
{
"text": "string",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
```Example of response
```json
[
{
"start": 1,
"end": 4,
"label": "unknown",
"explain": "This is 0-th random explanation for document ID=0 with metadata=additionalProp1=string, additionalProp2=string, additionalProp3=string content=string",
"ID": 0
},
{
"start": 0,
"end": 6,
"label": "unknown",
"explain": "This is 1-th random explanation for document ID=0 with metadata=additionalProp1=string, additionalProp2=string, additionalProp3=string content=string",
"ID": 0
}
]
```## Deployment
`./deploy.sh`