Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
wiki:software:beuthbot:deconcentrator [23.01.2020 10:43] Timo Bruns |
wiki:software:beuthbot:deconcentrator [19.05.2020 21:52] (aktuell) Jan Fromme |
||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
==== Table Of Content ==== | ==== Table Of Content ==== | ||
+ | - [[wiki: | ||
+ | - [[wiki: | ||
+ | - [[wiki: | ||
+ | - [[wiki: | ||
+ | - [[wiki: | ||
+ | |||
==== scope ==== | ==== scope ==== | ||
+ | be a common endpoint for various nlu providers: | ||
+ | |||
+ | - [[https:// | ||
+ | |||
+ | others aren't implemented yet, but implementation should be trivial: | ||
+ | |||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
==== principles ==== | ==== principles ==== | ||
=== important frameworks/ | === important frameworks/ | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | logic etc. | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
=== important models === | === important models === | ||
+ | |||
+ | - `Method`: the abstraction of a function to retrieve an actual NLU processing result. | ||
+ | - `Provider`: the actual provider, which is doing some kind of NLU processing. | ||
+ | - `Strategy`: how to select a `Provider` for a specific `Objective` | ||
+ | - `Objective`: | ||
+ | payload which has to be NLU processed and selects an strategy. | ||
+ | - `Job`: the `Strategy` creates jobs from an `Objective`. Each job then has a specific `Provider` to use for processing. | ||
+ | - `Result`: the outcome of asking a `Provider`. | ||
=== implementation details === | === implementation details === | ||
+ | |||
+ | - `Objective`, | ||
+ | class). That means: | ||
+ | - they have a common method with equal signature called `execute()` and are connected to the same `post_save` | ||
+ | handler. | ||
+ | - once an object of one of these classes is `save`d, the `post_save` hook will call that common method. | ||
+ | - that method, then, calls the `Strategy` model method for further handling. | ||
+ | - to avoid infinite recursion, one has to avoid calling `save()` within the `Strategy` method, instead using the | ||
+ | `< | ||
+ | - the `ViewSet`s design: | ||
+ | - `Method`s, `Strategy`s, | ||
+ | - `Provider`s can be CRUD on demand. | ||
+ | - `Objective`s can be created and retrieved, but not updated or deleted. | ||
==== how-to ==== | ==== how-to ==== | ||
- | ==== Versioning ==== | + | The project contains multiple `docker-compose` files; therefore, basically you only have to `docker-compose up` the |
+ | project. | ||
+ | |||
+ | - You need to build the deconcentrator image in the directory that holds the Dockerfile. | ||
+ | docker build -t deconcentrator: | ||
+ | - You can use the `management.sh` script to create the required secret files: `./ | ||
+ | |||
+ | - You will probably want to create a sym-link named `docker-compose.override.yml` to export the nginx port to the public | ||
+ | ln -s docker-compose.production.yml docker-compose.override.yml | ||
+ | - You will probably want to run the migrations; basically it's a `./ | ||
+ | ./ | ||
+ | - To access the admin interface, you'll have to create a superuser account first: | ||
+ | ./ | ||
+ | |||
==== Authors ==== | ==== Authors ==== | ||
+ | |||
+ | |||
+ | **Kai Nessig** - //Initial work// - [[https:// | ||
+ | |||
+ | See also the list of [[https:// | ||
+ | <WRAP pagebreak></ |