diff --git a/integrations/langchain/src/databricks_langchain/vector_search.py b/integrations/langchain/src/databricks_langchain/vector_search.py new file mode 100644 index 0000000..728f263 --- /dev/null +++ b/integrations/langchain/src/databricks_langchain/vector_search.py @@ -0,0 +1,8 @@ +from databricks_langchain.vector_search import DatabricksVectorSearch +class VectorSearchRetrieverTool(): + def __init__(self, *args, **kwargs): + vector_store = DatabricksVectorSearch( + endpoint=endpoint_name, + index_name=index_name, + ) + return vector_store.as_retriever().as_tool() diff --git a/src/databricks_ai_bridge/vector_search.py b/src/databricks_ai_bridge/vector_search.py new file mode 100644 index 0000000..211830b --- /dev/null +++ b/src/databricks_ai_bridge/vector_search.py @@ -0,0 +1,2 @@ +# Put common logic for exposing Databricks vector search as a tool here +# for example: querying a VS endpoint, getting metadata about the index, ...