Spaces:
Running
Running
fix: pass username to SmartDataAdjuster so ThoughtSpotDeployer can auth
Browse filesThoughtSpotDeployer requires username but SmartDataAdjuster wasn't
accepting or forwarding it, causing liveboard context load to fail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- chat_interface.py +2 -0
- smart_data_adjuster.py +3 -1
chat_interface.py
CHANGED
|
@@ -436,6 +436,7 @@ I'll research a company, build a Snowflake schema, generate realistic data, and
|
|
| 436 |
llm_model=llm_model,
|
| 437 |
ts_url=ts_url,
|
| 438 |
ts_secret=ts_secret,
|
|
|
|
| 439 |
prompt_logger=self._prompt_logger,
|
| 440 |
)
|
| 441 |
adjuster.connect()
|
|
@@ -3987,6 +3988,7 @@ Ask these questions to showcase ThoughtSpot's AI capabilities:
|
|
| 3987 |
llm_model=llm_model,
|
| 3988 |
ts_url=self.settings.get('thoughtspot_url') or None,
|
| 3989 |
ts_secret=self.settings.get('thoughtspot_trusted_auth_key') or None,
|
|
|
|
| 3990 |
prompt_logger=self._prompt_logger,
|
| 3991 |
)
|
| 3992 |
adjuster.connect()
|
|
|
|
| 436 |
llm_model=llm_model,
|
| 437 |
ts_url=ts_url,
|
| 438 |
ts_secret=ts_secret,
|
| 439 |
+
username=ts_user,
|
| 440 |
prompt_logger=self._prompt_logger,
|
| 441 |
)
|
| 442 |
adjuster.connect()
|
|
|
|
| 3988 |
llm_model=llm_model,
|
| 3989 |
ts_url=self.settings.get('thoughtspot_url') or None,
|
| 3990 |
ts_secret=self.settings.get('thoughtspot_trusted_auth_key') or None,
|
| 3991 |
+
username=self._get_effective_user_email(),
|
| 3992 |
prompt_logger=self._prompt_logger,
|
| 3993 |
)
|
| 3994 |
adjuster.connect()
|
smart_data_adjuster.py
CHANGED
|
@@ -38,12 +38,13 @@ class SmartDataAdjuster:
|
|
| 38 |
|
| 39 |
def __init__(self, database: str, schema: str, liveboard_guid: str,
|
| 40 |
llm_model: str = None, ts_url: str = None, ts_secret: str = None,
|
| 41 |
-
prompt_logger=None):
|
| 42 |
self.database = database
|
| 43 |
self.schema = schema
|
| 44 |
self.liveboard_guid = liveboard_guid
|
| 45 |
self.ts_url = (ts_url or "").strip() or None
|
| 46 |
self.ts_secret = (ts_secret or "").strip() or None
|
|
|
|
| 47 |
|
| 48 |
self.llm_model = (llm_model or "").strip()
|
| 49 |
if not self.llm_model:
|
|
@@ -76,6 +77,7 @@ class SmartDataAdjuster:
|
|
| 76 |
|
| 77 |
self.ts_client = ThoughtSpotDeployer(
|
| 78 |
base_url=self.ts_url or None,
|
|
|
|
| 79 |
secret_key=self.ts_secret or None,
|
| 80 |
)
|
| 81 |
self.ts_client.authenticate()
|
|
|
|
| 38 |
|
| 39 |
def __init__(self, database: str, schema: str, liveboard_guid: str,
|
| 40 |
llm_model: str = None, ts_url: str = None, ts_secret: str = None,
|
| 41 |
+
username: str = None, prompt_logger=None):
|
| 42 |
self.database = database
|
| 43 |
self.schema = schema
|
| 44 |
self.liveboard_guid = liveboard_guid
|
| 45 |
self.ts_url = (ts_url or "").strip() or None
|
| 46 |
self.ts_secret = (ts_secret or "").strip() or None
|
| 47 |
+
self.username = (username or "").strip() or None
|
| 48 |
|
| 49 |
self.llm_model = (llm_model or "").strip()
|
| 50 |
if not self.llm_model:
|
|
|
|
| 77 |
|
| 78 |
self.ts_client = ThoughtSpotDeployer(
|
| 79 |
base_url=self.ts_url or None,
|
| 80 |
+
username=self.username,
|
| 81 |
secret_key=self.ts_secret or None,
|
| 82 |
)
|
| 83 |
self.ts_client.authenticate()
|