Skip to content

Commit

Permalink
azure ai search scoped imports included
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick@cryptolock.ai committed Oct 16, 2024
1 parent 3922a84 commit da52da2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions knowledge_storm/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,13 @@ def forward(
Returns:
a list of Dicts, each dict has keys of 'description', 'snippets' (list of strings), 'title', 'url'
"""
try:
from azure.core.credentials import AzureKeyCredential
from azure.search.documents import SearchClient
except ImportError as err:
raise ImportError(
"AzureAISearch requires `pip install azure-search-documents`."
) from err
queries = (
[query_or_queries]
if isinstance(query_or_queries, str)
Expand Down

0 comments on commit da52da2

Please sign in to comment.