Skip to content

Commit 12b5fe4

Browse files
committed
Add app config for text chunker page setings
1 parent 57fcc94 commit 12b5fe4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

azuredeploy.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,14 @@
410410
"name": "StorageContainerNameBlobChunks",
411411
"value": "[variables('storageContainerNameBlobChunks')]"
412412
},
413+
{
414+
"name": "TextChunkerPageLength",
415+
"value": "[variables('textChunkerPageLength')]"
416+
},
417+
{
418+
"name": "TextChunkerPageOverlap",
419+
"value": "[variables('textChunkerPageOverlap')]"
420+
},
413421
{
414422
"name": "TextEmbedderFunctionEndpointPython",
415423
"value": "[concat('https://', reference(resourceId('Microsoft.Web/sites', variables('functionAppNamePython')), '2022-09-01').defaultHostName, '/api/chunk-embed')]"
@@ -537,11 +545,11 @@
537545
"value": "[variables('functionApiKey')]"
538546
},
539547
"textChunkerPageLength": {
540-
"type": "string",
548+
"type": "int",
541549
"value": "[variables('textChunkerPageLength')]"
542550
},
543551
"textChunkerPageOverlap": {
544-
"type": "string",
552+
"type": "int",
545553
"value": "[variables('textChunkerPageOverlap')]"
546554
},
547555
"textEmbedderNumTokens": {

src/Azure.AISearch.WebApp/Services/AzureCognitiveSearchConfigurationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private SearchIndexerSkillset GetDocumentsSearchIndexerSkillset(AppSettingsOverr
201201
var searchIndexerSkillType = GetSearchIndexerSkillType(settingsOverride);
202202
var skillset = new SearchIndexerSkillset(GetSkillsetName(indexName), Array.Empty<SearchIndexerSkill>());
203203

204-
if (string.Equals(searchIndexerSkillType, Constants.SearchIndexerSkillTypes.Integrated, StringComparison.InvariantCultureIgnoreCase))
204+
if (string.IsNullOrWhiteSpace(searchIndexerSkillType) || string.Equals(searchIndexerSkillType, Constants.SearchIndexerSkillTypes.Integrated, StringComparison.InvariantCultureIgnoreCase))
205205
{
206206
// Use integrated vectorization (no custom skills required).
207207
ArgumentNullException.ThrowIfNull(this.settings.OpenAIEndpoint);

0 commit comments

Comments
 (0)