@gleanwork/api-client 0.1.0-beta.3 → 0.1.0-beta.5

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.
Files changed (90) hide show
  1. package/README.md +34 -1
  2. package/dist/commonjs/__tests__/chat.test.js +233 -414
  3. package/dist/commonjs/__tests__/chat.test.js.map +1 -1
  4. package/dist/commonjs/funcs/clientChatStart.d.ts +1 -1
  5. package/dist/commonjs/funcs/clientChatStart.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/clientChatStart.js +3 -3
  7. package/dist/commonjs/funcs/clientChatStart.js.map +1 -1
  8. package/dist/commonjs/funcs/clientChatStartStream.d.ts +16 -0
  9. package/dist/commonjs/funcs/clientChatStartStream.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/clientChatStartStream.js +121 -0
  11. package/dist/commonjs/funcs/clientChatStartStream.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/models/components/workflow.d.ts +0 -2
  15. package/dist/commonjs/models/components/workflow.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/workflow.js.map +1 -1
  17. package/dist/commonjs/models/operations/chatstream.d.ts +38 -0
  18. package/dist/commonjs/models/operations/chatstream.d.ts.map +1 -0
  19. package/dist/commonjs/models/operations/chatstream.js +81 -0
  20. package/dist/commonjs/models/operations/chatstream.js.map +1 -0
  21. package/dist/commonjs/models/operations/index.d.ts +1 -0
  22. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  23. package/dist/commonjs/models/operations/index.js +1 -0
  24. package/dist/commonjs/models/operations/index.js.map +1 -1
  25. package/dist/commonjs/react-query/clientChatStart.d.ts +1 -1
  26. package/dist/commonjs/react-query/clientChatStart.d.ts.map +1 -1
  27. package/dist/commonjs/react-query/clientChatStartStream.d.ts +24 -0
  28. package/dist/commonjs/react-query/clientChatStartStream.d.ts.map +1 -0
  29. package/dist/commonjs/react-query/clientChatStartStream.js +47 -0
  30. package/dist/commonjs/react-query/clientChatStartStream.js.map +1 -0
  31. package/dist/commonjs/react-query/index.d.ts +1 -0
  32. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  33. package/dist/commonjs/react-query/index.js +1 -0
  34. package/dist/commonjs/react-query/index.js.map +1 -1
  35. package/dist/commonjs/sdk/chat.d.ts +8 -1
  36. package/dist/commonjs/sdk/chat.d.ts.map +1 -1
  37. package/dist/commonjs/sdk/chat.js +10 -0
  38. package/dist/commonjs/sdk/chat.js.map +1 -1
  39. package/dist/esm/__tests__/chat.test.js +234 -415
  40. package/dist/esm/__tests__/chat.test.js.map +1 -1
  41. package/dist/esm/funcs/clientChatStart.d.ts +1 -1
  42. package/dist/esm/funcs/clientChatStart.d.ts.map +1 -1
  43. package/dist/esm/funcs/clientChatStart.js +3 -3
  44. package/dist/esm/funcs/clientChatStart.js.map +1 -1
  45. package/dist/esm/funcs/clientChatStartStream.d.ts +16 -0
  46. package/dist/esm/funcs/clientChatStartStream.d.ts.map +1 -0
  47. package/dist/esm/funcs/clientChatStartStream.js +85 -0
  48. package/dist/esm/funcs/clientChatStartStream.js.map +1 -0
  49. package/dist/esm/lib/config.d.ts +2 -2
  50. package/dist/esm/lib/config.js +2 -2
  51. package/dist/esm/models/components/workflow.d.ts +0 -2
  52. package/dist/esm/models/components/workflow.d.ts.map +1 -1
  53. package/dist/esm/models/components/workflow.js.map +1 -1
  54. package/dist/esm/models/operations/chatstream.d.ts +38 -0
  55. package/dist/esm/models/operations/chatstream.d.ts.map +1 -0
  56. package/dist/esm/models/operations/chatstream.js +43 -0
  57. package/dist/esm/models/operations/chatstream.js.map +1 -0
  58. package/dist/esm/models/operations/index.d.ts +1 -0
  59. package/dist/esm/models/operations/index.d.ts.map +1 -1
  60. package/dist/esm/models/operations/index.js +1 -0
  61. package/dist/esm/models/operations/index.js.map +1 -1
  62. package/dist/esm/react-query/clientChatStart.d.ts +1 -1
  63. package/dist/esm/react-query/clientChatStart.d.ts.map +1 -1
  64. package/dist/esm/react-query/clientChatStartStream.d.ts +24 -0
  65. package/dist/esm/react-query/clientChatStartStream.d.ts.map +1 -0
  66. package/dist/esm/react-query/clientChatStartStream.js +42 -0
  67. package/dist/esm/react-query/clientChatStartStream.js.map +1 -0
  68. package/dist/esm/react-query/index.d.ts +1 -0
  69. package/dist/esm/react-query/index.d.ts.map +1 -1
  70. package/dist/esm/react-query/index.js +1 -0
  71. package/dist/esm/react-query/index.js.map +1 -1
  72. package/dist/esm/sdk/chat.d.ts +8 -1
  73. package/dist/esm/sdk/chat.d.ts.map +1 -1
  74. package/dist/esm/sdk/chat.js +10 -0
  75. package/dist/esm/sdk/chat.js.map +1 -1
  76. package/docs/sdks/chat/README.md +112 -1
  77. package/docs/sdks/glean/README.md +10 -0
  78. package/jsr.json +1 -1
  79. package/package.json +1 -1
  80. package/src/__tests__/chat.test.ts +292 -457
  81. package/src/funcs/clientChatStart.ts +5 -6
  82. package/src/funcs/clientChatStartStream.ts +169 -0
  83. package/src/lib/config.ts +2 -2
  84. package/src/models/components/workflow.ts +0 -2
  85. package/src/models/operations/chatstream.ts +86 -0
  86. package/src/models/operations/index.ts +1 -0
  87. package/src/react-query/clientChatStart.ts +1 -1
  88. package/src/react-query/clientChatStartStream.ts +91 -0
  89. package/src/react-query/index.ts +1 -0
  90. package/src/sdk/chat.ts +21 -1
@@ -2,7 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import * as z from "zod";
6
5
  import { GleanCore } from "../core.js";
7
6
  import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
8
7
  import * as M from "../lib/matchers.js";
@@ -38,7 +37,7 @@ export function clientChatStart(
38
37
  options?: RequestOptions,
39
38
  ): APIPromise<
40
39
  Result<
41
- string,
40
+ components.ChatResponse,
42
41
  | GleanError
43
42
  | SDKValidationError
44
43
  | UnexpectedClientError
@@ -64,7 +63,7 @@ async function $do(
64
63
  ): Promise<
65
64
  [
66
65
  Result<
67
- string,
66
+ components.ChatResponse,
68
67
  | GleanError
69
68
  | SDKValidationError
70
69
  | UnexpectedClientError
@@ -100,7 +99,7 @@ async function $do(
100
99
 
101
100
  const headers = new Headers(compactMap({
102
101
  "Content-Type": "application/json",
103
- Accept: "text/plain",
102
+ Accept: "application/json",
104
103
  }));
105
104
 
106
105
  const secConfig = await extractSecurity(client._options.bearerAuth);
@@ -148,7 +147,7 @@ async function $do(
148
147
  const response = doResult.value;
149
148
 
150
149
  const [result] = await M.match<
151
- string,
150
+ components.ChatResponse,
152
151
  | GleanError
153
152
  | SDKValidationError
154
153
  | UnexpectedClientError
@@ -157,7 +156,7 @@ async function $do(
157
156
  | RequestTimeoutError
158
157
  | ConnectionError
159
158
  >(
160
- M.text(200, z.string()),
159
+ M.json(200, components.ChatResponse$inboundSchema),
161
160
  M.fail([400, 401, 408, 429, "4XX"]),
162
161
  M.fail("5XX"),
163
162
  )(response);
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { GleanCore } from "../core.js";
7
+ import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import { GleanError } from "../models/errors/gleanerror.js";
16
+ import {
17
+ ConnectionError,
18
+ InvalidRequestError,
19
+ RequestAbortedError,
20
+ RequestTimeoutError,
21
+ UnexpectedClientError,
22
+ } from "../models/errors/httpclienterrors.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Chat
30
+ *
31
+ * @remarks
32
+ * Have a conversation with Glean AI.
33
+ */
34
+ export function clientChatStartStream(
35
+ client: GleanCore,
36
+ chatRequest: components.ChatRequest,
37
+ timezoneOffset?: number | undefined,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ string,
42
+ | GleanError
43
+ | SDKValidationError
44
+ | UnexpectedClientError
45
+ | InvalidRequestError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | ConnectionError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client,
53
+ chatRequest,
54
+ timezoneOffset,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: GleanCore,
61
+ chatRequest: components.ChatRequest,
62
+ timezoneOffset?: number | undefined,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ string,
68
+ | GleanError
69
+ | SDKValidationError
70
+ | UnexpectedClientError
71
+ | InvalidRequestError
72
+ | RequestAbortedError
73
+ | RequestTimeoutError
74
+ | ConnectionError
75
+ >,
76
+ APICall,
77
+ ]
78
+ > {
79
+ const input: operations.ChatStreamRequest = {
80
+ chatRequest: chatRequest,
81
+ timezoneOffset: timezoneOffset,
82
+ };
83
+
84
+ const parsed = safeParse(
85
+ input,
86
+ (value) => operations.ChatStreamRequest$outboundSchema.parse(value),
87
+ "Input validation failed",
88
+ );
89
+ if (!parsed.ok) {
90
+ return [parsed, { status: "invalid" }];
91
+ }
92
+ const payload = parsed.value;
93
+ const body = encodeJSON("body", payload.ChatRequest, { explode: true });
94
+
95
+ const path = pathToFunc("/rest/api/v1/chat#stream")();
96
+
97
+ const query = encodeFormQuery({
98
+ "timezoneOffset": payload.timezoneOffset,
99
+ });
100
+
101
+ const headers = new Headers(compactMap({
102
+ "Content-Type": "application/json",
103
+ Accept: "text/plain",
104
+ }));
105
+
106
+ const secConfig = await extractSecurity(client._options.bearerAuth);
107
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
108
+ const requestSecurity = resolveGlobalSecurity(securityInput);
109
+
110
+ const context = {
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "chatStream",
113
+ oAuth2Scopes: [],
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.bearerAuth,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "POST",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ query: query,
131
+ body: body,
132
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
133
+ }, options);
134
+ if (!requestRes.ok) {
135
+ return [requestRes, { status: "invalid" }];
136
+ }
137
+ const req = requestRes.value;
138
+
139
+ const doResult = await client._do(req, {
140
+ context,
141
+ errorCodes: ["400", "401", "408", "429", "4XX", "5XX"],
142
+ retryConfig: context.retryConfig,
143
+ retryCodes: context.retryCodes,
144
+ });
145
+ if (!doResult.ok) {
146
+ return [doResult, { status: "request-error", request: req }];
147
+ }
148
+ const response = doResult.value;
149
+
150
+ const [result] = await M.match<
151
+ string,
152
+ | GleanError
153
+ | SDKValidationError
154
+ | UnexpectedClientError
155
+ | InvalidRequestError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | ConnectionError
159
+ >(
160
+ M.text(200, z.string()),
161
+ M.fail([400, 401, 408, 429, "4XX"]),
162
+ M.fail("5XX"),
163
+ )(response);
164
+ if (!result.ok) {
165
+ return [result, { status: "complete", request: req, response }];
166
+ }
167
+
168
+ return [result, { status: "complete", request: req, response }];
169
+ }
package/src/lib/config.ts CHANGED
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
66
  openapiDocVersion: "0.9.0",
67
- sdkVersion: "0.1.0-beta.3",
67
+ sdkVersion: "0.1.0-beta.5",
68
68
  genVersion: "2.596.2",
69
69
  userAgent:
70
- "speakeasy-sdk/typescript 0.1.0-beta.3 2.596.2 0.9.0 @gleanwork/api-client",
70
+ "speakeasy-sdk/typescript 0.1.0-beta.5 2.596.2 0.9.0 @gleanwork/api-client",
71
71
  } as const;
@@ -33,8 +33,6 @@ export type Workflow = {
33
33
  permissions?: ObjectPermissions | undefined;
34
34
  /**
35
35
  * The name of the workflow.
36
- *
37
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
38
36
  */
39
37
  name?: string | undefined;
40
38
  /**
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type ChatStreamRequest = {
13
+ /**
14
+ * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.
15
+ */
16
+ timezoneOffset?: number | undefined;
17
+ /**
18
+ * Includes chat history for Glean AI to respond to.
19
+ */
20
+ chatRequest: components.ChatRequest;
21
+ };
22
+
23
+ /** @internal */
24
+ export const ChatStreamRequest$inboundSchema: z.ZodType<
25
+ ChatStreamRequest,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ timezoneOffset: z.number().int().optional(),
30
+ ChatRequest: components.ChatRequest$inboundSchema,
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "ChatRequest": "chatRequest",
34
+ });
35
+ });
36
+
37
+ /** @internal */
38
+ export type ChatStreamRequest$Outbound = {
39
+ timezoneOffset?: number | undefined;
40
+ ChatRequest: components.ChatRequest$Outbound;
41
+ };
42
+
43
+ /** @internal */
44
+ export const ChatStreamRequest$outboundSchema: z.ZodType<
45
+ ChatStreamRequest$Outbound,
46
+ z.ZodTypeDef,
47
+ ChatStreamRequest
48
+ > = z.object({
49
+ timezoneOffset: z.number().int().optional(),
50
+ chatRequest: components.ChatRequest$outboundSchema,
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ chatRequest: "ChatRequest",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace ChatStreamRequest$ {
62
+ /** @deprecated use `ChatStreamRequest$inboundSchema` instead. */
63
+ export const inboundSchema = ChatStreamRequest$inboundSchema;
64
+ /** @deprecated use `ChatStreamRequest$outboundSchema` instead. */
65
+ export const outboundSchema = ChatStreamRequest$outboundSchema;
66
+ /** @deprecated use `ChatStreamRequest$Outbound` instead. */
67
+ export type Outbound = ChatStreamRequest$Outbound;
68
+ }
69
+
70
+ export function chatStreamRequestToJSON(
71
+ chatStreamRequest: ChatStreamRequest,
72
+ ): string {
73
+ return JSON.stringify(
74
+ ChatStreamRequest$outboundSchema.parse(chatStreamRequest),
75
+ );
76
+ }
77
+
78
+ export function chatStreamRequestFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<ChatStreamRequest, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => ChatStreamRequest$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'ChatStreamRequest' from JSON`,
85
+ );
86
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from "./chat.js";
6
+ export * from "./chatstream.js";
6
7
  export * from "./deleteallchats.js";
7
8
  export * from "./deletechatfiles.js";
8
9
  export * from "./deletechats.js";
@@ -22,7 +22,7 @@ export type ClientChatStartMutationVariables = {
22
22
  options?: RequestOptions;
23
23
  };
24
24
 
25
- export type ClientChatStartMutationData = string;
25
+ export type ClientChatStartMutationData = components.ChatResponse;
26
26
 
27
27
  /**
28
28
  * Chat
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ MutationKey,
7
+ useMutation,
8
+ UseMutationResult,
9
+ } from "@tanstack/react-query";
10
+ import { GleanCore } from "../core.js";
11
+ import { clientChatStartStream } from "../funcs/clientChatStartStream.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as components from "../models/components/index.js";
15
+ import { unwrapAsync } from "../types/fp.js";
16
+ import { useGleanContext } from "./_context.js";
17
+ import { MutationHookOptions } from "./_types.js";
18
+
19
+ export type ClientChatStartStreamMutationVariables = {
20
+ chatRequest: components.ChatRequest;
21
+ timezoneOffset?: number | undefined;
22
+ options?: RequestOptions;
23
+ };
24
+
25
+ export type ClientChatStartStreamMutationData = string;
26
+
27
+ /**
28
+ * Chat
29
+ *
30
+ * @remarks
31
+ * Have a conversation with Glean AI.
32
+ */
33
+ export function useClientChatStartStreamMutation(
34
+ options?: MutationHookOptions<
35
+ ClientChatStartStreamMutationData,
36
+ Error,
37
+ ClientChatStartStreamMutationVariables
38
+ >,
39
+ ): UseMutationResult<
40
+ ClientChatStartStreamMutationData,
41
+ Error,
42
+ ClientChatStartStreamMutationVariables
43
+ > {
44
+ const client = useGleanContext();
45
+ return useMutation({
46
+ ...buildClientChatStartStreamMutation(client, options),
47
+ ...options,
48
+ });
49
+ }
50
+
51
+ export function mutationKeyClientChatStartStream(): MutationKey {
52
+ return ["@gleanwork/api-client", "chat", "startStream"];
53
+ }
54
+
55
+ export function buildClientChatStartStreamMutation(
56
+ client$: GleanCore,
57
+ hookOptions?: RequestOptions,
58
+ ): {
59
+ mutationKey: MutationKey;
60
+ mutationFn: (
61
+ variables: ClientChatStartStreamMutationVariables,
62
+ ) => Promise<ClientChatStartStreamMutationData>;
63
+ } {
64
+ return {
65
+ mutationKey: mutationKeyClientChatStartStream(),
66
+ mutationFn: function clientChatStartStreamMutationFn({
67
+ chatRequest,
68
+ timezoneOffset,
69
+ options,
70
+ }): Promise<ClientChatStartStreamMutationData> {
71
+ const mergedOptions = {
72
+ ...hookOptions,
73
+ ...options,
74
+ fetchOptions: {
75
+ ...hookOptions?.fetchOptions,
76
+ ...options?.fetchOptions,
77
+ signal: combineSignals(
78
+ hookOptions?.fetchOptions?.signal,
79
+ options?.fetchOptions?.signal,
80
+ ),
81
+ },
82
+ };
83
+ return unwrapAsync(clientChatStartStream(
84
+ client$,
85
+ chatRequest,
86
+ timezoneOffset,
87
+ mergedOptions,
88
+ ));
89
+ },
90
+ };
91
+ }
@@ -27,6 +27,7 @@ export * from "./clientChatGetApplication.js";
27
27
  export * from "./clientChatGetFiles.js";
28
28
  export * from "./clientChatList.js";
29
29
  export * from "./clientChatStart.js";
30
+ export * from "./clientChatStartStream.js";
30
31
  export * from "./clientChatUploadFiles.js";
31
32
  export * from "./clientCollectionsAddItems.js";
32
33
  export * from "./clientCollectionsCreate.js";
package/src/sdk/chat.ts CHANGED
@@ -10,6 +10,7 @@ import { clientChatGetApplication } from "../funcs/clientChatGetApplication.js";
10
10
  import { clientChatGetFiles } from "../funcs/clientChatGetFiles.js";
11
11
  import { clientChatList } from "../funcs/clientChatList.js";
12
12
  import { clientChatStart } from "../funcs/clientChatStart.js";
13
+ import { clientChatStartStream } from "../funcs/clientChatStartStream.js";
13
14
  import { clientChatUploadFiles } from "../funcs/clientChatUploadFiles.js";
14
15
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
15
16
  import * as components from "../models/components/index.js";
@@ -26,7 +27,7 @@ export class Chat extends ClientSDK {
26
27
  chatRequest: components.ChatRequest,
27
28
  timezoneOffset?: number | undefined,
28
29
  options?: RequestOptions,
29
- ): Promise<string> {
30
+ ): Promise<components.ChatResponse> {
30
31
  return unwrapAsync(clientChatStart(
31
32
  this,
32
33
  chatRequest,
@@ -182,4 +183,23 @@ export class Chat extends ClientSDK {
182
183
  options,
183
184
  ));
184
185
  }
186
+
187
+ /**
188
+ * Chat
189
+ *
190
+ * @remarks
191
+ * Have a conversation with Glean AI.
192
+ */
193
+ async startStream(
194
+ chatRequest: components.ChatRequest,
195
+ timezoneOffset?: number | undefined,
196
+ options?: RequestOptions,
197
+ ): Promise<string> {
198
+ return unwrapAsync(clientChatStartStream(
199
+ this,
200
+ chatRequest,
201
+ timezoneOffset,
202
+ options,
203
+ ));
204
+ }
185
205
  }