looker-open-source / looker-explore-assistant

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

Default Looker Model or Explore is blank or unspecified #105

Open LydiaB123 opened 2 months ago

LydiaB123 commented 2 months ago

Default Looker Model or Explore is blank or unspecified

Screenshot 2024-09-22 at 16 38 50

Error Name: Error Message: Default Looker Model or Explore is blank or unspecified

Diagnosis: The error is likely related to your Look specific .env variables.

Troubleshooting Steps Check the LOOKML_MODEL & LOOKML_EXPLORE env variables for your extension. Are they valid (spelling) & exist in your Looker instance?

Make sure your user has access to this model and explore. At the very least with see_lookml permissions.

Check the Connection environment variables. Do valid BQ connections by those names exist in your Looker instance?

.env file

VERTEX_BIGQUERY_LOOKER_CONNECTION_NAME=explore_assistant VERTEX_BIGQUERY_MODEL_ID=.explore_assistant.explore_assistant_llm BIGQUERY_EXAMPLE_PROMPTS_CONNECTION_NAME=explore_assistant BIGQUERY_EXAMPLE_PROMPTS_DATASET_NAME=.explore_assistant

LOOKER_MODEL=<model_name of the explore that I want the explore assistant to use - not the model the explore assistant is using> LOOKER_EXPLORE=

I would appreciate any suggestions you may have on how to investigate and troubleshoot this issue.

antfido commented 2 months ago

hey @LydiaB123 can you share your .env file ?

LydiaB123 commented 1 month ago

hey @LydiaB123 can you share your .env file ?

Hi @antfido, here is my .env file

VERTEX_AI_ENDPOINT=<This is your Deployed Cloud Function Endpoint>
VERTEX_CF_AUTH_TOKEN=<This is the token used to communicate with the cloud function>

VERTEX_BIGQUERY_LOOKER_CONNECTION_NAME=explore_assistant_llm
VERTEX_BIGQUERY_MODEL_ID=<project_id>.explore_assistant.explore_assistant_llm
BIGQUERY_EXAMPLE_PROMPTS_CONNECTION_NAME=explore_assistant_llm
BIGQUERY_EXAMPLE_PROMPTS_DATASET_NAME=<project_id>.explore_assistant

LOOKER_MODEL=looker-gen-ai
LOOKER_EXPLORE=wh_events_fact
antfido commented 1 month ago

and do you remember to update your bundle.js file after changing .env file ? and did you check all of the steps from troubleshooting steps ?

LydiaB123 commented 1 month ago

and do you remember to update your bundle.js file after changing .env file ? and did you check all of the steps from troubleshooting steps ?

@antfido

Yes, I did update my bundle.js I have gone through the troubleshooting steps:

  1. The model and explore name is correct, when testing / in the url it loads the explore.
  2. The user (my account) has admin permissions
  3. The connections exist and I have used SQL runner to test if they can access the data and the model and this works.

Looking into it I'm wondering if it is due to the explore and model I reference in my .env file uses a different connection than the explore assistant and therefore having issues there or with the permissions?

EDIT: I have moved the data into the same Google CLoud Project so it could use the same connection and I still get the same error.

venkatasangaraju commented 1 month ago

With the new version, you dont need to specify looker model and explore in .env file. Based on entries in samples table, you will the dropdown on the extension to select the explore. Please make sure to load below tables if you are using BQ explore_assistant_samples explore_assistant_refinement_examples explore_assistant_examples

njia123 commented 1 month ago

I have the exact same error, these 3 tables were properly populated with model_name[] format in the BQ table

RiccardoRubini93 commented 1 month ago

Hi all, I'm getting the exact same error as @LydiaB123 with a newly forked version. Does anyone have any update? Many thanks Riccardo