Skip to content

Commit

Permalink
add Initialize app step
Browse files Browse the repository at this point in the history
  • Loading branch information
yoomlam committed Jun 8, 2024
1 parent 23d1c9b commit b9167e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ jobs:
# The ENV_FILE_CONTENTS contains API keys, like LITERAL_API_KEY and OPENAI_API_KEY
# As such, make sure the built image is not publicly accessible
cd ${{ inputs.dockerfile_folder }}
echo "${{ secrets[env.SECRET_NAME] }}" > .env
wc .env
# TODO: Remove conditional once "Initialize app" step works
if [ "${{ inputs.dockerfile_folder }}" != "05-assistive-chatbot" ]; then
echo "${{ secrets[env.SECRET_NAME] }}" > .env
wc .env
fi
- name: "Build image: ${{ github.sha }}"
if: inputs.build_image
Expand Down Expand Up @@ -173,4 +176,15 @@ jobs:
sleep 10
./.github/workflows/waitForLightsail.sh deployment
- name: "Initialize app"
if: inputs.deploy_image
run: |
# The ENV_FILE_CONTENTS contains API keys, like LITERAL_API_KEY and OPENAI_API_KEY
# As such, make sure the built image is not publicly accessible
echo "${{ secrets[env.SECRET_NAME] }}" > .env
SVC_URL=$(aws lightsail get-container-services --service-name "$SERVICE_NAME" | jq -r '.containerServices[0].url')
curl -X POST "SVC_URL/initenvs" --data-binary '@.env'
# TODO: warm up vector DB on startup
1 change: 1 addition & 0 deletions 05-assistive-chatbot/chatbot/llms/groq_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, model_name, settings):
self.model_name = model_name
self.settings = settings
logger.info("Creating LLM client '%s' with %s", model_name, self.settings)
# TODO: remove temperature from settings
self.client = Groq(**self.settings)

def generate_reponse(self, message):
Expand Down

0 comments on commit b9167e0

Please sign in to comment.