An open API service indexing awesome lists of open source software.

https://github.com/thefloatingstring/hack-ai-2023-backend

HackAI 2023 1st Place Overall Project. Story generation for educational purposes.
https://github.com/thefloatingstring/hack-ai-2023-backend

Last synced: 3 months ago
JSON representation

HackAI 2023 1st Place Overall Project. Story generation for educational purposes.

Awesome Lists containing this project

README

          

# backend

To install dependencies:

```bash
pip install -r requirements.txt
```

Environment variables:
```
set OPENAI_API_KEY='X'
```

To run:

```bash
python main.py
```

Sample request:

```curl
curl -XPOST http://127.0.0.1:8000/api/story -d "{\"name\": \"Bao\", \"modifier\": \"x\", \"narration\": \"x\", \"topic\": \"what is energy?\", \"character_environment\":\"Harry Potter universe\"}" -H "Content-type: application/json"
```

Go to port `8000`