-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VectorSearchRetrieverTool Openai integration #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! just left a couple comments
@@ -0,0 +1,6 @@ | |||
from databricks_openai.vector_search_retriever_tool import VectorSearchRetrieverTool | |||
|
|||
# Expose all integrations to users under databricks-langchain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this is supposed to be databricks-openai?
None, | ||
description="The name of the text column to use for the embeddings. " | ||
"Required for direct-access index or delta-sync index with " | ||
"self-managed embeddings. Used for direct access indexes or " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we need the description to be duplicated (required for ... used for ...)?
) -> List[Dict[str, Any]]: | ||
""" | ||
Execute the VectorSearchIndex tool calls from the ChatCompletions response that correspond to the | ||
self.tool VectorSearchRetrieverToolInput and attach the retrieved documents into toll call messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo
self.tool VectorSearchRetrieverToolInput and attach the retrieved documents into toll call messages. | |
self.tool VectorSearchRetrieverToolInput and attach the retrieved documents into tool call messages. |
embedding_model_name=self_managed_embeddings_test.embedding_model_name, | ||
openai_client=self_managed_embeddings_test.open_ai_client, | ||
) | ||
assert response is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a little more validation on the response?
What does this PR do?
This PR introduces the databricks-openai python package with the VectorSearchRetrieverTool. The VectorSearchRetrieverTool allows for easy integration between OpenAI chat completions tool calling and Databricks VectorSearch. This tool supports the 3 types of VectorSearch Indexes. See testing below for usage details.
Delta Sync Index with Databricks managed embeddings:
Delta Sync Index with self managed embeddings:
Direct Access Index: