dao-ai 0.0.29__py3-none-any.whl → 0.0.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dao_ai/config.py CHANGED
@@ -2009,21 +2009,45 @@ class AppConfig(BaseModel):
2009
2009
  def create_agent(
2010
2010
  self,
2011
2011
  w: WorkspaceClient | None = None,
2012
+ vsc: "VectorSearchClient | None" = None,
2013
+ pat: str | None = None,
2014
+ client_id: str | None = None,
2015
+ client_secret: str | None = None,
2016
+ workspace_host: str | None = None,
2012
2017
  ) -> None:
2013
2018
  from dao_ai.providers.base import ServiceProvider
2014
2019
  from dao_ai.providers.databricks import DatabricksProvider
2015
2020
 
2016
- provider: ServiceProvider = DatabricksProvider(w=w)
2021
+ provider: ServiceProvider = DatabricksProvider(
2022
+ w=w,
2023
+ vsc=vsc,
2024
+ pat=pat,
2025
+ client_id=client_id,
2026
+ client_secret=client_secret,
2027
+ workspace_host=workspace_host,
2028
+ )
2017
2029
  provider.create_agent(self)
2018
2030
 
2019
2031
  def deploy_agent(
2020
2032
  self,
2021
2033
  w: WorkspaceClient | None = None,
2034
+ vsc: "VectorSearchClient | None" = None,
2035
+ pat: str | None = None,
2036
+ client_id: str | None = None,
2037
+ client_secret: str | None = None,
2038
+ workspace_host: str | None = None,
2022
2039
  ) -> None:
2023
2040
  from dao_ai.providers.base import ServiceProvider
2024
2041
  from dao_ai.providers.databricks import DatabricksProvider
2025
2042
 
2026
- provider: ServiceProvider = DatabricksProvider(w=w)
2043
+ provider: ServiceProvider = DatabricksProvider(
2044
+ w=w,
2045
+ vsc=vsc,
2046
+ pat=pat,
2047
+ client_id=client_id,
2048
+ client_secret=client_secret,
2049
+ workspace_host=workspace_host,
2050
+ )
2027
2051
  provider.deploy_agent(self)
2028
2052
 
2029
2053
  def find_agents(
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from typing import Annotated, Any, Callable, List, Optional, Sequence
2
3
 
3
4
  import mlflow
@@ -100,12 +101,36 @@ def create_vector_search_tool(
100
101
  # Initialize the vector store
101
102
  # Note: text_column is only required for self-managed embeddings
102
103
  # For Databricks-managed embeddings, it's automatically determined from the index
104
+
105
+ # Build client_args for VectorSearchClient from environment variables
106
+ # This is needed because during MLflow model validation, credentials must be
107
+ # explicitly passed to VectorSearchClient via client_args.
108
+ # The workspace_client parameter in DatabricksVectorSearch is only used to detect
109
+ # model serving mode - it doesn't pass credentials to VectorSearchClient.
110
+ client_args: dict[str, Any] = {}
111
+ if os.environ.get("DATABRICKS_HOST"):
112
+ client_args["workspace_url"] = os.environ.get("DATABRICKS_HOST")
113
+ if os.environ.get("DATABRICKS_TOKEN"):
114
+ client_args["personal_access_token"] = os.environ.get("DATABRICKS_TOKEN")
115
+ if os.environ.get("DATABRICKS_CLIENT_ID"):
116
+ client_args["service_principal_client_id"] = os.environ.get(
117
+ "DATABRICKS_CLIENT_ID"
118
+ )
119
+ if os.environ.get("DATABRICKS_CLIENT_SECRET"):
120
+ client_args["service_principal_client_secret"] = os.environ.get(
121
+ "DATABRICKS_CLIENT_SECRET"
122
+ )
123
+
124
+ logger.debug(f"Creating DatabricksVectorSearch with client_args keys: {list(client_args.keys())}")
125
+
126
+ # Pass both workspace_client (for model serving detection) and client_args (for credentials)
103
127
  vector_store: DatabricksVectorSearch = DatabricksVectorSearch(
104
128
  index_name=index_name,
105
129
  text_column=None, # Let DatabricksVectorSearch determine this from the index
106
130
  columns=columns,
107
131
  include_score=True,
108
132
  workspace_client=vector_store_config.workspace_client,
133
+ client_args=client_args if client_args else None,
109
134
  )
110
135
 
111
136
  # Register the retriever schema with MLflow for model serving integration
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao-ai
3
- Version: 0.0.29
3
+ Version: 0.0.31
4
4
  Summary: DAO AI: A modular, multi-agent orchestration framework for complex AI workflows. Supports agent handoff, tool integration, and dynamic configuration via YAML.
5
5
  Project-URL: Homepage, https://github.com/natefleming/dao-ai
6
6
  Project-URL: Documentation, https://natefleming.github.io/dao-ai
@@ -3,7 +3,7 @@ dao_ai/agent_as_code.py,sha256=sviZQV7ZPxE5zkZ9jAbfegI681nra5i8yYxw05e3X7U,552
3
3
  dao_ai/catalog.py,sha256=sPZpHTD3lPx4EZUtIWeQV7VQM89WJ6YH__wluk1v2lE,4947
4
4
  dao_ai/chat_models.py,sha256=uhwwOTeLyHWqoTTgHrs4n5iSyTwe4EQcLKnh3jRxPWI,8626
5
5
  dao_ai/cli.py,sha256=gq-nsapWxDA1M6Jua3vajBvIwf0Oa6YLcB58lEtMKUo,22503
6
- dao_ai/config.py,sha256=qqBdYV-ElIMYDKzY4lBejyJ6ysmwnBkqyGMWRBwWGVo,72507
6
+ dao_ai/config.py,sha256=r4mhailZn2edyJpElUGPvJS5rYyt6kclNWIK6RG328g,73279
7
7
  dao_ai/graph.py,sha256=9kjJx0oFZKq5J9-Kpri4-0VCJILHYdYyhqQnj0_noxQ,8913
8
8
  dao_ai/guardrails.py,sha256=4TKArDONRy8RwHzOT1plZ1rhy3x9GF_aeGpPCRl6wYA,4016
9
9
  dao_ai/messages.py,sha256=xl_3-WcFqZKCFCiov8sZOPljTdM3gX3fCHhxq-xFg2U,7005
@@ -33,9 +33,9 @@ dao_ai/tools/python.py,sha256=XcQiTMshZyLUTVR5peB3vqsoUoAAy8gol9_pcrhddfI,1831
33
33
  dao_ai/tools/slack.py,sha256=SCvyVcD9Pv_XXPXePE_fSU1Pd8VLTEkKDLvoGTZWy2Y,4775
34
34
  dao_ai/tools/time.py,sha256=Y-23qdnNHzwjvnfkWvYsE7PoWS1hfeKy44tA7sCnNac,8759
35
35
  dao_ai/tools/unity_catalog.py,sha256=uX_h52BuBAr4c9UeqSMI7DNz3BPRLeai5tBVW4sJqRI,13113
36
- dao_ai/tools/vector_search.py,sha256=h6yCgEtOA3h-anJG0hGB3VvcmC3Os7_qnhz8xxRjv1E,11346
37
- dao_ai-0.0.29.dist-info/METADATA,sha256=ze54m_V26Rh451YBjImiAAf_ZgZ3j41XscMLMoSrHGc,42778
38
- dao_ai-0.0.29.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
39
- dao_ai-0.0.29.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
40
- dao_ai-0.0.29.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
41
- dao_ai-0.0.29.dist-info/RECORD,,
36
+ dao_ai/tools/vector_search.py,sha256=6SHw3RRR9Itfx7AMQAr3glXb15o8qIZDNri7uDw9JxI,12614
37
+ dao_ai-0.0.31.dist-info/METADATA,sha256=fq-wYpeRMkTteamhkpnMjp64G0-GnTIxNxousrQLKb4,42778
38
+ dao_ai-0.0.31.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
39
+ dao_ai-0.0.31.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
40
+ dao_ai-0.0.31.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
41
+ dao_ai-0.0.31.dist-info/RECORD,,