Skip to content

Commit

Permalink
Remove validation for index_name
Browse files Browse the repository at this point in the history
  • Loading branch information
harupy committed Dec 5, 2024
1 parent 0f4c2ef commit 32000cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libs/databricks/langchain_databricks/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class IndexType(str, Enum):
_NON_MANAGED_EMB_ONLY_MSG = (
"`%s` is not supported for index with Databricks-managed embeddings."
)
_INDEX_NAME_PATTERN = re.compile(r"^[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+$")


class DatabricksVectorSearch(VectorStore):
Expand Down Expand Up @@ -217,10 +216,10 @@ def __init__(
text_column: Optional[str] = None,
columns: Optional[List[str]] = None,
):
if not (isinstance(index_name, str) and _INDEX_NAME_PATTERN.match(index_name)):
if not isinstance(index_name, str):
raise ValueError(
"The `index_name` parameter must be a string in the format "
f"'catalog.schema.index'. Received: {index_name}"
"The `index_name` parameter must be a string, "
f"but got {type(index_name).__name__}."
)

try:
Expand Down

0 comments on commit 32000cb

Please sign in to comment.