Closed nachiketlanjewar-acc closed 4 months ago
if semantic_configurations:
if not isinstance(semantic_configurations, list):
semantic_configurations = [semantic_configurations]
semantic_search = SemanticSearch(
configurations=semantic_configurations,
default_configuration_name=semantic_configuration_name,
)
elif semantic_configuration_name:
# use default semantic configuration
semantic_configuration = SemanticConfiguration(
name=semantic_configuration_name,
prioritized_fields=SemanticPrioritizedFields(
content_fields=[SemanticField(field_name=FIELDS_CONTENT)],
),
)
semantic_search = SemanticSearch(configurations=[semantic_configuration])
else:
# Don't use semantic search
semantic_search = None
This is the updated code of the latest branch. Please update your langchain_community
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
There is no error but semantic configuration is not created for index.
Description
Semantic configuration is not created for Azure AI Search index using Langchain community if both semantic config name and semantic configuration is provided.
When I checked in AzureSearch.py, I found below snippet which creates the semantic configuration.
if you observe, it create semantic config if semantic configuration is None and semantic configuration is not None only. else condition is not specified if both configuration and configuration name is present.
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found: