You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.
@@ -255,7 +255,7 @@ paths:
255
255
- Chat
256
256
summary: Create a chat response
257
257
description: |
258
-
Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
258
+
Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
259
259
operationId: platform-chat-create
260
260
x-visibility: Public
261
261
x-glean-experimental:
@@ -1737,7 +1737,7 @@ paths:
1737
1737
- Chat
1738
1738
summary: SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
1739
1739
description: |
1740
-
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
1740
+
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
1741
1741
operationId: platform-chat-create-stream
1742
1742
x-visibility: Public
1743
1743
x-glean-experimental:
@@ -7293,7 +7293,7 @@ components:
7293
7293
stream:
7294
7294
type: boolean
7295
7295
description: |
7296
-
When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`.
7296
+
When true, the HTTP response is `text/event-stream`. When false or omitted, the HTTP response is `application/json`.
Copy file name to clipboardExpand all lines: docs/sdks/chatsdk/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
## create
11
11
12
-
Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
12
+
Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
13
13
14
14
15
15
### Example Usage
@@ -54,7 +54,7 @@ with Glean(
54
54
55
55
## create_stream
56
56
57
-
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
57
+
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
Copy file name to clipboardExpand all lines: src/glean/api_client/chat_sdk.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ def create(
25
25
) ->models.PlatformChatCompletedResponse:
26
26
r"""Create a chat response
27
27
28
-
Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
28
+
Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
29
29
30
30
31
31
:param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
@@ -150,7 +150,7 @@ async def create_async(
150
150
) ->models.PlatformChatCompletedResponse:
151
151
r"""Create a chat response
152
152
153
-
Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
153
+
Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
154
154
155
155
156
156
:param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
r"""SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
278
278
279
-
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
279
+
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
280
280
281
281
282
282
:param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
r"""SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
416
416
417
-
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
417
+
SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
418
418
419
419
420
420
:param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
0 commit comments