Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4335e85
boiler-plate for the moderator microservice
biniyam-29 Mar 28, 2025
34f3825
send message to the moderator queue if no conversation has been created
biniyam-29 Mar 28, 2025
02e021c
added an image for the moderator microservice into docker
biniyam-29 Mar 28, 2025
1ed2e46
moderator queue creation logic as well as binding the queues
biniyam-29 Mar 28, 2025
8a1571a
debugged inequivalent arg 'x-dead-letter-exchange' for queue 'moderator'
biniyam-29 Mar 29, 2025
43b3106
returned making the routing key moderator so that to bind moderator …
biniyam-29 Mar 29, 2025
5f7fe96
rolled back the routing key to debug error inequivalent arg 'x-dead-l…
biniyam-29 Mar 29, 2025
fe3303c
Merge remote-tracking branch 'origin/163-revise-the-database-schema-f…
biniyam-29 Mar 29, 2025
0984cae
Merge branch '166-ai-bot' into 175-converse-with-gemini-api-using-lan…
biniyam-29 Mar 29, 2025
b0ae969
configuration to push conversation with the bot to the moderator queue
biniyam-29 Mar 29, 2025
6947fdf
updated the database consumer so that it delegates new messages to a …
biniyam-29 Mar 29, 2025
1f32303
debugged (only one message was consumed from the moderator queue caus…
biniyam-29 Mar 30, 2025
4595818
configured the moderator service to reply to conversations
biniyam-29 Mar 30, 2025
5044db3
included all dependencies in the moderator module
biniyam-29 Mar 30, 2025
3338b78
debugging (I was trying to access the consumed message as object but …
biniyam-29 Mar 30, 2025
7a89b61
debugging (picked only the text part from gemini response since the w…
biniyam-29 Mar 30, 2025
7f052cc
removed a log placed for debugging
biniyam-29 Mar 30, 2025
6f3e827
updated env.example with new variables I've used but not included
biniyam-29 Mar 30, 2025
091aa33
Merge branch 'release-02' into 175-converse-with-gemini-api-using-lan…
bengeos Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ WEB_CALLBACK_URL=""
RABBITMQ_URL=""
CHAT_PORT=""
HOST_URL=""
WEBSOCKET_URL=""
GOOGLE_GENAI_API_KEY=""
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,21 @@ services:
DATABASE_URL: postgres://postgres:password@postgres:5432/mydb?schema=public
command: ['node', 'dist/src/apps/consumers/message-consumers/main.js']

moderator:
build:
context: .
volumes:
- .:/app
platform: linux/amd64
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_started
environment:
RABBITMQ_URL: amqp://user:password@rabbitmq:5672
DATABASE_URL: postgres://postgres:password@postgres:5432/mydb?schema=public
command: ['node', 'dist/src/apps/moderator/main.js']

volumes:
postgres_data:
237 changes: 235 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"dependencies": {
"@faker-js/faker": "^9.3.0",
"@langchain/google-genai": "^0.2.1",
"@nestjs-modules/mailer": "^2.0.2",
"@nestjs/common": "^10.4.8",
"@nestjs/config": "^3.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class DatabaseConsumerService {
if (!message.conversationId) {
const mentor = await tx.mentor.findFirst({
where: {
isBot: true,
Account: {
Channel: {
some: {
Expand Down
Loading