@gleanwork/api-client 0.1.0-beta.2 → 0.1.0-beta.4
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/README.md +34 -28
- package/dist/commonjs/__tests__/chat.test.js +233 -414
- package/dist/commonjs/__tests__/chat.test.js.map +1 -1
- package/dist/commonjs/funcs/chatChatStream.d.ts +16 -0
- package/dist/commonjs/funcs/chatChatStream.d.ts.map +1 -0
- package/dist/commonjs/funcs/chatChatStream.js +121 -0
- package/dist/commonjs/funcs/chatChatStream.js.map +1 -0
- package/dist/commonjs/funcs/clientChatStart.d.ts +1 -1
- package/dist/commonjs/funcs/clientChatStart.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientChatStart.js +3 -3
- package/dist/commonjs/funcs/clientChatStart.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/operations/chatstream.d.ts +38 -0
- package/dist/commonjs/models/operations/chatstream.d.ts.map +1 -0
- package/dist/commonjs/models/operations/chatstream.js +81 -0
- package/dist/commonjs/models/operations/chatstream.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/chatChatStream.d.ts +24 -0
- package/dist/commonjs/react-query/chatChatStream.d.ts.map +1 -0
- package/dist/commonjs/react-query/chatChatStream.js +47 -0
- package/dist/commonjs/react-query/chatChatStream.js.map +1 -0
- package/dist/commonjs/react-query/clientChatStart.d.ts +1 -1
- package/dist/commonjs/react-query/clientChatStart.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/chat.d.ts +1 -57
- package/dist/commonjs/sdk/chat.d.ts.map +1 -1
- package/dist/commonjs/sdk/chat.js +3 -83
- package/dist/commonjs/sdk/chat.js.map +1 -1
- package/dist/commonjs/sdk/client.d.ts +2 -2
- package/dist/commonjs/sdk/client.d.ts.map +1 -1
- package/dist/commonjs/sdk/client.js +2 -2
- package/dist/commonjs/sdk/client.js.map +1 -1
- package/dist/commonjs/sdk/clientchat.d.ts +68 -0
- package/dist/commonjs/sdk/clientchat.d.ts.map +1 -0
- package/dist/commonjs/sdk/clientchat.js +102 -0
- package/dist/commonjs/sdk/clientchat.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/__tests__/chat.test.js +234 -415
- package/dist/esm/__tests__/chat.test.js.map +1 -1
- package/dist/esm/funcs/chatChatStream.d.ts +16 -0
- package/dist/esm/funcs/chatChatStream.d.ts.map +1 -0
- package/dist/esm/funcs/chatChatStream.js +85 -0
- package/dist/esm/funcs/chatChatStream.js.map +1 -0
- package/dist/esm/funcs/clientChatStart.d.ts +1 -1
- package/dist/esm/funcs/clientChatStart.d.ts.map +1 -1
- package/dist/esm/funcs/clientChatStart.js +3 -3
- package/dist/esm/funcs/clientChatStart.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/operations/chatstream.d.ts +38 -0
- package/dist/esm/models/operations/chatstream.d.ts.map +1 -0
- package/dist/esm/models/operations/chatstream.js +43 -0
- package/dist/esm/models/operations/chatstream.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/chatChatStream.d.ts +24 -0
- package/dist/esm/react-query/chatChatStream.d.ts.map +1 -0
- package/dist/esm/react-query/chatChatStream.js +42 -0
- package/dist/esm/react-query/chatChatStream.js.map +1 -0
- package/dist/esm/react-query/clientChatStart.d.ts +1 -1
- package/dist/esm/react-query/clientChatStart.d.ts.map +1 -1
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/chat.d.ts +1 -57
- package/dist/esm/sdk/chat.d.ts.map +1 -1
- package/dist/esm/sdk/chat.js +3 -83
- package/dist/esm/sdk/chat.js.map +1 -1
- package/dist/esm/sdk/client.d.ts +2 -2
- package/dist/esm/sdk/client.d.ts.map +1 -1
- package/dist/esm/sdk/client.js +2 -2
- package/dist/esm/sdk/client.js.map +1 -1
- package/dist/esm/sdk/clientchat.d.ts +68 -0
- package/dist/esm/sdk/clientchat.d.ts.map +1 -0
- package/dist/esm/sdk/clientchat.js +98 -0
- package/dist/esm/sdk/clientchat.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/chat/README.md +8 -768
- package/docs/sdks/clientchat/README.md +878 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/chat.test.ts +292 -457
- package/src/funcs/chatChatStream.ts +169 -0
- package/src/funcs/clientChatStart.ts +5 -6
- package/src/lib/config.ts +3 -3
- package/src/models/operations/chatstream.ts +86 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/chatChatStream.ts +91 -0
- package/src/react-query/clientChatStart.ts +1 -1
- package/src/react-query/index.ts +1 -0
- package/src/sdk/chat.ts +3 -159
- package/src/sdk/client.ts +4 -4
- package/src/sdk/clientchat.ts +185 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -2,12 +2,163 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { expect, test } from "vitest";
|
|
5
|
+
import { assert, expect, it, test } from "vitest";
|
|
6
6
|
import { Glean } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
it.skip("Chat Chat Default Example", async () => {
|
|
10
|
+
assert.fail(
|
|
11
|
+
"incomplete test found please make sure to address the following errors: [`workflow step chat-defaultExample.test referencing operation chat does not contain response body with content type text/plain`]",
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it.skip("Chat Chat Gpt Agent Example", async () => {
|
|
16
|
+
assert.fail(
|
|
17
|
+
"incomplete test found please make sure to address the following errors: [`workflow step chat-gptAgentExample.test referencing operation chat does not contain response body with content type text/plain`]",
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it.skip("Chat Chat Streaming Example", async () => {
|
|
22
|
+
assert.fail(
|
|
23
|
+
"incomplete test found please make sure to address the following errors: [`workflow step chat-streamingExample.test referencing operation chat does not contain response body with content type text/plain`]",
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it.skip("Chat Chat Update Response", async () => {
|
|
28
|
+
assert.fail(
|
|
29
|
+
"incomplete test found please make sure to address the following errors: [`workflow step chat-updateResponse.test referencing operation chat does not contain response body with content type text/plain`]",
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it.skip("Chat Chat Citation Response", async () => {
|
|
34
|
+
assert.fail(
|
|
35
|
+
"incomplete test found please make sure to address the following errors: [`workflow step chat-citationResponse.test referencing operation chat does not contain response body with content type text/plain`]",
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("Chat Deleteallchats", async () => {
|
|
40
|
+
const testHttpClient = createTestHTTPClient("deleteallchats");
|
|
41
|
+
|
|
42
|
+
const glean = new Glean({
|
|
43
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
44
|
+
httpClient: testHttpClient,
|
|
45
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
await glean.client.chat.deleteAll();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test("Chat Deletechats", async () => {
|
|
52
|
+
const testHttpClient = createTestHTTPClient("deletechats");
|
|
53
|
+
|
|
54
|
+
const glean = new Glean({
|
|
55
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
56
|
+
httpClient: testHttpClient,
|
|
57
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
await glean.client.chat.delete({
|
|
61
|
+
ids: [
|
|
62
|
+
"<value>",
|
|
63
|
+
"<value>",
|
|
64
|
+
],
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("Chat Getchat", async () => {
|
|
69
|
+
const testHttpClient = createTestHTTPClient("getchat");
|
|
70
|
+
|
|
71
|
+
const glean = new Glean({
|
|
72
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
73
|
+
httpClient: testHttpClient,
|
|
74
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const result = await glean.client.chat.get({
|
|
78
|
+
id: "<id>",
|
|
79
|
+
});
|
|
80
|
+
expect(result).toBeDefined();
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test("Chat Listchats", async () => {
|
|
84
|
+
const testHttpClient = createTestHTTPClient("listchats");
|
|
85
|
+
|
|
86
|
+
const glean = new Glean({
|
|
87
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
88
|
+
httpClient: testHttpClient,
|
|
89
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const result = await glean.client.chat.list();
|
|
93
|
+
expect(result).toBeDefined();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test("Chat Getchatapplication", async () => {
|
|
97
|
+
const testHttpClient = createTestHTTPClient("getchatapplication");
|
|
98
|
+
|
|
99
|
+
const glean = new Glean({
|
|
100
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
101
|
+
httpClient: testHttpClient,
|
|
102
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const result = await glean.client.chat.getApplication({
|
|
106
|
+
id: "<id>",
|
|
107
|
+
});
|
|
108
|
+
expect(result).toBeDefined();
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
test("Chat Uploadchatfiles", async () => {
|
|
112
|
+
const testHttpClient = createTestHTTPClient("uploadchatfiles");
|
|
113
|
+
|
|
114
|
+
const glean = new Glean({
|
|
115
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
116
|
+
httpClient: testHttpClient,
|
|
117
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const result = await glean.client.chat.uploadFiles({
|
|
121
|
+
files: [],
|
|
122
|
+
});
|
|
123
|
+
expect(result).toBeDefined();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("Chat Getchatfiles", async () => {
|
|
127
|
+
const testHttpClient = createTestHTTPClient("getchatfiles");
|
|
128
|
+
|
|
129
|
+
const glean = new Glean({
|
|
130
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
131
|
+
httpClient: testHttpClient,
|
|
132
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const result = await glean.client.chat.getFiles({
|
|
136
|
+
fileIds: [
|
|
137
|
+
"<value>",
|
|
138
|
+
"<value>",
|
|
139
|
+
],
|
|
140
|
+
});
|
|
141
|
+
expect(result).toBeDefined();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
test("Chat Deletechatfiles", async () => {
|
|
145
|
+
const testHttpClient = createTestHTTPClient("deletechatfiles");
|
|
146
|
+
|
|
147
|
+
const glean = new Glean({
|
|
148
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
149
|
+
httpClient: testHttpClient,
|
|
150
|
+
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
await glean.client.chat.deleteFiles({
|
|
154
|
+
fileIds: [
|
|
155
|
+
"<value>",
|
|
156
|
+
],
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test("Chat Chat Stream Default Example", async () => {
|
|
161
|
+
const testHttpClient = createTestHTTPClient("chatStream-defaultExample");
|
|
11
162
|
|
|
12
163
|
const glean = new Glean({
|
|
13
164
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
@@ -15,7 +166,7 @@ test("Chat Chat Default Example", async () => {
|
|
|
15
166
|
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
16
167
|
});
|
|
17
168
|
|
|
18
|
-
const result = await glean.
|
|
169
|
+
const result = await glean.chat.chatStream({
|
|
19
170
|
messages: [
|
|
20
171
|
{
|
|
21
172
|
fragments: [
|
|
@@ -29,8 +180,8 @@ test("Chat Chat Default Example", async () => {
|
|
|
29
180
|
expect(result).toBeDefined();
|
|
30
181
|
});
|
|
31
182
|
|
|
32
|
-
test("Chat Chat Gpt Agent Example", async () => {
|
|
33
|
-
const testHttpClient = createTestHTTPClient("
|
|
183
|
+
test("Chat Chat Stream Gpt Agent Example", async () => {
|
|
184
|
+
const testHttpClient = createTestHTTPClient("chatStream-gptAgentExample");
|
|
34
185
|
|
|
35
186
|
const glean = new Glean({
|
|
36
187
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
@@ -38,7 +189,7 @@ test("Chat Chat Gpt Agent Example", async () => {
|
|
|
38
189
|
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
39
190
|
});
|
|
40
191
|
|
|
41
|
-
const result = await glean.
|
|
192
|
+
const result = await glean.chat.chatStream({
|
|
42
193
|
messages: [
|
|
43
194
|
{
|
|
44
195
|
fragments: [
|
|
@@ -55,24 +206,8 @@ test("Chat Chat Gpt Agent Example", async () => {
|
|
|
55
206
|
expect(result).toBeDefined();
|
|
56
207
|
});
|
|
57
208
|
|
|
58
|
-
test("Chat Chat Streaming Example", async () => {
|
|
59
|
-
const testHttpClient = createTestHTTPClient("
|
|
60
|
-
|
|
61
|
-
const glean = new Glean({
|
|
62
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
63
|
-
httpClient: testHttpClient,
|
|
64
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const result = await glean.client.chat.start({
|
|
68
|
-
messages: [],
|
|
69
|
-
timeoutMillis: 30000,
|
|
70
|
-
});
|
|
71
|
-
expect(result).toBeDefined();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
test("Chat Chat Update Response", async () => {
|
|
75
|
-
const testHttpClient = createTestHTTPClient("chat-updateResponse");
|
|
209
|
+
test("Chat Chat Stream Streaming Example", async () => {
|
|
210
|
+
const testHttpClient = createTestHTTPClient("chatStream-streamingExample");
|
|
76
211
|
|
|
77
212
|
const glean = new Glean({
|
|
78
213
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
@@ -80,7 +215,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
80
215
|
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
81
216
|
});
|
|
82
217
|
|
|
83
|
-
const result = await glean.
|
|
218
|
+
const result = await glean.chat.chatStream({
|
|
84
219
|
messages: [
|
|
85
220
|
{
|
|
86
221
|
citations: [
|
|
@@ -121,7 +256,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
121
256
|
referenceRanges: [
|
|
122
257
|
{
|
|
123
258
|
textRange: {
|
|
124
|
-
startIndex:
|
|
259
|
+
startIndex: 862990,
|
|
125
260
|
document: {},
|
|
126
261
|
},
|
|
127
262
|
snippets: [
|
|
@@ -131,6 +266,14 @@ test("Chat Chat Update Response", async () => {
|
|
|
131
266
|
},
|
|
132
267
|
],
|
|
133
268
|
},
|
|
269
|
+
{
|
|
270
|
+
snippets: [
|
|
271
|
+
{
|
|
272
|
+
snippet: "snippet",
|
|
273
|
+
mimeType: "mimeType",
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
},
|
|
134
277
|
],
|
|
135
278
|
},
|
|
136
279
|
{
|
|
@@ -181,14 +324,6 @@ test("Chat Chat Update Response", async () => {
|
|
|
181
324
|
},
|
|
182
325
|
],
|
|
183
326
|
},
|
|
184
|
-
{
|
|
185
|
-
snippets: [
|
|
186
|
-
{
|
|
187
|
-
snippet: "snippet",
|
|
188
|
-
mimeType: "mimeType",
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
327
|
],
|
|
193
328
|
},
|
|
194
329
|
],
|
|
@@ -216,19 +351,12 @@ test("Chat Chat Update Response", async () => {
|
|
|
216
351
|
id: "<id>",
|
|
217
352
|
name: "<value>",
|
|
218
353
|
members: [],
|
|
354
|
+
customFields: [],
|
|
219
355
|
datasourceProfiles: [
|
|
220
356
|
{
|
|
221
357
|
datasource: "github",
|
|
222
358
|
handle: "<value>",
|
|
223
359
|
},
|
|
224
|
-
{
|
|
225
|
-
datasource: "github",
|
|
226
|
-
handle: "<value>",
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
datasource: "github",
|
|
230
|
-
handle: "<value>",
|
|
231
|
-
},
|
|
232
360
|
],
|
|
233
361
|
},
|
|
234
362
|
customEntity: {
|
|
@@ -265,7 +393,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
265
393
|
likes: {
|
|
266
394
|
likedBy: [],
|
|
267
395
|
likedByUser: false,
|
|
268
|
-
numLikes:
|
|
396
|
+
numLikes: 705667,
|
|
269
397
|
},
|
|
270
398
|
updatedBy: {
|
|
271
399
|
name: "George Clooney",
|
|
@@ -288,15 +416,14 @@ test("Chat Chat Update Response", async () => {
|
|
|
288
416
|
name: "George Clooney",
|
|
289
417
|
obfuscatedId: "abc123",
|
|
290
418
|
},
|
|
291
|
-
remindAt:
|
|
419
|
+
remindAt: 56070,
|
|
292
420
|
},
|
|
293
421
|
candidateVerifiers: [],
|
|
294
422
|
},
|
|
295
423
|
},
|
|
296
424
|
board: {
|
|
297
425
|
name: "<value>",
|
|
298
|
-
description:
|
|
299
|
-
"not meh surprisingly too like embed dreamily verbally casement with",
|
|
426
|
+
description: "till woefully fun",
|
|
300
427
|
audienceFilters: [
|
|
301
428
|
{
|
|
302
429
|
fieldName: "type",
|
|
@@ -312,7 +439,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
312
439
|
],
|
|
313
440
|
},
|
|
314
441
|
],
|
|
315
|
-
id:
|
|
442
|
+
id: 805126,
|
|
316
443
|
creator: {
|
|
317
444
|
name: "George Clooney",
|
|
318
445
|
obfuscatedId: "abc123",
|
|
@@ -334,7 +461,8 @@ test("Chat Chat Update Response", async () => {
|
|
|
334
461
|
},
|
|
335
462
|
collection: {
|
|
336
463
|
name: "<value>",
|
|
337
|
-
description:
|
|
464
|
+
description:
|
|
465
|
+
"gadzooks worth epic angrily softly inventory multicolored",
|
|
338
466
|
audienceFilters: [
|
|
339
467
|
{
|
|
340
468
|
fieldName: "type",
|
|
@@ -350,13 +478,12 @@ test("Chat Chat Update Response", async () => {
|
|
|
350
478
|
],
|
|
351
479
|
},
|
|
352
480
|
],
|
|
353
|
-
id:
|
|
354
|
-
children: [],
|
|
481
|
+
id: 719865,
|
|
355
482
|
},
|
|
356
483
|
answerBoard: {
|
|
357
484
|
name: "<value>",
|
|
358
485
|
description:
|
|
359
|
-
"
|
|
486
|
+
"gleaming ashamed joshingly tabulate sermon follower inferior circumference meh a",
|
|
360
487
|
audienceFilters: [
|
|
361
488
|
{
|
|
362
489
|
fieldName: "type",
|
|
@@ -372,7 +499,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
372
499
|
],
|
|
373
500
|
},
|
|
374
501
|
],
|
|
375
|
-
id:
|
|
502
|
+
id: 55438,
|
|
376
503
|
},
|
|
377
504
|
code: {
|
|
378
505
|
repoName: "scio",
|
|
@@ -402,49 +529,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
402
529
|
metadata: {
|
|
403
530
|
type: "RETRIEVAL",
|
|
404
531
|
name: "<value>",
|
|
405
|
-
displayName: "
|
|
406
|
-
displayDescription: "<value>",
|
|
407
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
408
|
-
},
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
structuredResults: [
|
|
413
|
-
{},
|
|
414
|
-
{},
|
|
415
|
-
{},
|
|
416
|
-
],
|
|
417
|
-
file: {
|
|
418
|
-
id: "FILE_1234",
|
|
419
|
-
url: "www.google.com",
|
|
420
|
-
name: "sample.pdf",
|
|
421
|
-
},
|
|
422
|
-
action: {
|
|
423
|
-
metadata: {
|
|
424
|
-
type: "RETRIEVAL",
|
|
425
|
-
name: "<value>",
|
|
426
|
-
displayName: "Bertha.Koepp",
|
|
427
|
-
displayDescription: "<value>",
|
|
428
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
structuredResults: [
|
|
434
|
-
{},
|
|
435
|
-
{},
|
|
436
|
-
{},
|
|
437
|
-
],
|
|
438
|
-
file: {
|
|
439
|
-
id: "FILE_1234",
|
|
440
|
-
url: "www.google.com",
|
|
441
|
-
name: "sample.pdf",
|
|
442
|
-
},
|
|
443
|
-
action: {
|
|
444
|
-
metadata: {
|
|
445
|
-
type: "ACTION",
|
|
446
|
-
name: "<value>",
|
|
447
|
-
displayName: "Sheridan.Koss71",
|
|
532
|
+
displayName: "Joannie36",
|
|
448
533
|
displayDescription: "<value>",
|
|
449
534
|
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
450
535
|
},
|
|
@@ -487,46 +572,31 @@ test("Chat Chat Update Response", async () => {
|
|
|
487
572
|
},
|
|
488
573
|
],
|
|
489
574
|
},
|
|
575
|
+
],
|
|
576
|
+
fragments: [
|
|
490
577
|
{
|
|
491
|
-
|
|
578
|
+
structuredResults: [
|
|
579
|
+
{},
|
|
580
|
+
{},
|
|
581
|
+
],
|
|
582
|
+
file: {
|
|
492
583
|
id: "FILE_1234",
|
|
493
584
|
url: "www.google.com",
|
|
494
585
|
name: "sample.pdf",
|
|
495
586
|
},
|
|
496
|
-
|
|
497
|
-
{
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
],
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
snippets: [
|
|
507
|
-
{
|
|
508
|
-
snippet: "snippet",
|
|
509
|
-
mimeType: "mimeType",
|
|
510
|
-
},
|
|
511
|
-
],
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
snippets: [
|
|
515
|
-
{
|
|
516
|
-
snippet: "snippet",
|
|
517
|
-
mimeType: "mimeType",
|
|
518
|
-
},
|
|
519
|
-
],
|
|
587
|
+
action: {
|
|
588
|
+
metadata: {
|
|
589
|
+
type: "ACTION",
|
|
590
|
+
name: "<value>",
|
|
591
|
+
displayName: "Floyd_Hammes29",
|
|
592
|
+
displayDescription: "<value>",
|
|
593
|
+
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
520
594
|
},
|
|
521
|
-
|
|
595
|
+
},
|
|
522
596
|
},
|
|
523
|
-
],
|
|
524
|
-
fragments: [
|
|
525
597
|
{
|
|
526
598
|
structuredResults: [
|
|
527
599
|
{},
|
|
528
|
-
{},
|
|
529
|
-
{},
|
|
530
600
|
],
|
|
531
601
|
file: {
|
|
532
602
|
id: "FILE_1234",
|
|
@@ -537,7 +607,7 @@ test("Chat Chat Update Response", async () => {
|
|
|
537
607
|
metadata: {
|
|
538
608
|
type: "RETRIEVAL",
|
|
539
609
|
name: "<value>",
|
|
540
|
-
displayName: "
|
|
610
|
+
displayName: "Jackson_Rogahn",
|
|
541
611
|
displayDescription: "<value>",
|
|
542
612
|
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
543
613
|
},
|
|
@@ -556,9 +626,9 @@ test("Chat Chat Update Response", async () => {
|
|
|
556
626
|
},
|
|
557
627
|
action: {
|
|
558
628
|
metadata: {
|
|
559
|
-
type: "
|
|
629
|
+
type: "RETRIEVAL",
|
|
560
630
|
name: "<value>",
|
|
561
|
-
displayName: "
|
|
631
|
+
displayName: "Cecile69",
|
|
562
632
|
displayDescription: "<value>",
|
|
563
633
|
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
564
634
|
},
|
|
@@ -566,14 +636,79 @@ test("Chat Chat Update Response", async () => {
|
|
|
566
636
|
},
|
|
567
637
|
],
|
|
568
638
|
},
|
|
569
|
-
|
|
639
|
+
{
|
|
640
|
+
citations: [
|
|
641
|
+
{
|
|
642
|
+
sourceFile: {
|
|
643
|
+
id: "FILE_1234",
|
|
644
|
+
url: "www.google.com",
|
|
645
|
+
name: "sample.pdf",
|
|
646
|
+
},
|
|
647
|
+
referenceRanges: [
|
|
648
|
+
{
|
|
649
|
+
snippets: [
|
|
650
|
+
{
|
|
651
|
+
snippet: "snippet",
|
|
652
|
+
mimeType: "mimeType",
|
|
653
|
+
},
|
|
654
|
+
],
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
},
|
|
658
|
+
],
|
|
659
|
+
fragments: [
|
|
660
|
+
{
|
|
661
|
+
structuredResults: [
|
|
662
|
+
{},
|
|
663
|
+
{},
|
|
664
|
+
{},
|
|
665
|
+
],
|
|
666
|
+
file: {
|
|
667
|
+
id: "FILE_1234",
|
|
668
|
+
url: "www.google.com",
|
|
669
|
+
name: "sample.pdf",
|
|
670
|
+
},
|
|
671
|
+
action: {
|
|
672
|
+
metadata: {
|
|
673
|
+
type: "ACTION",
|
|
674
|
+
name: "<value>",
|
|
675
|
+
displayName: "Perry37",
|
|
676
|
+
displayDescription: "<value>",
|
|
677
|
+
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
structuredResults: [
|
|
683
|
+
{},
|
|
684
|
+
{},
|
|
685
|
+
{},
|
|
686
|
+
],
|
|
687
|
+
file: {
|
|
688
|
+
id: "FILE_1234",
|
|
689
|
+
url: "www.google.com",
|
|
690
|
+
name: "sample.pdf",
|
|
691
|
+
},
|
|
692
|
+
action: {
|
|
693
|
+
metadata: {
|
|
694
|
+
type: "RETRIEVAL",
|
|
695
|
+
name: "<value>",
|
|
696
|
+
displayName: "Billy.Bosco",
|
|
697
|
+
displayDescription: "<value>",
|
|
698
|
+
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
],
|
|
703
|
+
},
|
|
704
|
+
],
|
|
570
705
|
timeoutMillis: 30000,
|
|
571
706
|
});
|
|
572
707
|
expect(result).toBeDefined();
|
|
573
708
|
});
|
|
574
709
|
|
|
575
|
-
test("Chat Chat
|
|
576
|
-
const testHttpClient = createTestHTTPClient("
|
|
710
|
+
test("Chat Chat Stream Update Response", async () => {
|
|
711
|
+
const testHttpClient = createTestHTTPClient("chatStream-updateResponse");
|
|
577
712
|
|
|
578
713
|
const glean = new Glean({
|
|
579
714
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
@@ -581,7 +716,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
581
716
|
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
582
717
|
});
|
|
583
718
|
|
|
584
|
-
const result = await glean.
|
|
719
|
+
const result = await glean.chat.chatStream({
|
|
585
720
|
messages: [
|
|
586
721
|
{
|
|
587
722
|
citations: [
|
|
@@ -622,7 +757,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
622
757
|
referenceRanges: [
|
|
623
758
|
{
|
|
624
759
|
textRange: {
|
|
625
|
-
startIndex:
|
|
760
|
+
startIndex: 347627,
|
|
626
761
|
document: {},
|
|
627
762
|
},
|
|
628
763
|
snippets: [
|
|
@@ -642,48 +777,6 @@ test("Chat Chat Citation Response", async () => {
|
|
|
642
777
|
},
|
|
643
778
|
],
|
|
644
779
|
},
|
|
645
|
-
{
|
|
646
|
-
sourceFile: {
|
|
647
|
-
id: "FILE_1234",
|
|
648
|
-
url: "www.google.com",
|
|
649
|
-
name: "sample.pdf",
|
|
650
|
-
},
|
|
651
|
-
referenceRanges: [
|
|
652
|
-
{
|
|
653
|
-
snippets: [
|
|
654
|
-
{
|
|
655
|
-
snippet: "snippet",
|
|
656
|
-
mimeType: "mimeType",
|
|
657
|
-
},
|
|
658
|
-
],
|
|
659
|
-
},
|
|
660
|
-
],
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
sourceFile: {
|
|
664
|
-
id: "FILE_1234",
|
|
665
|
-
url: "www.google.com",
|
|
666
|
-
name: "sample.pdf",
|
|
667
|
-
},
|
|
668
|
-
referenceRanges: [
|
|
669
|
-
{
|
|
670
|
-
snippets: [
|
|
671
|
-
{
|
|
672
|
-
snippet: "snippet",
|
|
673
|
-
mimeType: "mimeType",
|
|
674
|
-
},
|
|
675
|
-
],
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
snippets: [
|
|
679
|
-
{
|
|
680
|
-
snippet: "snippet",
|
|
681
|
-
mimeType: "mimeType",
|
|
682
|
-
},
|
|
683
|
-
],
|
|
684
|
-
},
|
|
685
|
-
],
|
|
686
|
-
},
|
|
687
780
|
],
|
|
688
781
|
fragments: [
|
|
689
782
|
{
|
|
@@ -709,6 +802,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
709
802
|
id: "<id>",
|
|
710
803
|
name: "<value>",
|
|
711
804
|
members: [],
|
|
805
|
+
customFields: [],
|
|
712
806
|
datasourceProfiles: [
|
|
713
807
|
{
|
|
714
808
|
datasource: "github",
|
|
@@ -718,6 +812,10 @@ test("Chat Chat Citation Response", async () => {
|
|
|
718
812
|
datasource: "github",
|
|
719
813
|
handle: "<value>",
|
|
720
814
|
},
|
|
815
|
+
{
|
|
816
|
+
datasource: "github",
|
|
817
|
+
handle: "<value>",
|
|
818
|
+
},
|
|
721
819
|
],
|
|
722
820
|
},
|
|
723
821
|
customEntity: {
|
|
@@ -753,15 +851,15 @@ test("Chat Chat Citation Response", async () => {
|
|
|
753
851
|
},
|
|
754
852
|
likes: {
|
|
755
853
|
likedBy: [],
|
|
756
|
-
likedByUser:
|
|
757
|
-
numLikes:
|
|
854
|
+
likedByUser: false,
|
|
855
|
+
numLikes: 303935,
|
|
758
856
|
},
|
|
759
857
|
updatedBy: {
|
|
760
858
|
name: "George Clooney",
|
|
761
859
|
obfuscatedId: "abc123",
|
|
762
860
|
},
|
|
763
861
|
verification: {
|
|
764
|
-
state: "
|
|
862
|
+
state: "UNVERIFIED",
|
|
765
863
|
metadata: {
|
|
766
864
|
lastVerifier: {
|
|
767
865
|
name: "George Clooney",
|
|
@@ -777,14 +875,14 @@ test("Chat Chat Citation Response", async () => {
|
|
|
777
875
|
name: "George Clooney",
|
|
778
876
|
obfuscatedId: "abc123",
|
|
779
877
|
},
|
|
780
|
-
remindAt:
|
|
878
|
+
remindAt: 795702,
|
|
781
879
|
},
|
|
782
880
|
candidateVerifiers: [],
|
|
783
881
|
},
|
|
784
882
|
},
|
|
785
883
|
board: {
|
|
786
884
|
name: "<value>",
|
|
787
|
-
description: "
|
|
885
|
+
description: "orange gracefully or",
|
|
788
886
|
audienceFilters: [
|
|
789
887
|
{
|
|
790
888
|
fieldName: "type",
|
|
@@ -800,7 +898,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
800
898
|
],
|
|
801
899
|
},
|
|
802
900
|
],
|
|
803
|
-
id:
|
|
901
|
+
id: 527117,
|
|
804
902
|
creator: {
|
|
805
903
|
name: "George Clooney",
|
|
806
904
|
obfuscatedId: "abc123",
|
|
@@ -822,7 +920,8 @@ test("Chat Chat Citation Response", async () => {
|
|
|
822
920
|
},
|
|
823
921
|
collection: {
|
|
824
922
|
name: "<value>",
|
|
825
|
-
description:
|
|
923
|
+
description:
|
|
924
|
+
"stock peaceful jovially qua potentially furiously",
|
|
826
925
|
audienceFilters: [
|
|
827
926
|
{
|
|
828
927
|
fieldName: "type",
|
|
@@ -838,13 +937,12 @@ test("Chat Chat Citation Response", async () => {
|
|
|
838
937
|
],
|
|
839
938
|
},
|
|
840
939
|
],
|
|
841
|
-
id:
|
|
842
|
-
children: [],
|
|
940
|
+
id: 867042,
|
|
843
941
|
},
|
|
844
942
|
answerBoard: {
|
|
845
943
|
name: "<value>",
|
|
846
944
|
description:
|
|
847
|
-
"
|
|
945
|
+
"lest greatly behest molasses alienated severe consistency at",
|
|
848
946
|
audienceFilters: [
|
|
849
947
|
{
|
|
850
948
|
fieldName: "type",
|
|
@@ -860,7 +958,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
860
958
|
],
|
|
861
959
|
},
|
|
862
960
|
],
|
|
863
|
-
id:
|
|
961
|
+
id: 913408,
|
|
864
962
|
},
|
|
865
963
|
code: {
|
|
866
964
|
repoName: "scio",
|
|
@@ -885,159 +983,20 @@ test("Chat Chat Citation Response", async () => {
|
|
|
885
983
|
url: "www.google.com",
|
|
886
984
|
name: "sample.pdf",
|
|
887
985
|
},
|
|
888
|
-
action: {
|
|
889
|
-
metadata: {
|
|
890
|
-
type: "ACTION",
|
|
891
|
-
name: "<value>",
|
|
892
|
-
displayName: "Jamil_Koss",
|
|
893
|
-
displayDescription: "<value>",
|
|
894
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
895
|
-
},
|
|
896
|
-
},
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
structuredResults: [
|
|
900
|
-
{},
|
|
901
|
-
{},
|
|
902
|
-
],
|
|
903
|
-
file: {
|
|
904
|
-
id: "FILE_1234",
|
|
905
|
-
url: "www.google.com",
|
|
906
|
-
name: "sample.pdf",
|
|
907
|
-
},
|
|
908
|
-
action: {
|
|
909
|
-
metadata: {
|
|
910
|
-
type: "RETRIEVAL",
|
|
911
|
-
name: "<value>",
|
|
912
|
-
displayName: "Julien_Okuneva",
|
|
913
|
-
displayDescription: "<value>",
|
|
914
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
915
|
-
},
|
|
916
|
-
},
|
|
917
|
-
},
|
|
918
|
-
{
|
|
919
|
-
structuredResults: [
|
|
920
|
-
{},
|
|
921
|
-
{},
|
|
922
|
-
],
|
|
923
|
-
file: {
|
|
924
|
-
id: "FILE_1234",
|
|
925
|
-
url: "www.google.com",
|
|
926
|
-
name: "sample.pdf",
|
|
927
|
-
},
|
|
928
986
|
action: {
|
|
929
987
|
metadata: {
|
|
930
988
|
type: "RETRIEVAL",
|
|
931
989
|
name: "<value>",
|
|
932
|
-
displayName: "
|
|
990
|
+
displayName: "Yasmin_King",
|
|
933
991
|
displayDescription: "<value>",
|
|
934
992
|
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
935
993
|
},
|
|
936
994
|
},
|
|
937
995
|
},
|
|
938
|
-
],
|
|
939
|
-
},
|
|
940
|
-
{
|
|
941
|
-
citations: [
|
|
942
|
-
{
|
|
943
|
-
sourceFile: {
|
|
944
|
-
id: "FILE_1234",
|
|
945
|
-
url: "www.google.com",
|
|
946
|
-
name: "sample.pdf",
|
|
947
|
-
},
|
|
948
|
-
referenceRanges: [
|
|
949
|
-
{
|
|
950
|
-
snippets: [
|
|
951
|
-
{
|
|
952
|
-
snippet: "snippet",
|
|
953
|
-
mimeType: "mimeType",
|
|
954
|
-
},
|
|
955
|
-
],
|
|
956
|
-
},
|
|
957
|
-
{
|
|
958
|
-
snippets: [
|
|
959
|
-
{
|
|
960
|
-
snippet: "snippet",
|
|
961
|
-
mimeType: "mimeType",
|
|
962
|
-
},
|
|
963
|
-
],
|
|
964
|
-
},
|
|
965
|
-
],
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
sourceFile: {
|
|
969
|
-
id: "FILE_1234",
|
|
970
|
-
url: "www.google.com",
|
|
971
|
-
name: "sample.pdf",
|
|
972
|
-
},
|
|
973
|
-
referenceRanges: [
|
|
974
|
-
{
|
|
975
|
-
snippets: [
|
|
976
|
-
{
|
|
977
|
-
snippet: "snippet",
|
|
978
|
-
mimeType: "mimeType",
|
|
979
|
-
},
|
|
980
|
-
],
|
|
981
|
-
},
|
|
982
|
-
],
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
sourceFile: {
|
|
986
|
-
id: "FILE_1234",
|
|
987
|
-
url: "www.google.com",
|
|
988
|
-
name: "sample.pdf",
|
|
989
|
-
},
|
|
990
|
-
referenceRanges: [
|
|
991
|
-
{
|
|
992
|
-
snippets: [
|
|
993
|
-
{
|
|
994
|
-
snippet: "snippet",
|
|
995
|
-
mimeType: "mimeType",
|
|
996
|
-
},
|
|
997
|
-
],
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
snippets: [
|
|
1001
|
-
{
|
|
1002
|
-
snippet: "snippet",
|
|
1003
|
-
mimeType: "mimeType",
|
|
1004
|
-
},
|
|
1005
|
-
],
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
snippets: [
|
|
1009
|
-
{
|
|
1010
|
-
snippet: "snippet",
|
|
1011
|
-
mimeType: "mimeType",
|
|
1012
|
-
},
|
|
1013
|
-
],
|
|
1014
|
-
},
|
|
1015
|
-
],
|
|
1016
|
-
},
|
|
1017
|
-
],
|
|
1018
|
-
fragments: [
|
|
1019
996
|
{
|
|
1020
997
|
structuredResults: [
|
|
1021
998
|
{},
|
|
1022
999
|
{},
|
|
1023
|
-
],
|
|
1024
|
-
file: {
|
|
1025
|
-
id: "FILE_1234",
|
|
1026
|
-
url: "www.google.com",
|
|
1027
|
-
name: "sample.pdf",
|
|
1028
|
-
},
|
|
1029
|
-
action: {
|
|
1030
|
-
metadata: {
|
|
1031
|
-
type: "RETRIEVAL",
|
|
1032
|
-
name: "<value>",
|
|
1033
|
-
displayName: "Eladio82",
|
|
1034
|
-
displayDescription: "<value>",
|
|
1035
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
1036
|
-
},
|
|
1037
|
-
},
|
|
1038
|
-
},
|
|
1039
|
-
{
|
|
1040
|
-
structuredResults: [
|
|
1041
1000
|
{},
|
|
1042
1001
|
],
|
|
1043
1002
|
file: {
|
|
@@ -1049,26 +1008,7 @@ test("Chat Chat Citation Response", async () => {
|
|
|
1049
1008
|
metadata: {
|
|
1050
1009
|
type: "ACTION",
|
|
1051
1010
|
name: "<value>",
|
|
1052
|
-
displayName: "
|
|
1053
|
-
displayDescription: "<value>",
|
|
1054
|
-
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
1055
|
-
},
|
|
1056
|
-
},
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
structuredResults: [
|
|
1060
|
-
{},
|
|
1061
|
-
],
|
|
1062
|
-
file: {
|
|
1063
|
-
id: "FILE_1234",
|
|
1064
|
-
url: "www.google.com",
|
|
1065
|
-
name: "sample.pdf",
|
|
1066
|
-
},
|
|
1067
|
-
action: {
|
|
1068
|
-
metadata: {
|
|
1069
|
-
type: "RETRIEVAL",
|
|
1070
|
-
name: "<value>",
|
|
1071
|
-
displayName: "Naomie.Corkery",
|
|
1011
|
+
displayName: "Jeffrey97",
|
|
1072
1012
|
displayDescription: "<value>",
|
|
1073
1013
|
objectName: "[\"HR ticket\",\"Email\",\"Chat message\"]",
|
|
1074
1014
|
},
|
|
@@ -1082,8 +1022,8 @@ test("Chat Chat Citation Response", async () => {
|
|
|
1082
1022
|
expect(result).toBeDefined();
|
|
1083
1023
|
});
|
|
1084
1024
|
|
|
1085
|
-
test("Chat
|
|
1086
|
-
const testHttpClient = createTestHTTPClient("
|
|
1025
|
+
test("Chat Chat Stream Citation Response", async () => {
|
|
1026
|
+
const testHttpClient = createTestHTTPClient("chatStream-citationResponse");
|
|
1087
1027
|
|
|
1088
1028
|
const glean = new Glean({
|
|
1089
1029
|
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
@@ -1091,114 +1031,9 @@ test("Chat Deleteallchats", async () => {
|
|
|
1091
1031
|
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1092
1032
|
});
|
|
1093
1033
|
|
|
1094
|
-
await glean.
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
test("Chat Deletechats", async () => {
|
|
1098
|
-
const testHttpClient = createTestHTTPClient("deletechats");
|
|
1099
|
-
|
|
1100
|
-
const glean = new Glean({
|
|
1101
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1102
|
-
httpClient: testHttpClient,
|
|
1103
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1104
|
-
});
|
|
1105
|
-
|
|
1106
|
-
await glean.client.chat.delete({
|
|
1107
|
-
ids: [
|
|
1108
|
-
"<value>",
|
|
1109
|
-
"<value>",
|
|
1110
|
-
],
|
|
1111
|
-
});
|
|
1112
|
-
});
|
|
1113
|
-
|
|
1114
|
-
test("Chat Getchat", async () => {
|
|
1115
|
-
const testHttpClient = createTestHTTPClient("getchat");
|
|
1116
|
-
|
|
1117
|
-
const glean = new Glean({
|
|
1118
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1119
|
-
httpClient: testHttpClient,
|
|
1120
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1121
|
-
});
|
|
1122
|
-
|
|
1123
|
-
const result = await glean.client.chat.get({
|
|
1124
|
-
id: "<id>",
|
|
1125
|
-
});
|
|
1126
|
-
expect(result).toBeDefined();
|
|
1127
|
-
});
|
|
1128
|
-
|
|
1129
|
-
test("Chat Listchats", async () => {
|
|
1130
|
-
const testHttpClient = createTestHTTPClient("listchats");
|
|
1131
|
-
|
|
1132
|
-
const glean = new Glean({
|
|
1133
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1134
|
-
httpClient: testHttpClient,
|
|
1135
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1136
|
-
});
|
|
1137
|
-
|
|
1138
|
-
const result = await glean.client.chat.list();
|
|
1139
|
-
expect(result).toBeDefined();
|
|
1140
|
-
});
|
|
1141
|
-
|
|
1142
|
-
test("Chat Getchatapplication", async () => {
|
|
1143
|
-
const testHttpClient = createTestHTTPClient("getchatapplication");
|
|
1144
|
-
|
|
1145
|
-
const glean = new Glean({
|
|
1146
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1147
|
-
httpClient: testHttpClient,
|
|
1148
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1149
|
-
});
|
|
1150
|
-
|
|
1151
|
-
const result = await glean.client.chat.getApplication({
|
|
1152
|
-
id: "<id>",
|
|
1153
|
-
});
|
|
1154
|
-
expect(result).toBeDefined();
|
|
1155
|
-
});
|
|
1156
|
-
|
|
1157
|
-
test("Chat Uploadchatfiles", async () => {
|
|
1158
|
-
const testHttpClient = createTestHTTPClient("uploadchatfiles");
|
|
1159
|
-
|
|
1160
|
-
const glean = new Glean({
|
|
1161
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1162
|
-
httpClient: testHttpClient,
|
|
1163
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1164
|
-
});
|
|
1165
|
-
|
|
1166
|
-
const result = await glean.client.chat.uploadFiles({
|
|
1167
|
-
files: [],
|
|
1168
|
-
});
|
|
1169
|
-
expect(result).toBeDefined();
|
|
1170
|
-
});
|
|
1171
|
-
|
|
1172
|
-
test("Chat Getchatfiles", async () => {
|
|
1173
|
-
const testHttpClient = createTestHTTPClient("getchatfiles");
|
|
1174
|
-
|
|
1175
|
-
const glean = new Glean({
|
|
1176
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1177
|
-
httpClient: testHttpClient,
|
|
1178
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1179
|
-
});
|
|
1180
|
-
|
|
1181
|
-
const result = await glean.client.chat.getFiles({
|
|
1182
|
-
fileIds: [
|
|
1183
|
-
"<value>",
|
|
1184
|
-
"<value>",
|
|
1185
|
-
],
|
|
1034
|
+
const result = await glean.chat.chatStream({
|
|
1035
|
+
messages: [],
|
|
1036
|
+
timeoutMillis: 30000,
|
|
1186
1037
|
});
|
|
1187
1038
|
expect(result).toBeDefined();
|
|
1188
1039
|
});
|
|
1189
|
-
|
|
1190
|
-
test("Chat Deletechatfiles", async () => {
|
|
1191
|
-
const testHttpClient = createTestHTTPClient("deletechatfiles");
|
|
1192
|
-
|
|
1193
|
-
const glean = new Glean({
|
|
1194
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
1195
|
-
httpClient: testHttpClient,
|
|
1196
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
|
|
1197
|
-
});
|
|
1198
|
-
|
|
1199
|
-
await glean.client.chat.deleteFiles({
|
|
1200
|
-
fileIds: [
|
|
1201
|
-
"<value>",
|
|
1202
|
-
],
|
|
1203
|
-
});
|
|
1204
|
-
});
|