Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Python: Revert "Python: Update Azure Cognitive Search Class Change VectorSearchAlgorithmConfi…" #2531

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ psycopg = "^3.1.9"
psycopg-binary = "^3.1.9"

[tool.poetry.group.azure_cognitive_search.dependencies]
azure-search-documents = {version = "11.4.0b8", allow-prereleases = true}
azure-search-documents = {version = "11.4.0b6", allow-prereleases = true}
azure-core = "^1.28.0"
azure-identity = "^1.13.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from azure.core.exceptions import ResourceNotFoundError
from azure.search.documents.indexes.aio import SearchIndexClient
from azure.search.documents.indexes.models import (
HnswVectorSearchAlgorithmConfiguration,
SearchIndex,
VectorSearch,
VectorSearchAlgorithmConfiguration,
)
from numpy import ndarray

Expand Down Expand Up @@ -58,6 +58,7 @@ def __init__(
Instantiate using Async Context Manager:
async with AzureCognitiveSearchMemoryStore(<...>) as memory:
await memory.<...>

"""
try:
pass
Expand All @@ -81,14 +82,14 @@ async def close_async(self):
async def create_collection_async(
self,
collection_name: str,
vector_config: Optional[HnswVectorSearchAlgorithmConfiguration] = None,
vector_config: Optional[VectorSearchAlgorithmConfiguration] = None,
) -> None:
"""Creates a new collection if it does not exist.

Arguments:
collection_name {str} -- The name of the collection to create.
vector_config {HnswVectorSearchAlgorithmConfiguration} -- Optional search algorithm configuration
(default: {None}).
vector_config {VectorSearchAlgorithmConfiguration} -- Optional search algorithm configuration
(default: {None}).
semantic_config {SemanticConfiguration} -- Optional search index configuration (default: {None}).
Returns:
None
Expand All @@ -99,7 +100,7 @@ async def create_collection_async(
else:
vector_search = VectorSearch(
algorithm_configurations=[
HnswVectorSearchAlgorithmConfiguration(
VectorSearchAlgorithmConfiguration(
name="az-vector-config",
kind="hnsw",
hnsw_parameters={
Expand Down