Skip to content

Commit

Permalink
Merge pull request #71 from datakind/feat/selenium-e2e-3
Browse files Browse the repository at this point in the history
Feat/selenium e2e 3
  • Loading branch information
dividor authored Jul 11, 2024
2 parents 8b318e3 + 9e17386 commit 34ca22d
Show file tree
Hide file tree
Showing 9 changed files with 546 additions and 164 deletions.
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RECIPE_DB_CONN_STRING=postgresql://${POSTGRES_RECIPE_USER}:${POSTGRES_RECIPE_PAS
#RECIPES_OPENAI_API_TYPE=azure
#RECIPES_OPENAI_API_KEY=
#RECIPES_OPENAI_API_ENDPOINT=<eg https://<YOUR DEPLOYMENT NAME>.openai.azure.com/>
#RECIPES_OPENAI_API_VERSION=2024-02-15-preview
#RECIPES_OPENAI_API_VERSION=2024-05-01-preview
#RECIPES_MODEL=<The deployment name you created in Azure, eg gpt-4o>
#
# Leave these as-is for quick start
Expand Down Expand Up @@ -79,17 +79,18 @@ HAPI_API_TOKEN=
#ASSISTANTS_API_KEY=<API Key as found on the Azure OpenAI resource>
#ASSISTANTS_ID=<ID of the assistant you created in OpenAI. Leave blank if you do not have one yet>
#ASSISTANTS_BASE_URL=<eg https://<YOUR DEPLOYMENT NAME>.openai.azure.com/>
#ASSISTANTS_API_VERSION=2024-02-15-preview
#ASSISTANTS_API_VERSION=2024-05-01-preview
#ASSISTANTS_MODEL=<The deployment name of the model you created in Azure which the assitant uses, eg gpt-4o>
#ASSISTANTS_BOT_NAME=<Your assistant name, eg "Humanitarian AI Assistant">

# If you are using OPen AI directly (ie not Azure)
# ======= START: OpenAI (ie not Azure) =================
ASSISTANTS_API_TYPE=openai
OPENAI_API_KEY=<The API key you created on OpenAI>
ASSISTANTS_API_KEY=${OPENAI_API_KEY}
ASSISTANTS_ID=<ID of the assistant you created in OpenAI. Leave blank if you do not have one yet>
ASSISTANTS_MODEL=<The model your assistant uses>
ASSISTANTS_BOT_NAME=<Your assistant name, eg "Humanitarian AI Assistant">
# Leave as-is
ASSISTANTS_API_KEY=${OPENAI_API_KEY}
ASSISTANTS_BASE_URL=""

#==================================================#
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
sleep 10
# Debugging GitHUb actions interactively, by connecting to the runner ...
# Get ssh connection details for runner
# Get ssh connection details for runner.
# See here https://github.com/marketplace/actions/debugging-with-ssh
# Basically, uncomment this, then get connection string in actions output, then connect with
#
Expand All @@ -114,7 +114,7 @@ jobs:
#- name: DEBUG - Setup upterm session
# uses: lhotari/action-upterm@v1

# - name: DEBUG - Run Selenium outside of promptflow
#- name: DEBUG - Run Selenium outside of promptflow
# run: |
# docker exec promptflow python call_assistant.py

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ This repo contains a docker-compose environment that will run the following comp
RECIPES_OPENAI_API_TYPE=azure
RECIPES_OPENAI_API_KEY=<The API key>
RECIPES_OPENAI_API_ENDPOINT=<eg https://<YOUR DEPLOYMENT NAME>.openai.azure.com/>
RECIPES_OPENAI_API_VERSION=<The API version in your deployment, eg 2024-02-15-preview>
RECIPES_OPENAI_API_VERSION=<The API version in your deployment, eg 2024-05-01-preview>
RECIPES_MODEL=<The deployment name you created in Azure, eg gpt-4o>
ASSISTANTS_API_TYPE=azure
ASSISTANTS_API_KEY=<API Key as found on the Azure OpenAI resource>
ASSISTANTS_ID=<ID of the assistant you created in OpenAI. Leave blank if you do not have one yet>
ASSISTANTS_BASE_URL=<eg https://<YOUR DEPLOYMENT NAME>.openai.azure.com/>
ASSISTANTS_API_VERSION=2024-02-15-preview
ASSISTANTS_API_VERSION=<The API version in your deployment, eg 2024-05-01-preview>
ASSISTANTS_MODEL=<The deployment name of the model you created in Azure which the assitant uses, eg gpt-4o>
ASSISTANTS_BOT_NAME=<Your assistant name, eg "Humanitarian AI Assistant">
Expand Down
2 changes: 1 addition & 1 deletion assistants/chat_ui/create_update_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def upload_files_to_vector_store(vector_store_name, client):

print(f"Uploading {file_paths} to vector store {vector_store_name} ...")

# Create a vector store caled "Financial Statements"
# Create a vector store
vector_store = client.beta.vector_stores.create(name=vector_store_name)

# Ready the files for upload to OpenAI
Expand Down
3 changes: 3 additions & 0 deletions flows/chainlit-ui-evaluation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ COPY ./templates /app/chainlit-ui-evaluation/templates
COPY ./management/skills.py /app/chainlit-ui-evaluation/recipes/skills.py
COPY ./ui/chat-chainlit-assistant/app.py /app/chainlit-ui-evaluation/app.py

# Install vim
RUN apt-get update && apt-get install -y vim

RUN pip3 install --upgrade pip

WORKDIR /app/chainlit-ui-evaluation
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ hdx-python-country==3.6.9
hdx-python-utilities==3.6.6
hdx_python_api==6.2.4
kaleido==0.2.1
langchain-community==0.2.1
langchain==0.2.1
langchain-community==0.2.5
langchain==0.2.5
langchain_openai==0.1.7
literalai==0.0.604
matplotlib==3.9.0
Expand Down
Loading

0 comments on commit 34ca22d

Please sign in to comment.