File size: 2,606 Bytes
26ff497 958be64 26ff497 3e2bb45 26ff497 2a47b1a 958be64 ce3f5fc 2a47b1a ce3f5fc 2a47b1a ce3f5fc 2a47b1a |
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
---
title: ArtickBot
emoji: 🚀
colorFrom: yellow
colorTo: red
sdk: docker
pinned: false
license: mit
app_port: 7860
---
---
# ArtickoBOt
This project implements a chatbot using FastAPI and a pre-trained language model. The chatbot can generate responses based on user prompts and persona descriptions.
## Requirements
- Docker
- Hugging Face Spaces
## Usage
### Building the Docker Image
- The application has a Dockerfile that will run automatic and install as well as build the dependencies
### Running the Docker Container
- The Dockerfile is configured to start uvicorn servers at port: 7860
- The uvicorn can be configured to use multiple workers to process/serve data
### Accessing the API
You can access the API endpoints using a web browser or an HTTP client at `https://articko-artickbot.hf.space/api/v1/`.
## Endpoints
### `POST https://articko-artickbot.hf.space/api/v1/chat`
Starts a new conversation thread with a provided user message prompt.
#### Request Body
```json
{
"msg_prompt": "User's message prompt"
}
```
#### Response
```json
{
"response": {
"user": "User's message prompt",
"assistant": "Generated response from the chatbot"
}
}
```
### `POST https://articko-artickbot.hf.space/api/v1/prompted_chat`
Starts a new chat thread with a provided user message prompt and persona description of the AI assistant.
#### Request Body
```json
{
"msg_prompt": "User's message prompt",
"persona_desc": "Persona description of the AI assistant"
}
```
#### Response
```json
{
"thread_id": "ID of the conversation thread",
"response": {
"user": "User's message prompt",
"assistant": "Generated response from the chatbot"
}
}
```
### `GET https://articko-artickbot.hf.space/api/v1/get_response/{thread_id}`
Retrieves the response of a conversation thread by its ID.
#### Path Parameters
- `thread_id`: ID of the conversation thread
#### Response
```json
{
"response": {
"user": "User's message prompt",
"assistant": "Generated response from the chatbot"
}
}
```
For more details on each endpoint, refer to the docstrings within the source code.
## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE).
---
Feel free to customize this README file further to include additional information specific to your project or environment. If you have any questions or need further assistance, don't hesitate to ask! |