neuralseek 1.0.1
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/LICENSE +201 -0
- package/README.md +206 -0
- package/docs/AnalyticsApi.md +59 -0
- package/docs/AnalyticsBody.md +6 -0
- package/docs/AnswerRatingsBody.md +7 -0
- package/docs/CategorizeApi.md +58 -0
- package/docs/CategorizeBody.md +6 -0
- package/docs/ChatCompletionsBody.md +9 -0
- package/docs/ChatcompletionsMessages.md +16 -0
- package/docs/ChatcompletionsTools.md +13 -0
- package/docs/ExtractBody.md +11 -0
- package/docs/ExtractEntitiesApi.md +58 -0
- package/docs/GuardrailsApi.md +109 -0
- package/docs/IdentifysingleBody.md +6 -0
- package/docs/InlineResponse200.md +6 -0
- package/docs/InlineResponse2001.md +8 -0
- package/docs/InlineResponse20010.md +6 -0
- package/docs/InlineResponse20011.md +9 -0
- package/docs/InlineResponse20012.md +7 -0
- package/docs/InlineResponse20013.md +6 -0
- package/docs/InlineResponse2002.md +10 -0
- package/docs/InlineResponse2002Render.md +9 -0
- package/docs/InlineResponse2003.md +6 -0
- package/docs/InlineResponse2003Data.md +10 -0
- package/docs/InlineResponse2004.md +10 -0
- package/docs/InlineResponse2004Choices.md +8 -0
- package/docs/InlineResponse2004Message.md +14 -0
- package/docs/InlineResponse2005.md +9 -0
- package/docs/InlineResponse2005TopIntents.md +7 -0
- package/docs/InlineResponse2006.md +9 -0
- package/docs/InlineResponse2006ExtractedEntities.md +6 -0
- package/docs/InlineResponse2007.md +12 -0
- package/docs/InlineResponse2007Translations.md +6 -0
- package/docs/InlineResponse2008.md +7 -0
- package/docs/InlineResponse2009.md +7 -0
- package/docs/KeysApi.md +99 -0
- package/docs/LogExternalAgentBody.md +11 -0
- package/docs/LogExternalAgentEntries.md +34 -0
- package/docs/LogsApi.md +110 -0
- package/docs/LogsBody.md +8 -0
- package/docs/MAIstroAgentRatingsApi.md +109 -0
- package/docs/MAIstroApi.md +367 -0
- package/docs/MaistroBatchBody.md +9 -0
- package/docs/MaistroBody.md +9 -0
- package/docs/MaistroOptions.md +20 -0
- package/docs/MaistroRateBody.md +9 -0
- package/docs/MaistroRatingsBody.md +7 -0
- package/docs/MaistroStreamBody.md +9 -0
- package/docs/MaistroStreamOptions.md +19 -0
- package/docs/PiiBody.md +6 -0
- package/docs/RateBody.md +8 -0
- package/docs/ScoreBody.md +7 -0
- package/docs/Seek.md +9 -0
- package/docs/SeekAnswerRatingsApi.md +109 -0
- package/docs/SeekApi.md +109 -0
- package/docs/SeekOptions.md +24 -0
- package/docs/SeekResponse.md +32 -0
- package/docs/SeekResponsePassages.md +11 -0
- package/docs/SeekResponseVariablesExpanded.md +7 -0
- package/docs/SeekStreamBody.md +9 -0
- package/docs/SeekStreamOptions.md +23 -0
- package/docs/SeekStreamOptionsLastTurn.md +7 -0
- package/docs/SeekStreamOptionsPersonalize.md +10 -0
- package/docs/SeekStreamParams.md +7 -0
- package/docs/SeekStreamUserSession.md +7 -0
- package/docs/SeekStreamUserSessionMetadata.md +6 -0
- package/docs/SeekStreamUserSessionSystem.md +6 -0
- package/docs/ServiceTestApi.md +46 -0
- package/docs/TestBody.md +6 -0
- package/docs/TestBody1.md +6 -0
- package/docs/TestQuestionsApi.md +107 -0
- package/docs/TrainBody.md +7 -0
- package/docs/TrainKBApi.md +58 -0
- package/docs/TranslateApi.md +259 -0
- package/docs/TranslateBody.md +11 -0
- package/docs/TranslateGlossaryBody.md +6 -0
- package/docs/TranslateGlossaryBody1.md +6 -0
- package/docs/UserDataApi.md +59 -0
- package/git_push.sh +52 -0
- package/mocha.opts +1 -0
- package/package.json +55 -0
- package/src/AnalyticsApi.js +82 -0
- package/src/ApiClient.js +585 -0
- package/src/CategorizeApi.js +87 -0
- package/src/ExtractEntitiesApi.js +87 -0
- package/src/GuardrailsApi.js +134 -0
- package/src/KeysApi.js +122 -0
- package/src/LogsApi.js +133 -0
- package/src/MAIstroAgentRatingsApi.js +134 -0
- package/src/MAIstroApi.js +366 -0
- package/src/SeekAnswerRatingsApi.js +134 -0
- package/src/SeekApi.js +136 -0
- package/src/ServiceTestApi.js +79 -0
- package/src/TestQuestionsApi.js +124 -0
- package/src/TrainKBApi.js +85 -0
- package/src/TranslateApi.js +277 -0
- package/src/UserDataApi.js +81 -0
- package/src/index.js +587 -0
- package/src/model/AnalyticsBody.js +54 -0
- package/src/model/AnswerRatingsBody.js +62 -0
- package/src/model/CategorizeBody.js +55 -0
- package/src/model/ChatCompletionsBody.js +80 -0
- package/src/model/ChatcompletionsMessages.js +92 -0
- package/src/model/ChatcompletionsTools.js +75 -0
- package/src/model/ExtractBody.js +94 -0
- package/src/model/IdentifysingleBody.js +55 -0
- package/src/model/InlineResponse200.js +56 -0
- package/src/model/InlineResponse2001.js +70 -0
- package/src/model/InlineResponse20010.js +54 -0
- package/src/model/InlineResponse20011.js +81 -0
- package/src/model/InlineResponse20012.js +60 -0
- package/src/model/InlineResponse20013.js +55 -0
- package/src/model/InlineResponse2002.js +88 -0
- package/src/model/InlineResponse2002Render.js +80 -0
- package/src/model/InlineResponse2003.js +56 -0
- package/src/model/InlineResponse2003Data.js +88 -0
- package/src/model/InlineResponse2004.js +86 -0
- package/src/model/InlineResponse2004Choices.js +70 -0
- package/src/model/InlineResponse2004Message.js +80 -0
- package/src/model/InlineResponse2005.js +80 -0
- package/src/model/InlineResponse2005TopIntents.js +64 -0
- package/src/model/InlineResponse2006.js +79 -0
- package/src/model/InlineResponse2006ExtractedEntities.js +55 -0
- package/src/model/InlineResponse2007.js +103 -0
- package/src/model/InlineResponse2007Translations.js +55 -0
- package/src/model/InlineResponse2008.js +63 -0
- package/src/model/InlineResponse2009.js +63 -0
- package/src/model/LogExternalAgentBody.js +104 -0
- package/src/model/LogExternalAgentEntries.js +195 -0
- package/src/model/LogsBody.js +73 -0
- package/src/model/MaistroBatchBody.js +81 -0
- package/src/model/MaistroBody.js +81 -0
- package/src/model/MaistroOptions.js +176 -0
- package/src/model/MaistroRateBody.js +78 -0
- package/src/model/MaistroRatingsBody.js +62 -0
- package/src/model/MaistroStreamBody.js +81 -0
- package/src/model/MaistroStreamOptions.js +167 -0
- package/src/model/PiiBody.js +55 -0
- package/src/model/RateBody.js +70 -0
- package/src/model/ScoreBody.js +63 -0
- package/src/model/Seek.js +82 -0
- package/src/model/SeekOptions.js +216 -0
- package/src/model/SeekResponse.js +281 -0
- package/src/model/SeekResponsePassages.js +99 -0
- package/src/model/SeekResponseVariablesExpanded.js +64 -0
- package/src/model/SeekStreamBody.js +82 -0
- package/src/model/SeekStreamOptions.js +207 -0
- package/src/model/SeekStreamOptionsLastTurn.js +64 -0
- package/src/model/SeekStreamOptionsPersonalize.js +91 -0
- package/src/model/SeekStreamParams.js +64 -0
- package/src/model/SeekStreamUserSession.js +63 -0
- package/src/model/SeekStreamUserSessionMetadata.js +55 -0
- package/src/model/SeekStreamUserSessionSystem.js +55 -0
- package/src/model/TestBody.js +53 -0
- package/src/model/TestBody1.js +55 -0
- package/src/model/TrainBody.js +63 -0
- package/src/model/TranslateBody.js +99 -0
- package/src/model/TranslateGlossaryBody.js +53 -0
- package/src/model/TranslateGlossaryBody1.js +54 -0
- package/test/api/AnalyticsApi.spec.js +60 -0
- package/test/api/CategorizeApi.spec.js +61 -0
- package/test/api/ExtractEntitiesApi.spec.js +61 -0
- package/test/api/GuardrailsApi.spec.js +85 -0
- package/test/api/KeysApi.spec.js +79 -0
- package/test/api/LogsApi.spec.js +88 -0
- package/test/api/MAIstroAgentRatingsApi.spec.js +79 -0
- package/test/api/MAIstroApi.spec.js +180 -0
- package/test/api/SeekAnswerRatingsApi.spec.js +79 -0
- package/test/api/SeekApi.spec.js +81 -0
- package/test/api/ServiceTestApi.spec.js +59 -0
- package/test/api/TestQuestionsApi.spec.js +78 -0
- package/test/api/TrainKBApi.spec.js +59 -0
- package/test/api/TranslateApi.spec.js +143 -0
- package/test/api/UserDataApi.spec.js +60 -0
- package/test/assert-equals.js +81 -0
- package/test/model/AnalyticsBody.spec.js +52 -0
- package/test/model/AnswerRatingsBody.spec.js +58 -0
- package/test/model/CategorizeBody.spec.js +52 -0
- package/test/model/ChatCompletionsBody.spec.js +70 -0
- package/test/model/ChatcompletionsMessages.spec.js +58 -0
- package/test/model/ChatcompletionsTools.spec.js +58 -0
- package/test/model/ExtractBody.spec.js +82 -0
- package/test/model/IdentifysingleBody.spec.js +52 -0
- package/test/model/InlineResponse200.spec.js +52 -0
- package/test/model/InlineResponse2001.spec.js +64 -0
- package/test/model/InlineResponse20010.spec.js +52 -0
- package/test/model/InlineResponse20011.spec.js +70 -0
- package/test/model/InlineResponse20012.spec.js +58 -0
- package/test/model/InlineResponse20013.spec.js +52 -0
- package/test/model/InlineResponse2002.spec.js +76 -0
- package/test/model/InlineResponse2002Render.spec.js +70 -0
- package/test/model/InlineResponse2003.spec.js +52 -0
- package/test/model/InlineResponse2003Data.spec.js +76 -0
- package/test/model/InlineResponse2004.spec.js +76 -0
- package/test/model/InlineResponse2004Choices.spec.js +64 -0
- package/test/model/InlineResponse2004Message.spec.js +58 -0
- package/test/model/InlineResponse2005.spec.js +70 -0
- package/test/model/InlineResponse2005TopIntents.spec.js +58 -0
- package/test/model/InlineResponse2006.spec.js +70 -0
- package/test/model/InlineResponse2006ExtractedEntities.spec.js +52 -0
- package/test/model/InlineResponse2007.spec.js +88 -0
- package/test/model/InlineResponse2007Translations.spec.js +52 -0
- package/test/model/InlineResponse2008.spec.js +58 -0
- package/test/model/InlineResponse2009.spec.js +58 -0
- package/test/model/LogExternalAgentBody.spec.js +82 -0
- package/test/model/LogExternalAgentEntries.spec.js +118 -0
- package/test/model/LogsBody.spec.js +64 -0
- package/test/model/MaistroBatchBody.spec.js +70 -0
- package/test/model/MaistroBody.spec.js +70 -0
- package/test/model/MaistroOptions.spec.js +136 -0
- package/test/model/MaistroRateBody.spec.js +70 -0
- package/test/model/MaistroRatingsBody.spec.js +58 -0
- package/test/model/MaistroStreamBody.spec.js +70 -0
- package/test/model/MaistroStreamOptions.spec.js +130 -0
- package/test/model/PiiBody.spec.js +52 -0
- package/test/model/RateBody.spec.js +64 -0
- package/test/model/ScoreBody.spec.js +58 -0
- package/test/model/Seek.spec.js +70 -0
- package/test/model/SeekOptions.spec.js +160 -0
- package/test/model/SeekResponse.spec.js +208 -0
- package/test/model/SeekResponsePassages.spec.js +82 -0
- package/test/model/SeekResponseVariablesExpanded.spec.js +58 -0
- package/test/model/SeekStreamBody.spec.js +70 -0
- package/test/model/SeekStreamOptions.spec.js +154 -0
- package/test/model/SeekStreamOptionsLastTurn.spec.js +58 -0
- package/test/model/SeekStreamOptionsPersonalize.spec.js +76 -0
- package/test/model/SeekStreamParams.spec.js +58 -0
- package/test/model/SeekStreamUserSession.spec.js +58 -0
- package/test/model/SeekStreamUserSessionMetadata.spec.js +52 -0
- package/test/model/SeekStreamUserSessionSystem.spec.js +52 -0
- package/test/model/TestBody.spec.js +52 -0
- package/test/model/TestBody1.spec.js +52 -0
- package/test/model/TrainBody.spec.js +58 -0
- package/test/model/TranslateBody.spec.js +82 -0
- package/test/model/TranslateGlossaryBody.spec.js +52 -0
- package/test/model/TranslateGlossaryBody1.spec.js +52 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* NeuralSeek
|
|
3
|
+
* NeuralSeek - The business LLM accelerator
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0.1
|
|
6
|
+
* Contact: support@NeuralSeek.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
*
|
|
11
|
+
* Swagger Codegen version: 3.0.78
|
|
12
|
+
*
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
import ApiClient from "../ApiClient";
|
|
17
|
+
import ChatCompletionsBody from '../model/ChatCompletionsBody';
|
|
18
|
+
import InlineResponse2002 from '../model/InlineResponse2002';
|
|
19
|
+
import InlineResponse2003 from '../model/InlineResponse2003';
|
|
20
|
+
import InlineResponse2004 from '../model/InlineResponse2004';
|
|
21
|
+
import MaistroBatchBody from '../model/MaistroBatchBody';
|
|
22
|
+
import MaistroBody from '../model/MaistroBody';
|
|
23
|
+
import MaistroStreamBody from '../model/MaistroStreamBody';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* MAIstro service.
|
|
27
|
+
* @module MAIstroApi
|
|
28
|
+
* @version 1.0.1
|
|
29
|
+
*/
|
|
30
|
+
export default class MAIstroApi {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new MAIstroApi.
|
|
34
|
+
* @alias module:MAIstroApi
|
|
35
|
+
* @class
|
|
36
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
37
|
+
* default to {@link module:ApiClient#instanc
|
|
38
|
+
e} if unspecified.
|
|
39
|
+
*/
|
|
40
|
+
constructor(apiClient) {
|
|
41
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Callback function to receive the result of the chat operation.
|
|
46
|
+
* @callback moduleMAIstroApi~chatCallback
|
|
47
|
+
* @param {String} error Error message, if any.
|
|
48
|
+
* @param {module:model/InlineResponse2004{ data The data returned by the service call.
|
|
49
|
+
* @param {String} response The complete HTTP response.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Chat Completions - compatible mAIStro endpoint
|
|
54
|
+
* Call a mAIstro agent using the openAI chat completions schema.
|
|
55
|
+
* @param {Object} opts Optional parameters
|
|
56
|
+
* @param {module:model/ChatCompletionsBody} opts.body
|
|
57
|
+
* @param {String} opts.runid Optional header to specify the run ID
|
|
58
|
+
* @param {module:MAIstroApi~chatCallback} callback The callback function, accepting three arguments: error, data, response
|
|
59
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
60
|
+
*/
|
|
61
|
+
chat(opts, callback) {
|
|
62
|
+
opts = opts || {};
|
|
63
|
+
let postBody = opts['body'];
|
|
64
|
+
|
|
65
|
+
let pathParams = {
|
|
66
|
+
|
|
67
|
+
};
|
|
68
|
+
let queryParams = {
|
|
69
|
+
|
|
70
|
+
};
|
|
71
|
+
let headerParams = {
|
|
72
|
+
'runid': opts['runid']
|
|
73
|
+
};
|
|
74
|
+
let formParams = {
|
|
75
|
+
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
let authNames = ['apiKey'];
|
|
79
|
+
let contentTypes = ['application/json'];
|
|
80
|
+
let accepts = ['application/json', 'text/event-stream'];
|
|
81
|
+
let returnType = InlineResponse2004;
|
|
82
|
+
|
|
83
|
+
return this.apiClient.callApi(
|
|
84
|
+
'/chat/completions', 'POST',
|
|
85
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
86
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Callback function to receive the result of the maistro operation.
|
|
91
|
+
* @callback moduleMAIstroApi~maistroCallback
|
|
92
|
+
* @param {String} error Error message, if any.
|
|
93
|
+
* @param {module:model/InlineResponse2002{ data The data returned by the service call.
|
|
94
|
+
* @param {String} response The complete HTTP response.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Run mAistro NTL or agent
|
|
99
|
+
* Freeform prompting using NeuralSeek Template Language or a saved agent
|
|
100
|
+
* @param {module:model/MaistroBody} body The request object.
|
|
101
|
+
* @param {Object} opts Optional parameters
|
|
102
|
+
* @param {String} opts.overrideschema Find variables based on post body. Return all variables as the base presponse body, overriding the normal NS schema. All POST options will be ignored. Set this to a string value of 'true' to activate
|
|
103
|
+
* @param {String} opts.overrideagent If using overrideSchema you must pass your agent name here. All other POST options will be ignored.
|
|
104
|
+
* @param {String} opts.debug Include NS debug information in a field named 'neuralseek'. Set this to a string value of 'true' to activate
|
|
105
|
+
* @param {module:MAIstroApi~maistroCallback} callback The callback function, accepting three arguments: error, data, response
|
|
106
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
107
|
+
*/
|
|
108
|
+
maistro(body, opts, callback) {
|
|
109
|
+
opts = opts || {};
|
|
110
|
+
let postBody = body;
|
|
111
|
+
// verify the required parameter 'body' is set
|
|
112
|
+
if (body === undefined || body === null) {
|
|
113
|
+
throw new Error("Missing the required parameter 'body' when calling maistro");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
let pathParams = {
|
|
117
|
+
|
|
118
|
+
};
|
|
119
|
+
let queryParams = {
|
|
120
|
+
'overrideschema': opts['overrideschema'],'overrideagent': opts['overrideagent'],'debug': opts['debug']
|
|
121
|
+
};
|
|
122
|
+
let headerParams = {
|
|
123
|
+
|
|
124
|
+
};
|
|
125
|
+
let formParams = {
|
|
126
|
+
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
let authNames = ['apiKey'];
|
|
130
|
+
let contentTypes = ['application/json'];
|
|
131
|
+
let accepts = ['application/json'];
|
|
132
|
+
let returnType = InlineResponse2002;
|
|
133
|
+
|
|
134
|
+
return this.apiClient.callApi(
|
|
135
|
+
'/maistro', 'POST',
|
|
136
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
137
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Callback function to receive the result of the maistroAgentGet operation.
|
|
142
|
+
* @callback moduleMAIstroApi~maistroAgentGetCallback
|
|
143
|
+
* @param {String} error Error message, if any.
|
|
144
|
+
* @param {module:model/InlineResponse2002{ data The data returned by the service call.
|
|
145
|
+
* @param {String} response The complete HTTP response.
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Run a mAIstro agent via GET
|
|
150
|
+
* Run a mAIstro agent via GET
|
|
151
|
+
* @param {String} agent The saved mAIstro agent to run
|
|
152
|
+
* @param {Object} opts Optional parameters
|
|
153
|
+
* @param {String} opts.params Pass your mAIstro params as query parameters in simple name=value format
|
|
154
|
+
* @param {module:MAIstroApi~maistroAgentGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
155
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
156
|
+
*/
|
|
157
|
+
maistroAgentGet(agent, opts, callback) {
|
|
158
|
+
opts = opts || {};
|
|
159
|
+
let postBody = null;
|
|
160
|
+
// verify the required parameter 'agent' is set
|
|
161
|
+
if (agent === undefined || agent === null) {
|
|
162
|
+
throw new Error("Missing the required parameter 'agent' when calling maistroAgentGet");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
let pathParams = {
|
|
166
|
+
'agent': agent
|
|
167
|
+
};
|
|
168
|
+
let queryParams = {
|
|
169
|
+
'params': opts['params']
|
|
170
|
+
};
|
|
171
|
+
let headerParams = {
|
|
172
|
+
|
|
173
|
+
};
|
|
174
|
+
let formParams = {
|
|
175
|
+
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
let authNames = ['apiKey'];
|
|
179
|
+
let contentTypes = [];
|
|
180
|
+
let accepts = ['application/json'];
|
|
181
|
+
let returnType = InlineResponse2002;
|
|
182
|
+
|
|
183
|
+
return this.apiClient.callApi(
|
|
184
|
+
'/maistro/{agent}', 'GET',
|
|
185
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
186
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Callback function to receive the result of the maistroBatch operation.
|
|
191
|
+
* @callback moduleMAIstroApi~maistroBatchCallback
|
|
192
|
+
* @param {String} error Error message, if any.
|
|
193
|
+
* @param data This operation does not return a value.
|
|
194
|
+
* @param {String} response The complete HTTP response.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Call mAIstro NTL or an agent via batch
|
|
199
|
+
* Freeform prompting using NeuralSeek Template Language or a saved agent run in batch mode
|
|
200
|
+
* @param {module:model/MaistroBatchBody} body The request object.
|
|
201
|
+
* @param {module:MAIstroApi~maistroBatchCallback} callback The callback function, accepting three arguments: error, data, response
|
|
202
|
+
*/
|
|
203
|
+
maistroBatch(body, callback) {
|
|
204
|
+
|
|
205
|
+
let postBody = body;
|
|
206
|
+
// verify the required parameter 'body' is set
|
|
207
|
+
if (body === undefined || body === null) {
|
|
208
|
+
throw new Error("Missing the required parameter 'body' when calling maistroBatch");
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let pathParams = {
|
|
212
|
+
|
|
213
|
+
};
|
|
214
|
+
let queryParams = {
|
|
215
|
+
|
|
216
|
+
};
|
|
217
|
+
let headerParams = {
|
|
218
|
+
|
|
219
|
+
};
|
|
220
|
+
let formParams = {
|
|
221
|
+
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
let authNames = ['apiKey'];
|
|
225
|
+
let contentTypes = ['application/json'];
|
|
226
|
+
let accepts = [];
|
|
227
|
+
let returnType = null;
|
|
228
|
+
|
|
229
|
+
return this.apiClient.callApi(
|
|
230
|
+
'/maistro_batch', 'POST',
|
|
231
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
232
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Callback function to receive the result of the maistroBatchDelete operation.
|
|
237
|
+
* @callback moduleMAIstroApi~maistroBatchDeleteCallback
|
|
238
|
+
* @param {String} error Error message, if any.
|
|
239
|
+
* @param data This operation does not return a value.
|
|
240
|
+
* @param {String} response The complete HTTP response.
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Cancel current mAIstro batch run
|
|
245
|
+
* Cancel current mAIstro batch run
|
|
246
|
+
* @param {module:MAIstroApi~maistroBatchDeleteCallback} callback The callback function, accepting three arguments: error, data, response
|
|
247
|
+
*/
|
|
248
|
+
maistroBatchDelete(callback) {
|
|
249
|
+
|
|
250
|
+
let postBody = null;
|
|
251
|
+
|
|
252
|
+
let pathParams = {
|
|
253
|
+
|
|
254
|
+
};
|
|
255
|
+
let queryParams = {
|
|
256
|
+
|
|
257
|
+
};
|
|
258
|
+
let headerParams = {
|
|
259
|
+
|
|
260
|
+
};
|
|
261
|
+
let formParams = {
|
|
262
|
+
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
let authNames = ['apiKey'];
|
|
266
|
+
let contentTypes = [];
|
|
267
|
+
let accepts = [];
|
|
268
|
+
let returnType = null;
|
|
269
|
+
|
|
270
|
+
return this.apiClient.callApi(
|
|
271
|
+
'/maistro_batch', 'DELETE',
|
|
272
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
273
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Callback function to receive the result of the maistroBatchGet operation.
|
|
278
|
+
* @callback moduleMAIstroApi~maistroBatchGetCallback
|
|
279
|
+
* @param {String} error Error message, if any.
|
|
280
|
+
* @param {module:model/InlineResponse2002{ data The data returned by the service call.
|
|
281
|
+
* @param {String} response The complete HTTP response.
|
|
282
|
+
*/
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Get mAIstro batch results
|
|
286
|
+
* Retrieve results from a mAIstro batch run
|
|
287
|
+
* @param {module:MAIstroApi~maistroBatchGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
288
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
289
|
+
*/
|
|
290
|
+
maistroBatchGet(callback) {
|
|
291
|
+
|
|
292
|
+
let postBody = null;
|
|
293
|
+
|
|
294
|
+
let pathParams = {
|
|
295
|
+
|
|
296
|
+
};
|
|
297
|
+
let queryParams = {
|
|
298
|
+
|
|
299
|
+
};
|
|
300
|
+
let headerParams = {
|
|
301
|
+
|
|
302
|
+
};
|
|
303
|
+
let formParams = {
|
|
304
|
+
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
let authNames = ['apiKey'];
|
|
308
|
+
let contentTypes = [];
|
|
309
|
+
let accepts = ['application/json'];
|
|
310
|
+
let returnType = InlineResponse2002;
|
|
311
|
+
|
|
312
|
+
return this.apiClient.callApi(
|
|
313
|
+
'/maistro_batch', 'GET',
|
|
314
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
315
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Callback function to receive the result of the maistroStream operation.
|
|
320
|
+
* @callback moduleMAIstroApi~maistroStreamCallback
|
|
321
|
+
* @param {String} error Error message, if any.
|
|
322
|
+
* @param {module:model/InlineResponse2003{ data The data returned by the service call.
|
|
323
|
+
* @param {String} response The complete HTTP response.
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Stream mAIstro NTL or an agent
|
|
328
|
+
* Freeform prompting using NeuralSeek Template Language or a saved agent
|
|
329
|
+
* @param {module:model/MaistroStreamBody} body The request object.
|
|
330
|
+
* @param {module:MAIstroApi~maistroStreamCallback} callback The callback function, accepting three arguments: error, data, response
|
|
331
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
332
|
+
*/
|
|
333
|
+
maistroStream(body, callback) {
|
|
334
|
+
|
|
335
|
+
let postBody = body;
|
|
336
|
+
// verify the required parameter 'body' is set
|
|
337
|
+
if (body === undefined || body === null) {
|
|
338
|
+
throw new Error("Missing the required parameter 'body' when calling maistroStream");
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
let pathParams = {
|
|
342
|
+
|
|
343
|
+
};
|
|
344
|
+
let queryParams = {
|
|
345
|
+
|
|
346
|
+
};
|
|
347
|
+
let headerParams = {
|
|
348
|
+
|
|
349
|
+
};
|
|
350
|
+
let formParams = {
|
|
351
|
+
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
let authNames = ['apiKey'];
|
|
355
|
+
let contentTypes = ['application/json'];
|
|
356
|
+
let accepts = ['text/event-stream'];
|
|
357
|
+
let returnType = InlineResponse2003;
|
|
358
|
+
|
|
359
|
+
return this.apiClient.callApi(
|
|
360
|
+
'/maistro_stream', 'POST',
|
|
361
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
362
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* NeuralSeek
|
|
3
|
+
* NeuralSeek - The business LLM accelerator
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0.1
|
|
6
|
+
* Contact: support@NeuralSeek.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
*
|
|
11
|
+
* Swagger Codegen version: 3.0.78
|
|
12
|
+
*
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
import ApiClient from "../ApiClient";
|
|
17
|
+
import AnswerRatingsBody from '../model/AnswerRatingsBody';
|
|
18
|
+
import InlineResponse2001 from '../model/InlineResponse2001';
|
|
19
|
+
import RateBody from '../model/RateBody';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* SeekAnswerRatings service.
|
|
23
|
+
* @module SeekAnswerRatingsApi
|
|
24
|
+
* @version 1.0.1
|
|
25
|
+
*/
|
|
26
|
+
export default class SeekAnswerRatingsApi {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new SeekAnswerRatingsApi.
|
|
30
|
+
* @alias module:SeekAnswerRatingsApi
|
|
31
|
+
* @class
|
|
32
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
33
|
+
* default to {@link module:ApiClient#instanc
|
|
34
|
+
e} if unspecified.
|
|
35
|
+
*/
|
|
36
|
+
constructor(apiClient) {
|
|
37
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Callback function to receive the result of the answerRatings operation.
|
|
42
|
+
* @callback moduleSeekAnswerRatingsApi~answerRatingsCallback
|
|
43
|
+
* @param {String} error Error message, if any.
|
|
44
|
+
* @param {module:model/InlineResponse2001{ data The data returned by the service call.
|
|
45
|
+
* @param {String} response The complete HTTP response.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the average user ratings for an answer
|
|
50
|
+
* Get the average user ratings for an answer
|
|
51
|
+
* @param {module:model/AnswerRatingsBody} body The request object.
|
|
52
|
+
* @param {module:SeekAnswerRatingsApi~answerRatingsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
53
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
54
|
+
*/
|
|
55
|
+
answerRatings(body, callback) {
|
|
56
|
+
|
|
57
|
+
let postBody = body;
|
|
58
|
+
// verify the required parameter 'body' is set
|
|
59
|
+
if (body === undefined || body === null) {
|
|
60
|
+
throw new Error("Missing the required parameter 'body' when calling answerRatings");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let pathParams = {
|
|
64
|
+
|
|
65
|
+
};
|
|
66
|
+
let queryParams = {
|
|
67
|
+
|
|
68
|
+
};
|
|
69
|
+
let headerParams = {
|
|
70
|
+
|
|
71
|
+
};
|
|
72
|
+
let formParams = {
|
|
73
|
+
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
let authNames = ['apiKey'];
|
|
77
|
+
let contentTypes = ['application/json'];
|
|
78
|
+
let accepts = ['application/json'];
|
|
79
|
+
let returnType = InlineResponse2001;
|
|
80
|
+
|
|
81
|
+
return this.apiClient.callApi(
|
|
82
|
+
'/answerRatings', 'POST',
|
|
83
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
84
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Callback function to receive the result of the rate operation.
|
|
89
|
+
* @callback moduleSeekAnswerRatingsApi~rateCallback
|
|
90
|
+
* @param {String} error Error message, if any.
|
|
91
|
+
* @param data This operation does not return a value.
|
|
92
|
+
* @param {String} response The complete HTTP response.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Rate an answer
|
|
97
|
+
* Allow users to give feedback in on answers generated
|
|
98
|
+
* @param {module:model/RateBody} body The request object.
|
|
99
|
+
* @param {module:SeekAnswerRatingsApi~rateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
100
|
+
*/
|
|
101
|
+
rate(body, callback) {
|
|
102
|
+
|
|
103
|
+
let postBody = body;
|
|
104
|
+
// verify the required parameter 'body' is set
|
|
105
|
+
if (body === undefined || body === null) {
|
|
106
|
+
throw new Error("Missing the required parameter 'body' when calling rate");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let pathParams = {
|
|
110
|
+
|
|
111
|
+
};
|
|
112
|
+
let queryParams = {
|
|
113
|
+
|
|
114
|
+
};
|
|
115
|
+
let headerParams = {
|
|
116
|
+
|
|
117
|
+
};
|
|
118
|
+
let formParams = {
|
|
119
|
+
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
let authNames = ['apiKey'];
|
|
123
|
+
let contentTypes = ['application/json'];
|
|
124
|
+
let accepts = [];
|
|
125
|
+
let returnType = null;
|
|
126
|
+
|
|
127
|
+
return this.apiClient.callApi(
|
|
128
|
+
'/rate', 'POST',
|
|
129
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
130
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
package/src/SeekApi.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* NeuralSeek
|
|
3
|
+
* NeuralSeek - The business LLM accelerator
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0.1
|
|
6
|
+
* Contact: support@NeuralSeek.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
*
|
|
11
|
+
* Swagger Codegen version: 3.0.78
|
|
12
|
+
*
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
import ApiClient from "../ApiClient";
|
|
17
|
+
import InlineResponse200 from '../model/InlineResponse200';
|
|
18
|
+
import Seek from '../model/Seek';
|
|
19
|
+
import SeekResponse from '../model/SeekResponse';
|
|
20
|
+
import SeekStreamBody from '../model/SeekStreamBody';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Seek service.
|
|
24
|
+
* @module SeekApi
|
|
25
|
+
* @version 1.0.1
|
|
26
|
+
*/
|
|
27
|
+
export default class SeekApi {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new SeekApi.
|
|
31
|
+
* @alias module:SeekApi
|
|
32
|
+
* @class
|
|
33
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
34
|
+
* default to {@link module:ApiClient#instanc
|
|
35
|
+
e} if unspecified.
|
|
36
|
+
*/
|
|
37
|
+
constructor(apiClient) {
|
|
38
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Callback function to receive the result of the seek operation.
|
|
43
|
+
* @callback moduleSeekApi~seekCallback
|
|
44
|
+
* @param {String} error Error message, if any.
|
|
45
|
+
* @param {module:model/SeekResponse{ data The data returned by the service call.
|
|
46
|
+
* @param {String} response The complete HTTP response.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Seek an answer from NeuralSeek
|
|
51
|
+
* This endpoint takes an input object with a user question, context and options and returns a response object
|
|
52
|
+
* @param {module:model/Seek} body The request object. Must include the question and a context.
|
|
53
|
+
* @param {module:SeekApi~seekCallback} callback The callback function, accepting three arguments: error, data, response
|
|
54
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
55
|
+
*/
|
|
56
|
+
seek(body, callback) {
|
|
57
|
+
|
|
58
|
+
let postBody = body;
|
|
59
|
+
// verify the required parameter 'body' is set
|
|
60
|
+
if (body === undefined || body === null) {
|
|
61
|
+
throw new Error("Missing the required parameter 'body' when calling seek");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let pathParams = {
|
|
65
|
+
|
|
66
|
+
};
|
|
67
|
+
let queryParams = {
|
|
68
|
+
|
|
69
|
+
};
|
|
70
|
+
let headerParams = {
|
|
71
|
+
|
|
72
|
+
};
|
|
73
|
+
let formParams = {
|
|
74
|
+
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
let authNames = ['apiKey'];
|
|
78
|
+
let contentTypes = ['application/json'];
|
|
79
|
+
let accepts = ['application/json'];
|
|
80
|
+
let returnType = SeekResponse;
|
|
81
|
+
|
|
82
|
+
return this.apiClient.callApi(
|
|
83
|
+
'/seek', 'POST',
|
|
84
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
85
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Callback function to receive the result of the seekStream operation.
|
|
90
|
+
* @callback moduleSeekApi~seekStreamCallback
|
|
91
|
+
* @param {String} error Error message, if any.
|
|
92
|
+
* @param {module:model/InlineResponse200{ data The data returned by the service call.
|
|
93
|
+
* @param {String} response The complete HTTP response.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Stream a Seek an answer from NeuralSeek
|
|
98
|
+
* This endpoint takes an input object with a user question, context and options and returns a response object
|
|
99
|
+
* @param {module:model/SeekStreamBody} body The request object. Must include the question and a context.
|
|
100
|
+
* @param {module:SeekApi~seekStreamCallback} callback The callback function, accepting three arguments: error, data, response
|
|
101
|
+
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
|
102
|
+
*/
|
|
103
|
+
seekStream(body, callback) {
|
|
104
|
+
|
|
105
|
+
let postBody = body;
|
|
106
|
+
// verify the required parameter 'body' is set
|
|
107
|
+
if (body === undefined || body === null) {
|
|
108
|
+
throw new Error("Missing the required parameter 'body' when calling seekStream");
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let pathParams = {
|
|
112
|
+
|
|
113
|
+
};
|
|
114
|
+
let queryParams = {
|
|
115
|
+
|
|
116
|
+
};
|
|
117
|
+
let headerParams = {
|
|
118
|
+
|
|
119
|
+
};
|
|
120
|
+
let formParams = {
|
|
121
|
+
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
let authNames = ['apiKey'];
|
|
125
|
+
let contentTypes = ['application/json'];
|
|
126
|
+
let accepts = ['text/event-stream'];
|
|
127
|
+
let returnType = InlineResponse200;
|
|
128
|
+
|
|
129
|
+
return this.apiClient.callApi(
|
|
130
|
+
'/seek_stream', 'POST',
|
|
131
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
132
|
+
authNames, contentTypes, accepts, returnType, callback
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|