Compare commits

..

3 Commits

Author SHA1 Message Date
Myx
ddf5bfdd3d Working LLM chatbot 2024-06-01 23:19:53 +02:00
Myx
a703f7f9a2 Clean 2024-06-01 12:59:45 +02:00
Myx
87b35a2203 Working chatbot 2024-06-01 12:34:03 +02:00

View File

@@ -2,16 +2,9 @@
```mermaid ```mermaid
flowchart TD flowchart TD
Program[Program] -->|Register| EventListener Program[Program] -->|Register| EventListener
EventListener[DiscordEventListener] --> A[MessageReceivedHandler] EventListener[DiscordEventListener] --> A
EventListener[DiscordEventListener] --> A2[SlashCommandReceivedHandler] A[MessageReceivedHandler] -->|Message| C{Send to correct command by
A --> |Message| f{If bot is mentioned}
f --> v[ChatHandler]
v --> o[Ollama Server]
o --> v
A2[SlashCommandReceivedHandler] -->|Message| C{Send to correct command by
looking at commandName} looking at commandName}
C -->|JoinCommand| D[JoinHandler] C -->|JoinCommand| D[JoinHandler]
@@ -19,19 +12,9 @@ flowchart TD
C -->|HelloCommand| F[HelloHandler] C -->|HelloCommand| F[HelloHandler]
C -->|GoodbyeCommand| G[GoodbyeHandler] C -->|GoodbyeCommand| G[GoodbyeHandler]
``` ```
Program registers an event listener ```DiscordEventListener``` which publish a message : Program registers an event listener ```DiscordEventListener``` which publish a message :
```c# ```c#
await Mediator.Publish(new MessageReceivedNotification(arg), _cancellationToken); await Mediator.Publish(new MessageReceivedNotification(arg), _cancellationToken);
``` ```
## Handler integrations
```mermaid
flowchart TD
D[JoinHandler] --> Disc[Discord Api]
E[PlayHandler] --> Disc[Discord Api]
F[HelloHandler] --> Disc[Discord Api]
G[GoodbyeHandler] --> Disc[Discord Api]
v[ChatHandler] --> Disc[Discord Api]
E --> Lava[Lavalink]
```