@@ -89,16 +89,15 @@ can create their own custom assistants.
89
89
## The tools
90
90
91
91
A web application, usually referred to as ** "the web frontend"** , has been
92
- created. Initially, it supports the first two steps of the process outlined in
93
- the previous section, which require humans creating conversations (step 1) and
94
- ranking answers (step 2).
92
+ created. It supports the first two steps of the process outlined in the previous
93
+ section, which require humans creating conversations (step 1) and ranking
94
+ answers (step 2). It also supports the inference step, creating a chat
95
+ interface.
95
96
96
- For this same goal, data gathering, a discord bot is being created. We'll call
97
- it ** "the data gathering discord bot" ** .
97
+ For data gathering, two discord bots were created, one using Python and the
98
+ other using Javascript. The latter also supports the inference process .
98
99
99
- For doing the inference, once the final model is ready, an ** "inference
100
- service"** is being created. Another section will be added to the web frontend,
101
- so that the assistant can be used from the web.
100
+ For doing the inference, an ** "inference service"** has been created.
102
101
103
102
In addition, for collecting the instruction dataset, a set of ** scripts and
104
103
notebooks** is being developed.
@@ -134,10 +133,10 @@ When you run `npm run dev` in the website directory, it starts the Next.js
134
133
application in the node server. The Next.js application is available at
135
134
` http://localhost:3000 ` .
136
135
137
- In the Dockerfile, there's also a ` maildev ` container that is used during to be
138
- able to sent emails for registration, although for local development there are
139
- fake users pre-created and this is not required. There is a fake user called
140
- ` dev ` and it can be assigned a role during log in.
136
+ In the Dockerfile, there's also a ` maildev ` container that is used to be able to
137
+ sent emails for registration, although for local development there are fake
138
+ users pre-created and this is not required. There is a fake user called ` dev `
139
+ and it can be assigned a role during log in.
141
140
142
141
There are other scripts related to the frontend in the directory
143
142
[ scripts/frontend-development] ( https://github.com/LAION-AI/Open-Assistant/tree/main/scripts/frontend-development ) .
@@ -146,16 +145,15 @@ Another included tool that can be interesting during development is
146
145
[ storybook] ( https://storybook.js.org/ ) : it allows you to test UI components
147
146
without having to run the whole application.
148
147
149
- ### The data gathering Discord bot
148
+ ### The Discord bots
150
149
151
- This is a Discord bot that is used to gather data for the assistant, as a
152
- complement to the web data gathering application. Its source code is in the
153
- [ discord-bot] ( https://github.com/LAION-AI/Open-Assistant/tree/main/discord-bot )
154
- directory and it's written in Python.
150
+ These are the Discord bots mentioned above. Their source code is in the
151
+ [ discord-bots] ( https://github.com/LAION-AI/Open-Assistant/tree/main/discord-bots )
152
+ directory.
155
153
156
154
### The FastAPI backend
157
155
158
- This provides an API that's used by the web frontend and the Discord bot to
156
+ This provides an API that's used by the web frontend and the Discord bots to
159
157
store conversation trees and their metadata. It's written in Python using
160
158
FastAPI as framework and its source code is in the
161
159
[ backend directory] ( https://github.com/LAION-AI/Open-Assistant/tree/main/backend ) .
@@ -168,7 +166,7 @@ There's also a Redis database, called `redis` in the Dockerfile, for caching API
168
166
requets.
169
167
170
168
In the Dockerfile, there are also two containers with development support tools
171
- for the databases: ` adminer ` , that can be used to inspect the Postgres
169
+ for the databases: ` adminer ` , which can be used to inspect the Postgres
172
170
databases, and ` redis-insights ` to inspect the Redis database.
173
171
174
172
Although there's some data already in the Postgres backend database, more can be
@@ -182,12 +180,13 @@ conversation tree and the work package.
182
180
183
181
### The inference service
184
182
185
- The inference service will be the component that answers prompts when the model
186
- is ready, i.e., the assistant. It's written in Python and its source code is in
187
- the [ inference] ( https://github.com/LAION-AI/Open-Assistant/tree/main/inference )
183
+ The inference service is the component that answers prompts using a model, i.e.,
184
+ it is the assistant itself . It's written in Python and its source code is in the
185
+ [ inference] ( https://github.com/LAION-AI/Open-Assistant/tree/main/inference )
188
186
directory. It has a server and several workers. It also has its own Postgres
189
187
database in a container called ` inference-db ` in the Dockerfile, and a Redis
190
- database in the ` redis-inference ` container.
188
+ database in the ` redis-inference ` container. There's another container for
189
+ safety called ` inference-safety ` .
191
190
192
191
The server is a FastAPI application that communicates via websockets with the
193
192
workers, which are the ones that use the model to carry out the inference.
@@ -208,7 +207,9 @@ explains how to contribute a new dataset.
208
207
209
208
There's also a
210
209
[ notebooks] ( https://github.com/LAION-AI/Open-Assistant/tree/main/notebooks )
211
- directory with different notebooks to process the data.
210
+ directory with different notebooks for data scraping and augmentation, but it's
211
+ being deprecated in favor of the directory
212
+ [ data/datasets] ( https://github.com/LAION-AI/Open-Assistant/blob/main/data/datasets ) .
212
213
213
214
### The docs
214
215
@@ -242,10 +243,16 @@ website directory.
242
243
243
244
- ` inference ` . It includes these containers:
244
245
245
- - ` inference-db ` , ` inference-server ` , ` inference-worker ` , ` inference-redis `
246
+ - ` inference-db ` , ` inference-server ` , ` inference-worker ` , ` inference-redis ` ,
247
+ ` inference-safety `
248
+
249
+ - ` inference-dev ` . It includes these containers:
250
+
251
+ - ` db ` , ` web-db ` , ` backend `
246
252
247
253
- ` observability ` . It includes tools to monitor the application. It includes
248
254
these containers:
255
+
249
256
- ` prometheus ` , ` grafana ` , ` netdata `
250
257
251
258
Notice that you can combine profiles, for example, ` ci ` and ` observability ` .
@@ -277,12 +284,12 @@ flowchart TD
277
284
infworker1((inference-worker <br> 1))
278
285
infworker2((inference-worker <br> ...))
279
286
infworkerN((inference-worker <br> n))
280
- infserv(("inference-server <br> (FastAPI)"))
281
- infserv --> infdb(("inference-db <br> (Postgres)"))
282
- infserv --> infredis(("inference-redis"))
287
+ infserv(("inference-server <br> (FastAPI)")) --> infdb(("inference-db <br> (Postgres)"))
288
+ infsafety((inference-safety))
283
289
infserv --> infworker1
284
290
infserv --> infworker2
285
291
infserv --> infworkerN
292
+ infserv --> infsafety
286
293
end
287
294
subgraph support[Dev support tools]
288
295
adminer((adminer))
@@ -312,7 +319,7 @@ Lead, [Christoph Schumann](https://github.com/christophschuhmann), who is the
312
319
Organizational Lead and a founder of [ LAION] ( https://laion.ai/ ) , and Huu Nguyen,
313
320
from [ Ontocord] ( https://github.com/ontocord ) .
314
321
315
- There's a
322
+ There's a [ Teams page ] ( https://open-assistant.io/team ) and a
316
323
[ CODEOWNERS] ( https://github.com/LAION-AI/Open-Assistant/blob/main/CODEOWNERS )
317
324
file that lists the code owners of different parts of the project. However,
318
325
there are many
0 commit comments