recall user to add Together AI API Key
Browse files
README.md
CHANGED
@@ -10,124 +10,72 @@ pinned: false
|
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
-
# RasaBot
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
* **Classifier Backend** (requires Python 3.10)
|
19 |
|
20 |
-
|
|
|
21 |
|
22 |
-
##
|
23 |
|
24 |
* Docker
|
25 |
* Docker Compose
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
---
|
30 |
-
|
31 |
-
## Directory Structure
|
32 |
-
|
33 |
-
Your directory should resemble the following structure:
|
34 |
-
|
35 |
-
```text
|
36 |
-
RasaBot/
|
37 |
-
βββ actions/
|
38 |
-
β βββ actions.py
|
39 |
-
βββ app.py
|
40 |
-
βββ build.sh
|
41 |
-
βββ classifier/
|
42 |
-
β βββ classifier.py
|
43 |
-
β βββ Dockerfile
|
44 |
-
β βββ requirements.txt
|
45 |
-
βββ config.yml
|
46 |
-
βββ custom_components/
|
47 |
-
β βββ llm_intent_classifier_client.py
|
48 |
-
βββ data/
|
49 |
-
β βββ nlu.yml
|
50 |
-
β βββ rules.yml
|
51 |
-
βββ Dockerfile
|
52 |
-
βββ domain.yml
|
53 |
-
βββ endpoints.yml
|
54 |
-
βββ envs.sh
|
55 |
-
βββ models/
|
56 |
-
βββ README.md
|
57 |
-
βββ requirements.txt
|
58 |
-
βββ run_classifier.sh
|
59 |
-
βββ run_rasa.sh
|
60 |
-
```
|
61 |
-
|
62 |
-
---
|
63 |
-
|
64 |
-
## Build Docker Images
|
65 |
|
66 |
-
|
67 |
|
68 |
```bash
|
69 |
-
|
|
|
70 |
```
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
## Run Services
|
75 |
-
|
76 |
-
### Run the Classifier Service
|
77 |
|
78 |
-
|
79 |
|
80 |
```bash
|
81 |
-
|
82 |
```
|
83 |
|
84 |
-
|
85 |
|
86 |
-
###
|
87 |
|
88 |
-
Execute the
|
89 |
|
90 |
```bash
|
91 |
-
sh
|
92 |
```
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
## Stop the Services
|
99 |
-
|
100 |
-
To stop the running services, use:
|
101 |
|
102 |
```bash
|
103 |
-
|
104 |
```
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
---
|
109 |
-
|
110 |
-
## Access the Chat UI
|
111 |
-
|
112 |
-
Once both services are running, open your browser and navigate to:
|
113 |
|
114 |
-
```
|
115 |
-
|
116 |
```
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
-
* Verify environment variables in `envs.sh`.
|
126 |
-
* Check Docker logs if encountering issues:
|
127 |
|
128 |
-
|
129 |
-
docker logs <container_name>
|
130 |
-
```
|
131 |
|
132 |
-
|
133 |
|
|
|
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
+
# RasaBot
|
14 |
|
15 |
+
## Project Overview
|
16 |
|
17 |
+
RasaBot is an intelligent chatbot leveraging Rasa (version 2.8.3) for conversational management and a classifier microservice built with FastAPI and Outlines. It is composed of two main components running in separate Docker containers:
|
|
|
18 |
|
19 |
+
* **Rasa Server**: Handles conversations using Rasa.
|
20 |
+
* **Classifier Microservice**: Classifies user intents using LLM hosted by Together AI.
|
21 |
|
22 |
+
## Requirements
|
23 |
|
24 |
* Docker
|
25 |
* Docker Compose
|
26 |
+
* Together AI API Key
|
27 |
|
28 |
+
## Setup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
### 1. Clone Repository
|
31 |
|
32 |
```bash
|
33 |
+
git clone <repository-url>
|
34 |
+
cd RasaBot
|
35 |
```
|
36 |
|
37 |
+
### 2. Provide Together AI API Key
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
Set the Together AI API Key as an environment variable:
|
40 |
|
41 |
```bash
|
42 |
+
export TOGETHERAI_API_KEY="your_together_ai_api_key_here"
|
43 |
```
|
44 |
|
45 |
+
Ensure this environment variable is set before running the classifier.
|
46 |
|
47 |
+
### 3. Build Docker Images
|
48 |
|
49 |
+
Execute the provided build script to create the necessary Docker images:
|
50 |
|
51 |
```bash
|
52 |
+
sh build.sh
|
53 |
```
|
54 |
|
55 |
+
### 4. Run Services
|
56 |
|
57 |
+
Start the classifier service:
|
|
|
|
|
|
|
|
|
58 |
|
59 |
```bash
|
60 |
+
sh run_classifier.sh
|
61 |
```
|
62 |
|
63 |
+
Then, in a separate terminal, start the Rasa server:
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
```bash
|
66 |
+
sh run_rasa.sh
|
67 |
```
|
68 |
|
69 |
+
Your chatbot services will now be running locally.
|
70 |
|
71 |
+
## Usage
|
72 |
|
73 |
+
Interact with the chatbot via the provided UI or API endpoints.
|
74 |
|
75 |
+
## Stopping Services
|
|
|
|
|
76 |
|
77 |
+
To stop the running services, press `Ctrl+C` in the respective terminals or stop the Docker containers manually.
|
|
|
|
|
78 |
|
79 |
+
## Notes
|
80 |
|
81 |
+
* The classifier microservice relies on Together AI for classification. Ensure the `TOGETHERAI_API_KEY` environment variable is properly configured to avoid runtime errors.
|