Skip to content

Commit 2c3ab58

Browse files
committed
Update parameters
1 parent c8c1f5d commit 2c3ab58

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

deploy_ai_search/deploy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def deploy_config(arguments: argparse.Namespace):
3030
index_config = Text2SqlQueryCacheAISearch(
3131
suffix=arguments.suffix,
3232
rebuild=arguments.rebuild,
33-
single_cache_file=arguments.single_cache_file,
34-
enable_cache_indexer=arguments.enable_cache_indexer,
33+
single_query_cache_file=arguments.single_query_cache_file,
34+
enable_query_cache_indexer=arguments.enable_query_cache_indexer,
3535
)
3636
else:
3737
raise ValueError("Invalid Indexer Type")
@@ -69,13 +69,13 @@ def deploy_config(arguments: argparse.Namespace):
6969
help="Whether or not a single data dictionary file should be uploaded, or one per entity",
7070
)
7171
parser.add_argument(
72-
"--single_cache_file",
72+
"--single_query_cache_file",
7373
type=bool,
7474
required=False,
7575
help="Whether or not a single cache file should be uploaded, or one per question",
7676
)
7777
parser.add_argument(
78-
"--enable_cache_indexer",
78+
"--enable_query_cache_indexer",
7979
type=bool,
8080
required=False,
8181
help="Whether or not the sql query cache indexer should be enabled",

deploy_ai_search/text_2_sql_query_cache.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ def __init__(
3333
self,
3434
suffix: str | None = None,
3535
rebuild: bool | None = False,
36-
single_cache_file: bool | None = False,
37-
enable_cache_indexer: bool | None = False,
36+
single_query_cache_file: bool | None = False,
37+
enable_query_cache_indexer: bool | None = False,
3838
):
3939
"""Initialize the Text2SqlAISearch class. This class implements the deployment of the sql index.
4040
4141
Args:
4242
suffix (str, optional): The suffix for the indexer. Defaults to None. If an suffix is provided, it is assumed to be a test indexer.
4343
rebuild (bool, optional): Whether to rebuild the index. Defaults to False.
44-
single_cache_file (bool, optional): Whether to use a single cache file. Defaults to False. Only applies if the cache indexer is enabled.
45-
enable_cache_indexer (bool, optional): Whether to enable cache indexer. Defaults to False.
44+
single_query_cache_file (bool, optional): Whether to use a single cache file. Defaults to False. Only applies if the cache indexer is enabled.
45+
enable_query_cache_indexer (bool, optional): Whether to enable cache indexer. Defaults to False.
4646
"""
4747
self.indexer_type = IndexerType.TEXT_2_SQL_QUERY_CACHE
48-
self.enable_cache_indexer = enable_cache_indexer
48+
self.enable_query_cache_indexer = enable_query_cache_indexer
4949
super().__init__(suffix, rebuild)
5050

51-
if single_cache_file:
51+
if single_query_cache_file:
5252
self.parsing_mode = BlobIndexerParsingMode.JSON_ARRAY
5353
else:
5454
self.parsing_mode = BlobIndexerParsingMode.JSON
@@ -164,7 +164,7 @@ def get_skills(self) -> list:
164164
Returns:
165165
list: The skillsets used in the indexer"""
166166

167-
if self.enable_cache_indexer is False:
167+
if self.enable_query_cache_indexer is False:
168168
return []
169169

170170
embedding_skill = self.get_vector_skill(
@@ -181,7 +181,7 @@ def get_indexer(self) -> SearchIndexer:
181181
Returns:
182182
SearchIndexer: The indexer for sql"""
183183

184-
if self.enable_cache_indexer is False:
184+
if self.enable_query_cache_indexer is False:
185185
return None
186186

187187
# Only place on schedule if it is not a test deployment

0 commit comments

Comments
 (0)