Update Genie to optionally take in a workspace client#73
Conversation
| genie_space_id, | ||
| genie_agent_name: str = "Genie", | ||
| description: str = "", | ||
| client: Optional["WorkspaceClient"] = None, |
There was a problem hiding this comment.
QQ - is this the same argument name for VectorSearchRetrieverTool and UCToolkit? Actually, I guess VectorSearchRetrieverTool doesn't support a client yet right? https://api-docs.databricks.com/python/databricks-ai-bridge/latest/databricks_langchain.html#databricks_langchain.VectorSearchRetrieverTool
There was a problem hiding this comment.
VectorSearch is different. Does not take in a workspace client. I Have a different PR for it coming up, just need to finish tests.
There was a problem hiding this comment.
Got it, I see the param name matches https://docs.unitycatalog.io/ai/quickstart/#create-a-langchain-tool, looks good then
smurching
left a comment
There was a problem hiding this comment.
Had a QQ (sorry in customer call so multitasking rn) otherwise looks good!
| # Test the case when genie_response is empty | ||
| mock_genie.ask_question.return_value = GenieResponse(result=None) | ||
| result = _query_genie_as_agent(input_data, "space-id", "Genie") | ||
| result = _query_genie_as_agent(input_data, "space-id", "Genie", None) |
There was a problem hiding this comment.
Can we add a quick test that if the GenieAgent was initialized with the workspaceClient, is Genie also initialized with the same one?
Updating Genie Integration to optionally take in a Workspace Client. This will be used in invokers rights in order for users to pass in an optional Workspace Client.
Test Notebook: https://e2-dogfood.staging.cloud.databricks.com/editor/notebooks/490640693269456?o=6051921418418893