-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(chatbot): session GSI * feat(chatbot): docker compose * fix(chatbot): dynamodb and redis for local development with docker compose * chore(chatbot):remove duplicate imports * chore(chatbot): linting * fix(chatbot):create index in docker * chore(chatbot): llamaindex index id * fix(chatbot): create vector index with all docs * chore(chatbot): terraform lint * fix(chatbot): terraform syntax * chore(chatbot): remove dynamodb options * chore(chatbot): from global to local secondary index * feat(chatbot): find or create session * feat(chatbot): PATCH /sessions/{sessionId}/queries/{id} feedback API * chore(chatbot): pytest init * chore(chatbot): lint * test setup * chore: remove old var * Update apps/chatbot/docker/compose.yaml Co-authored-by: marcobottaro <[email protected]> * chore: remove logs * fix(chatbot): compose vars * fix: remove nest_asyncio * chore: test post queries * chore: first test for get queries * chore: readme test * fix: poetry lock * chore: gitignore * chore: docker test * chore: test script * fix: chrome driver * Fix chatbot tests * fix: test on docker * chore: docker compose ports * feat: docker compose local with redis index creation and dynamodb tables creation * chore: docker compose env file * script run order * chore: docker up script --------- Co-authored-by: marcobottaro <[email protected]> Co-authored-by: mdciri <[email protected]>
- Loading branch information
1 parent
e725bb1
commit 7fe96a6
Showing
28 changed files
with
1,281 additions
and
1,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env*.test | ||
|
||
# vercel | ||
.vercel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.env | ||
.env* | ||
build-devp | ||
.pytest_cache | ||
load-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
services: | ||
api-test: | ||
build: | ||
context: .. | ||
dockerfile: docker/app.local.Dockerfile | ||
command: "./scripts/run.test.sh" | ||
env_file: "../.env.test" | ||
ports: | ||
- "8080:8080" | ||
volumes: | ||
- ..:/app | ||
- ./files/.aws:/root/.aws | ||
- ./files/nextjs-website/out:/app/build-devp/out | ||
depends_on: | ||
redis: | ||
condition: service_started | ||
dynamodb: | ||
condition: service_started | ||
networks: | ||
- ntw | ||
|
||
dynamodb: | ||
image: amazon/dynamodb-local:2.5.2 | ||
environment: | ||
- AWS_ACCESS_KEY_ID=dummy | ||
- AWS_SECRET_ACCESS_KEY=dummy | ||
- AWS_DEFAULT_REGION=local | ||
healthcheck: | ||
test: ["CMD-SHELL", '[ "$(curl -s -o /dev/null -I -w ''%{http_code}'' http://localhost:8000)" == "400" ]'] | ||
interval: 10s | ||
timeout: 10s | ||
retries: 10 | ||
networks: | ||
- ntw | ||
|
||
redis: | ||
image: redis/redis-stack:7.2.0-v13 | ||
networks: | ||
- ntw | ||
|
||
networks: | ||
ntw: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
docker compose -f docker/compose.test.yaml -p chatbot-test run api-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
docker compose --env-file .env -f docker/compose.yaml -p chatbot up api | ||
docker compose -f docker/compose.yaml -p chatbot up api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
docker compose -f docker/compose.yaml -p chatbot run api \ | ||
python src/modules/create_vector_index.py --params config/params.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[default] | ||
aws_access_key_id = 123 | ||
aws_secret_access_key = xyz | ||
aws_access_key_id = dummy | ||
aws_secret_access_key = dummy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"TableName": "chatbot-local-queries", | ||
"KeySchema": [ | ||
{ | ||
"AttributeName": "sessionId", | ||
"KeyType": "HASH" | ||
}, | ||
{ | ||
"AttributeName": "id", | ||
"KeyType": "RANGE" | ||
} | ||
], | ||
"AttributeDefinitions": [ | ||
{ | ||
"AttributeName": "id", | ||
"AttributeType": "S" | ||
}, | ||
{ | ||
"AttributeName": "sessionId", | ||
"AttributeType": "S" | ||
}, | ||
{ | ||
"AttributeName": "createdAt", | ||
"AttributeType": "S" | ||
} | ||
], | ||
"LocalSecondaryIndexes": [ | ||
{ | ||
"IndexName": "QueriesByCreatedAtIndex", | ||
"KeySchema": [ | ||
{ | ||
"AttributeName": "sessionId", | ||
"KeyType": "HASH" | ||
}, | ||
{ | ||
"AttributeName": "createdAt", | ||
"KeyType": "RANGE" | ||
} | ||
], | ||
"Projection": { | ||
"ProjectionType": "ALL" | ||
} | ||
} | ||
], | ||
"ProvisionedThroughput": { | ||
"ReadCapacityUnits": 5, | ||
"WriteCapacityUnits": 5 | ||
}, | ||
"TableClass": "STANDARD", | ||
"DeletionProtectionEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"TableName": "chatbot-local-sessions", | ||
"KeySchema": [ | ||
{ | ||
"AttributeName": "userId", | ||
"KeyType": "HASH" | ||
}, | ||
{ | ||
"AttributeName": "id", | ||
"KeyType": "RANGE" | ||
} | ||
], | ||
"AttributeDefinitions": [ | ||
{ | ||
"AttributeName": "id", | ||
"AttributeType": "S" | ||
}, | ||
{ | ||
"AttributeName": "userId", | ||
"AttributeType": "S" | ||
}, | ||
{ | ||
"AttributeName": "createdAt", | ||
"AttributeType": "S" | ||
} | ||
], | ||
"LocalSecondaryIndexes": [ | ||
{ | ||
"IndexName": "SessionsByCreatedAtIndex", | ||
"KeySchema": [ | ||
{ | ||
"AttributeName": "userId", | ||
"KeyType": "HASH" | ||
}, | ||
{ | ||
"AttributeName": "createdAt", | ||
"KeyType": "RANGE" | ||
} | ||
], | ||
"Projection": { | ||
"ProjectionType": "ALL" | ||
} | ||
} | ||
], | ||
"ProvisionedThroughput": { | ||
"ReadCapacityUnits": 5, | ||
"WriteCapacityUnits": 5 | ||
}, | ||
"TableClass": "STANDARD", | ||
"DeletionProtectionEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"name": "chatbot", | ||
"version": "4.0.0", | ||
"private": true | ||
} | ||
"name": "chatbot", | ||
"version": "4.0.0", | ||
"private": true, | ||
"scripts": { | ||
"test": "./docker/docker-compose-run-tests.sh" | ||
} | ||
} |
Oops, something went wrong.