@aj-archipelago/cortex 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -35,12 +35,14 @@ class OpenAIChatExtensionPlugin extends OpenAIChatPlugin {
|
|
|
35
35
|
getRequestParameters(text, parameters, prompt) {
|
|
36
36
|
const reqParams = super.getRequestParameters(text, parameters, prompt);
|
|
37
37
|
reqParams.dataSources = this.model.dataSources || reqParams.dataSources || []; // add dataSources to the request parameters
|
|
38
|
-
const {roleInformation, indexName } = parameters; // add roleInformation and indexName to the dataSource if given
|
|
38
|
+
const {roleInformation, indexName, semanticConfiguration } = parameters; // add roleInformation and indexName to the dataSource if given
|
|
39
39
|
for(const dataSource of reqParams.dataSources) {
|
|
40
40
|
if(!dataSource) continue;
|
|
41
41
|
if(!dataSource.parameters) dataSource.parameters = {};
|
|
42
42
|
roleInformation && (dataSource.parameters.roleInformation = roleInformation);
|
|
43
43
|
indexName && (dataSource.parameters.indexName = indexName);
|
|
44
|
+
semanticConfiguration && (dataSource.parameters.semanticConfiguration = semanticConfiguration);
|
|
45
|
+
dataSource.parameters.queryType = semanticConfiguration ? 'semantic' : 'simple';
|
|
44
46
|
}
|
|
45
47
|
return reqParams;
|
|
46
48
|
}
|