Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
bc34c56
Updated mentor.dto.ts
jerrygirmaa Mar 25, 2025
09832a3
Updated update-mentor.dto.ts
jerrygirmaa Mar 25, 2025
c4d9800
Updated mentor.service.ts
jerrygirmaa Mar 25, 2025
c5e7879
Updated mentor.module.ts
jerrygirmaa Mar 25, 2025
eb25a0a
Added profile module for mentor
jerrygirmaa Mar 25, 2025
3e83779
refactor: improve role comparison logic in RoleGuard
Bikilaketema Mar 27, 2025
7d96024
fix es-lint error
Bikilaketema Mar 27, 2025
e7693d8
refactor: remove unused User import in RoleGuard
Bikilaketema Mar 27, 2025
0e6d85e
refactor: enhance role checking logic in RoleGuard to support multipl…
Bikilaketema Mar 28, 2025
a4c4dc5
Merge remote-tracking branch 'origin/163-revise-the-database-schema-f…
jerrygirmaa Mar 28, 2025
c87a29f
Merge remote-tracking branch 'origin/bug/fixed-role-guard-problem' in…
jerrygirmaa Mar 28, 2025
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
2d9152a
Updated MentorDto to change expertise from array to json
jerrygirmaa Mar 29, 2025
1ab9690
Updated UpdateMentorDto to handle expertise like json
jerrygirmaa Mar 29, 2025
f34a3b1
Implemented toggle active/inactive status in MentorController
jerrygirmaa Mar 29, 2025
b31f9fc
Added toggle logic and account check for every request in MentorService
jerrygirmaa Mar 29, 2025
11d4b98
Updated MentorProfileController for account check
jerrygirmaa Mar 29, 2025
a41787d
Updated MentorProfileService with account check
jerrygirmaa 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
d564cd9
a mentor is created everytime account is created
biniyam-29 Mar 30, 2025
56daedb
corrected how the role of the message was differentiated with langcha…
biniyam-29 Mar 31, 2025
0d3ac89
included the new message on the context that is sent to the ai
biniyam-29 Mar 31, 2025
0b0d42c
removed un-necessary logs
biniyam-29 Mar 31, 2025
1b0b574
updated the schema to support vector embeddings
biniyam-29 Mar 31, 2025
5dcb943
added vector extenstion to the postgres docker image
biniyam-29 Mar 31, 2025
3c3dea5
made the vector fields optional to avoid errors errors on creation wi…
biniyam-29 Mar 31, 2025
6c907ed
migrated the new schema
biniyam-29 Mar 31, 2025
7426832
installed GoogleGenerativeAIEmbeddings packages from langchain for em…
biniyam-29 Mar 31, 2025
043843a
installed langchain for MemoryVectorStore
biniyam-29 Mar 31, 2025
5afecae
service for moderator mentor matching
biniyam-29 Mar 31, 2025
08fc3d5
changed the search to a bit stricter manner so that it returns with c…
biniyam-29 Mar 31, 2025
1b82255
changed default export
biniyam-29 Mar 31, 2025
7461e35
removed un necessary duplicate invocation
biniyam-29 Mar 31, 2025
29a77a9
conversation summarization, mentor selection and new conversation ins…
biniyam-29 Mar 31, 2025
8976e9b
registered all dependencies
biniyam-29 Mar 31, 2025
9e602a9
included apiKey for the embedding model
biniyam-29 Mar 31, 2025
7a1ba62
Merge branch 'release-02' into 165-implement-mentor-profile
bengeos Apr 1, 2025
fc8a299
Update mentor.dto.ts to reflect profile structure changes
jerrygirmaa Apr 7, 2025
5f09b22
Update update-mentor.dto.ts with new optional fields
jerrygirmaa Apr 7, 2025
60c851e
Refactor mentor.controller.ts to check mentor existence
jerrygirmaa Apr 7, 2025
f008619
Update mentor.service.ts by removing mentor existence logic
jerrygirmaa Apr 7, 2025
de00174
Updated mentor.module.ts
jerrygirmaa Apr 7, 2025
0e12f5b
Remove old mentor-profile.controller.ts
jerrygirmaa Apr 7, 2025
76afb2e
Remove old mentor-profile.module.ts
jerrygirmaa Apr 7, 2025
18f5e5b
Remove old mentor-profile.service.ts
jerrygirmaa Apr 7, 2025
f3dd1cf
Add new profile.controller.ts for mentor profile routes
jerrygirmaa Apr 7, 2025
1bf04f6
Add new profile.module.ts to encapsulate profile logic
jerrygirmaa Apr 7, 2025
dd551a3
Add new profile.service.ts with updated updateProfile logic
jerrygirmaa Apr 7, 2025
8943610
needs expertise when mentor creation
biniyam-29 Apr 7, 2025
41dcf3b
debugged how the prompt was being sent made the bot functional as int…
biniyam-29 Apr 7, 2025
e619279
configured trigurring condition for function calling
biniyam-29 Apr 7, 2025
07ad763
updated prompt to get the summary in the correct format
biniyam-29 Apr 7, 2025
d3bbffd
function calling with summary data
biniyam-29 Apr 7, 2025
d936883
configured mentor accepting and conversation handling logic
biniyam-29 Apr 7, 2025
529907b
debugged how the mentor is picked
biniyam-29 Apr 7, 2025
43c5325
debugged (once it accepts new mentor it closes the old conversation a…
biniyam-29 Apr 7, 2025
65e0044
takes the topic and conversationId then returns a mentor tha best sui…
biniyam-29 Apr 7, 2025
5446146
debugged conversation selection which used to not consider isActive f…
biniyam-29 Apr 7, 2025
ab00bf6
created a chat memory amangement using redis..minimizing the amount o…
Bikilaketema Apr 9, 2025
461a424
Merge branch '180-summarize-conversation-and-store-it-in-a-vector-for…
Bikilaketema Apr 9, 2025
0d34517
initial commit
Bikilaketema Apr 14, 2025
04166ca
changed the redis logic to use langchain comaptible logic
Bikilaketema Apr 14, 2025
09e97c9
addede session TTL from .env
Bikilaketema Apr 14, 2025
56a1e7f
tool calling using langchain
biniyam-29 Apr 14, 2025
e809682
implemented a service for mentor selection using embedding vector com…
biniyam-29 Apr 14, 2025
275fe00
installed necessary packages for function calling
biniyam-29 Apr 14, 2025
7a50bb9
Merge remote-tracking branch 'origin/181-create-a-chat-memory-managem…
biniyam-29 Apr 14, 2025
675913d
added new packages from the merged branch
biniyam-29 Apr 14, 2025
1aa9847
updated the moderator service to use chain operation
biniyam-29 Apr 14, 2025
6cf4ecf
updated the prompt for the current code structure
biniyam-29 Apr 14, 2025
ec441a5
removed conversation check to avoid bottle-neck
biniyam-29 Apr 14, 2025
ed0dd85
updated the queue binding according to the new refactoring
biniyam-29 Apr 14, 2025
9176b0d
updated message-consumer-service to identify which messages should be…
biniyam-29 Apr 14, 2025
fa97ad4
updated the module to include dependencies
biniyam-29 Apr 14, 2025
8735a15
debugged small errors
biniyam-29 Apr 14, 2025
5cd9e6f
removed redueant check
biniyam-29 Apr 14, 2025
94752d0
debugged message-consumer-service to end the process once it know wit…
biniyam-29 Apr 15, 2025
f4e87a7
removed un-necessary dead code
biniyam-29 Apr 15, 2025
a61c23b
removed vector fields from the schema to resolve the conflict with th…
biniyam-29 Apr 15, 2025
71c61b7
resolved lint (prettier) problems
biniyam-29 Apr 15, 2025
b67681b
the test worked
Bikilaketema Apr 23, 2025
c8e4d25
remove unused variables | fix es lint error
Bikilaketema Apr 25, 2025
e31f079
updated the prompt to only take the topic
biniyam-29 May 15, 2025
2cac6af
extract topic -> get all mentors under that topic -> extract selected…
biniyam-29 May 15, 2025
3d65c41
added availability field to mentor creation because the bot needs it
biniyam-29 May 15, 2025
c0b3929
added a standalone jest config and removed it from the package.json
Bikilaketema May 27, 2025
9092eaf
Merge branch '207-create-standalone-jest-config-file' into 185-writin…
Bikilaketema May 27, 2025
b7d1f12
changed the import dirs to be from src
Bikilaketema May 27, 2025
5a6c560
removed migration files to resolve conflicts
biniyam-29 May 27, 2025
1e1ed20
Merge branch '196-refactor-conversationid-stacking' into 165-implemen…
biniyam-29 May 27, 2025
526a238
removed migtation file to resolve conflict
biniyam-29 May 27, 2025
cabc894
Merge remote-tracking branch 'origin/185-writing-test-case-for-the-me…
biniyam-29 May 27, 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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ WEB_CALLBACK_URL=""
RABBITMQ_URL=""
CHAT_PORT=""
HOST_URL=""
WEBSOCKET_URL=""
GOOGLE_GENAI_API_KEY=""
SESSION_TTL=""
28 changes: 23 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
RABBITMQ_URL: amqp://user:password@rabbitmq:5672

postgres:
image: postgres
image: pgvector/pgvector:pg17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
Expand All @@ -33,7 +33,7 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
test: [ 'CMD-SHELL', 'pg_isready -U postgres' ]
interval: 5s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -66,7 +66,7 @@ services:
environment:
RABBITMQ_URL: amqp://user:password@rabbitmq:5672
DATABASE_URL: postgres://postgres:password@postgres:5432/mydb?schema=public
command: ['node', 'dist/src/apps/consumers/chat-consumer/main.js']
command: [ 'node', 'dist/src/apps/consumers/chat-consumer/main.js' ]

database-consumer:
build:
Expand All @@ -82,7 +82,7 @@ services:
environment:
RABBITMQ_URL: amqp://user:password@rabbitmq:5672
DATABASE_URL: postgres://postgres:password@postgres:5432/mydb?schema=public
command: ['node', 'dist/src/apps/consumers/database-consumer/main.js']
command: [ 'node', 'dist/src/apps/consumers/database-consumer/main.js' ]

message-consumer:
build:
Expand All @@ -98,7 +98,25 @@ services:
environment:
RABBITMQ_URL: amqp://user:password@rabbitmq:5672
DATABASE_URL: postgres://postgres:password@postgres:5432/mydb?schema=public
command: ['node', 'dist/src/apps/consumers/message-consumers/main.js']
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
REDIS_HOST: redis
REDIS_PORT: 6379
command: [ 'node', 'dist/src/apps/moderator/main.js' ]

volumes:
postgres_data:
17 changes: 17 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// jest.config.ts
import { Config } from 'jest';

const config: Config = {
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
testRegex: '.spec.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
},
testEnvironment: 'node',
};

export default config;
Loading