@@ -49,6 +49,16 @@ def _get_training_data_config(
49
49
"kind" : "blob" ,
50
50
"prefix" : storage_container_path_prefix ,
51
51
}
52
+
53
+ def _get_pro_mode_reference_docs_config (
54
+ self , storage_container_sas_url , storage_container_path_prefix
55
+ ):
56
+ return {
57
+ "kind" : "reference" ,
58
+ "containerUrl" : storage_container_sas_url ,
59
+ "prefix" : storage_container_path_prefix ,
60
+ "fileListPath" : "sources.jsonl" ,
61
+ }
52
62
53
63
def _get_headers (self , subscription_key , api_token , x_ms_useragent ):
54
64
"""Returns the headers for the HTTP requests.
@@ -116,6 +126,8 @@ def begin_create_analyzer(
116
126
analyzer_template_path : str = "" ,
117
127
training_storage_container_sas_url : str = "" ,
118
128
training_storage_container_path_prefix : str = "" ,
129
+ pro_mode_reference_docs_storage_container_sas_url : str = "" ,
130
+ pro_mode_reference_docs_storage_container_path_prefix : str = "" ,
119
131
):
120
132
"""
121
133
Initiates the creation of an analyzer with the given ID and schema.
@@ -150,6 +162,15 @@ def begin_create_analyzer(
150
162
training_storage_container_path_prefix ,
151
163
)
152
164
165
+ if (
166
+ pro_mode_reference_docs_storage_container_sas_url
167
+ and pro_mode_reference_docs_storage_container_path_prefix
168
+ ): # noqa
169
+ analyzer_template ["knowledgeSources" ] = self ._get_pro_mode_reference_docs_config (
170
+ pro_mode_reference_docs_storage_container_sas_url ,
171
+ pro_mode_reference_docs_storage_container_path_prefix ,
172
+ )
173
+
153
174
headers = {"Content-Type" : "application/json" }
154
175
headers .update (self ._headers )
155
176
0 commit comments