looker-open-source / looker-explore-assistant

A React Application for interacting with Looker data through natural language.
MIT License
103 stars 70 forks source link

Deploying BQ Explore Assist to production #13

Closed tkrywitsky-g closed 3 months ago

tkrywitsky-g commented 7 months ago

Hello,

I have followed the guide for the BigQuery deployment, including creating the BQ connection, LLM model, and dataset. I have also built the Looker extension using npm run build and uploaded the bundle.js file to my Looker instance.

When I run the extension in Looker it hangs. When I look in the developer console as I first load the extension I see a 404 error from the Looker SDK. The URL is trying to connect to is: https://.looker.app/api/internal/core/4.0/lookml_models/%3CThis%20is%20your%20Looker%20Model%20Name%3E/explores/%3CThis%20is%20your%20Looker%20Explore%20Name%3E?fields=fields

It appears that the LOOKER_EXPLORE and LOOKER_MODEL variables are not set. I set them locally when I ran the extension in my local VM, but it appears that when I package the application for upload to run in Looker itself that the variables are not set.

Do I have to configure the LOOKER_MODEL, LOOKER_EXPLORE and BQML_MODEL_ID within Looker?

Thanks!

LukaFontanilla commented 7 months ago

Thanks for the context on the error itself! That's helpful. By setting them locally I presume you exported them in your bash shell or terminal? Can you try renaming the .env_example file to .env, removing the placeholders and filling in the variables there? Then rebuilding the bundle.js file and updating that in the Looker project?

I realize the documentation doesn't explicitly call out doing that (RE: .env_example -> .env).