Skip to content

armgit / storm

Public Imported from GitHub
0

An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.

azure ai search scoped imports included

[email protected]da52da2620b0
diff --git a/knowledge_storm/rm.py b/knowledge_storm/rm.py
index 00bb3cb..624d248 100644
--- a/knowledge_storm/rm.py
+++ b/knowledge_storm/rm.py
@@ -1187,6 +1187,13 @@ class AzureAISearch(dspy.Retrieve):
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)