bettersg / checkMate

GNU General Public License v3.0
5 stars 1 forks source link

[Bug] onInstanceCreate not having access to OPENAI_API_KEY secret #170

Closed sarge1989 closed 11 months ago

sarge1989 commented 11 months ago

...which led to this

image

Line causing error is:

const strippedMessage = await anonymiseMessage(data.text)

Line to be changed is

const onInstanceCreate = functions
  .region("asia-southeast1")
  .runWith({
    secrets: [
      "WHATSAPP_USER_BOT_PHONE_NUMBER_ID",
      "WHATSAPP_CHECKERS_BOT_PHONE_NUMBER_ID",
      "WHATSAPP_TOKEN",
      "TYPESENSE_TOKEN",
      "ML_SERVER_TOKEN",
    ],
  })

OPENAI_API_KEY should be added to this list.