@memori.ai/memori-api-client 0.10.0 → 0.10.2
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/CHANGELOG.md +14 -0
- package/dist/engine/nlp.d.ts +0 -23
- package/dist/memori-api-client.cjs.development.js +0 -69
- package/dist/memori-api-client.cjs.development.js.map +1 -1
- package/dist/memori-api-client.cjs.production.min.js +1 -1
- package/dist/memori-api-client.cjs.production.min.js.map +1 -1
- package/dist/memori-api-client.esm.js +0 -69
- package/dist/memori-api-client.esm.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/engine/nlp.ts +0 -39
- package/src/types.ts +1 -0
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/engine/nlp.ts
CHANGED
|
@@ -113,43 +113,4 @@ export default (apiUrl: string) => ({
|
|
|
113
113
|
undefinedWords: string[];
|
|
114
114
|
}
|
|
115
115
|
>,
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Tries to suggest the answer for a question, using as much content as possible from the session's associated Memori object.
|
|
119
|
-
* @param {string} sessionId The session ID
|
|
120
|
-
* @param {string} text Text of the sentence.
|
|
121
|
-
*/
|
|
122
|
-
suggestAnswer: async (sessionId: string, text: string) =>
|
|
123
|
-
apiFetcher(`/SuggestAnswer/${sessionId}`, {
|
|
124
|
-
method: 'POST',
|
|
125
|
-
apiUrl,
|
|
126
|
-
body: { text },
|
|
127
|
-
}) as Promise<
|
|
128
|
-
ResponseSpec & {
|
|
129
|
-
/**
|
|
130
|
-
* Suggested answer. May be null if no answer could be suggested.
|
|
131
|
-
*/
|
|
132
|
-
answer: string;
|
|
133
|
-
}
|
|
134
|
-
>,
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Tries to suggest questions for an answer.
|
|
138
|
-
* Differently from ```SuggestAnswer```, no content from the session's associated Memori object is used.
|
|
139
|
-
* @param {string} sessionId The session ID
|
|
140
|
-
* @param {string} text Text of the sentence.
|
|
141
|
-
*/
|
|
142
|
-
suggestQuestions: async (sessionId: string, text: string) =>
|
|
143
|
-
apiFetcher(`/SuggestQuestions/${sessionId}`, {
|
|
144
|
-
method: 'POST',
|
|
145
|
-
apiUrl,
|
|
146
|
-
body: { text },
|
|
147
|
-
}) as Promise<
|
|
148
|
-
ResponseSpec & {
|
|
149
|
-
/**
|
|
150
|
-
* Suggested questions. May be null or empty if no questions could be suggested.
|
|
151
|
-
*/
|
|
152
|
-
questions: string[];
|
|
153
|
-
}
|
|
154
|
-
>,
|
|
155
116
|
});
|