Skip to content

Commit

Permalink
Add 04-call-summaries deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
yoomlam committed Jun 6, 2024
1 parent e5c7090 commit 99a977f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,30 @@ jobs:
if: inputs.build_image
uses: actions/checkout@v4

- name: "Populate folder with input files"
- name: "Populate 05-assistive-chatbot folder with input files"
if: inputs.build_image && ${{ inputs.dockerfile_folder }} == '05-assistive-chatbot'
env:
GURU_CARDS_URL: https://docs.google.com/uc?export=download&id=${{ secrets.GURU_CARDS_URL_ID }}
run: |
echo "Downloading from ${GURU_CARDS_URL}"
curl -L "${GURU_CARDS_URL}" > download.zip
unzip -o download.zip
rm download.zip
mv guru_cards_for_nava--Multi-benefit.json guru_cards_for_nava.json
cd ${{ inputs.dockerfile_folder }}
mv ../guru_cards_for_nava.json .
# The DOT_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.DOT_ENV_FILE_CONTENTS }}" > .env
- name: "Populate 04-call-summaries folder with input files"
if: inputs.build_image && ${{ inputs.dockerfile_folder }} == '04-call-summaries'
run: |
# The DOT_ENV_FILE_CONTENTS_04 contains API keys, like LITERAL_API_KEY and OPENAI_API_KEY
# As such, make sure the built image is not publicly accessible
echo "${{ secrets.DOT_ENV_FILE_CONTENTS_04 }}" > .env
- name: "Build image: ${{ github.sha }}"
if: inputs.build_image
env:
GURU_CARDS_URL: https://docs.google.com/uc?export=download&id=${{ secrets.GURU_CARDS_URL_ID }}
run: |
cd ${{ inputs.dockerfile_folder }}
cd ${{ inputs.dockerfile_folder }}
[ -f ./get_input_files.sh ] && ./get_input_files.sh
# Add extra environment variables to facilitate traceability of an image back to the source code
echo "
BUILD_DATE=$(date +%Y-%m-%d-%T)
Expand Down
4 changes: 2 additions & 2 deletions 05-assistive-chatbot/.chainlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ latex = false

[UI]
# Name of the app and chatbot.
name = "Chatbot"
name = "Assistive Chatbot"

# Show the readme while the thread is empty.
show_readme_as_default = false
Expand All @@ -60,7 +60,7 @@ default_expand_messages = true
hide_cot = false

# Link to your github repo. This will add a github button in the UI's header.
github = "https://github.com/navapbc/labs-gen-ai-experiments/tree/main/02-household-queries"
github = "https://github.com/navapbc/labs-gen-ai-experiments/tree/main/05-assistive-chatbot"

# Specify a CSS file that can be used to customize the user interface.
# The CSS file can be served from the public directory or via an external link.
Expand Down
2 changes: 2 additions & 0 deletions 05-assistive-chatbot/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ log/

# .env contains secret API keys
.env

guru_cards*.json
17 changes: 17 additions & 0 deletions 05-assistive-chatbot/get_input_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

if [ -z "${GURU_CARDS_URL_ID}" ]; then
echo "Please set GURU_CARDS_URL_ID to the Google Drive file ID of the Guru cards zip file."
echo "Copy it from the URL -- it looks like: 1AO-AbCDeF1234567890abcdefgh"
echo "Example usage: GURU_CARDS_URL_ID=1AO-AbCDeF1234567890abcdefgh ./get_input_files.sh"
exit 1
fi

set -e

GURU_CARDS_URL="https://docs.google.com/uc?export=download&id=${GURU_CARDS_URL_ID}"
echo "Downloading from ${GURU_CARDS_URL}"
curl -f -L "${GURU_CARDS_URL}" -o /tmp/download.zip
unzip -o /tmp/download.zip
rm -v /tmp/download.zip
mv -v guru_cards_for_nava--Multi-benefit.json guru_cards_for_nava.json

0 comments on commit 99a977f

Please sign in to comment.