Skip to content

Commit

Permalink
feat(openai-enhancements): improved user experience when interacting …
Browse files Browse the repository at this point in the history
…with openai (#19)
  • Loading branch information
boltdynamics committed Jul 27, 2023
1 parent 62b377b commit 526af7a
Show file tree
Hide file tree
Showing 6 changed files with 349 additions and 329 deletions.
23 changes: 15 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ tasks:
cmds:
- npm update && npm upgrade

run-cloudfunctions-framework:
run-xplorers-bot:
desc: Run cloud functions framework locally to test the application
cmds:
- npm run start-local-server
- npm run start-xplorersbot-server

run-openai:
desc: Run cloud functions framework locally to test the application
cmds:
- npm run start-openai-server

test:
desc: Run unit tests using jest
Expand Down Expand Up @@ -53,16 +58,18 @@ tasks:
- cp -R node_modules out/* package*.json dist

create-slack-token-secret:
desc: Create a secret in GCP Secret Manager
desc: Create required secrets in GCP Secret Manager
summary: |
Create a secret in GCP Secret Manager to store the slack to store slack token.
Create secrets in GCP Secret Manager to store the slack token, azure openai endpoint and key
Don't forget to set SLACK_OAUTH_TOKEN, AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_KEY env vars
before running this command.
Don't forget to set SLACK_OAUTH_TOKEN env var before running this command.
If you only want to test the slack feature, only supplying the SLACK_OAUTH_TOKEN is enough.
cmds:
- printf ${SLACK_OAUTH_TOKEN} | gcloud secrets create slack-oauth-token-${TF_WORKSPACE} --data-file=- --replication-policy=automatic
preconditions:
- sh: "[ '${SLACK_OAUTH_TOKEN}' == '<no value>' ]"
msg: Please set environment variable 'SLACK_OAUTH_TOKEN' before running this command
- printf ${AZURE_OPENAI_ENDPOINT} | gcloud secrets create azure-openai-endpoint-${TF_WORKSPACE} --data-file=- --replication-policy=automatic
- printf ${AZURE_OPENAI_KEY} | gcloud secrets create azure-openai-key-${TF_WORKSPACE} --data-file=- --replication-policy=automatic

terraform-fmt:
desc: Format terraform files
Expand Down
4 changes: 2 additions & 2 deletions docs/feature_branch_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Terraform [workspaces](https://www.terraform.io/docs/state/workspaces.html) allo
Run the following commands to create and switch to a `dev` workspace:

```
terraform workspace new dev
terraform workspace select dev
terraform -chdir=terraform workspace new dev
terraform -chdir=terraform workspace select dev
```

### Create a slack secret in Google Secret Manager
Expand Down
Loading

0 comments on commit 526af7a

Please sign in to comment.