Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError when deploying the extension-bigquery #20

Closed
plc1220 opened this issue Mar 27, 2024 · 3 comments
Closed

Uncaught TypeError when deploying the extension-bigquery #20

plc1220 opened this issue Mar 27, 2024 · 3 comments

Comments

@plc1220
Copy link

plc1220 commented Mar 27, 2024

I've follow through the steps, except for step 4 on the npm run start as I'm running from cloudshell

Straight jump to step 5 npm run build, had a small error on "clean script not defined", edited the package.json and add clean:"", and successfully built. Copied to looker project and all went fine, the extension UI showed up, but freeze once clicked Run Prompt. Checked bigquery job history and the job was there.

Checked on F12 Dev tool here's the error
Screenshot 2024-03-28 at 1 49 46 AM

Change prompt and it'll appear the same error. Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'generated_content')
at bundle.js:765:8408

Not sure how to fix this, guidance would be greatly appreciated.

Thanks!

@LukaFontanilla
Copy link
Collaborator

It sounds like the BigQuery query issued from the Explore Assistant either returned undefined OR the data structure gemini-pro returns changed. I'd recommend grabbing the SQL generated either via Looker -> Admin -> Queries or via BQ Job History and running that in BigQuery or Looker's SQL Runner. Does a result with the generated url return? If so what does that look like ? It would also be worth double confirming that the LookML Explore and Model are inputted correctly into the SQL and that the BQML Model, Dataset and Table all match what has been created in your environment. If following the default instructions in the repo that should be the case as of the latest commit.

@LukaFontanilla
Copy link
Collaborator

Additionally on the Looker side, the network request to look for would be something like this: api/internal/core/4.0/sql_queries/<some slug>/run/json with an expected output of:
[ { "generated_content": "<generated_explore_url>" } ]

There should only be one row, as the sql query will filter for a specific Looker model and explore from the table created in the instructions. The LLM output will be labeled as generated_content as that is default on the SQL Query side.

@plc1220
Copy link
Author

plc1220 commented Mar 28, 2024

@LukaFontanilla Thanks for the help! Apparently I made a spelling mistake when creating the example table, realized it when rerun the query in bigq~ Fixed that and it worked like a charm!

@plc1220 plc1220 closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants