ljacobsson / cw-logs-insights-gpt

Chrome extension that generates CloudWatch Logs Insights queries from ChatGPT prompts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting a "sk is not defined" error

rnhurt opened this issue · comments

I'm getting a couple of errors when I install this extension.

Environment:

  • MacBook Pro M1
  • macOS 13.4 beta
  • Chrome Version 112.0.5615.49 (Official Build) (arm64)

Errors:

image
image

I do get the "Convert to query" button, but when I press it nothing happens.

image

Hi @rnhurt

It sounds a bit like you haven't added quotes around your API key. The OpenAI API keys start with sk- and without quotes it would create an arithemtic expression of two undefined vars.

image

You were absolutely correct. My apiKey.js was malformed. Once I corrected that it started working.

Thanx!