Skip to content

Commit be55402

Browse files
Merge pull request #12 from gleanwork/speakeasy-sdk-regen-1746231561
chore: 🐝 Update SDK - Generate GLEAN 0.1.0-beta.4
2 parents ae33e27 + 274ecef commit be55402

File tree

31 files changed

+6908
-1465
lines changed

31 files changed

+6908
-1465
lines changed

.speakeasy/gen.lock

Lines changed: 50 additions & 5 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ generation:
2424
generateNewTests: true
2525
skipResponseBodyAssertions: true
2626
typescript:
27-
version: 0.1.0-beta.2
27+
version: 0.1.0-beta.4
2828
additionalDependencies:
2929
dependencies: {}
3030
devDependencies: {}

.speakeasy/glean-merged-spec.yaml

Lines changed: 179 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ paths:
403403
"200":
404404
description: OK
405405
content:
406-
text/plain:
406+
application/json:
407407
schema:
408408
$ref: "#/components/schemas/ChatResponse"
409409
examples:
@@ -3007,6 +3007,141 @@ paths:
30073007
description: Conflict
30083008
x-speakeasy-name-override: upload
30093009
x-speakeasy-group: client.shortcuts
3010+
/rest/api/v1/chat#stream:
3011+
post:
3012+
tags:
3013+
- Chat
3014+
summary: Chat
3015+
description: Have a conversation with Glean AI.
3016+
operationId: chatStream
3017+
x-visibility: Public
3018+
x-codegen-request-body-name: payload
3019+
parameters:
3020+
- $ref: '#/components/parameters/timezoneOffset'
3021+
requestBody:
3022+
content:
3023+
application/json:
3024+
schema:
3025+
$ref: '#/components/schemas/ChatRequest'
3026+
examples:
3027+
defaultExample:
3028+
value:
3029+
messages:
3030+
- author: USER
3031+
messageType: CONTENT
3032+
fragments:
3033+
- text: What are the company holidays this year?
3034+
gptAgentExample:
3035+
value:
3036+
agentConfig:
3037+
agent: GPT
3038+
messages:
3039+
- author: USER
3040+
messageType: CONTENT
3041+
fragments:
3042+
- text: Who was the first person to land on the moon?
3043+
description: Includes chat history for Glean AI to respond to.
3044+
required: true
3045+
x-exportParamName: Request
3046+
responses:
3047+
'200':
3048+
description: OK
3049+
content:
3050+
text/plain:
3051+
schema:
3052+
$ref: '#/components/schemas/ChatRequestStream'
3053+
examples:
3054+
defaultExample:
3055+
value:
3056+
messages:
3057+
- author: GLEAN_AI
3058+
messageType: CONTENT
3059+
hasMoreFragments: false
3060+
agentConfig:
3061+
agent: DEFAULT
3062+
mode: DEFAULT
3063+
fragments:
3064+
- text: There are no holidays!
3065+
streamingExample:
3066+
value:
3067+
messages:
3068+
- author: GLEAN_AI
3069+
messageType: CONTENT
3070+
agentConfig:
3071+
agent: DEFAULT
3072+
mode: DEFAULT
3073+
hasMoreFragments: true
3074+
fragments: null
3075+
- author: GLEAN_AI
3076+
messageType: CONTENT
3077+
agentConfig:
3078+
agent: DEFAULT
3079+
mode: DEFAULT
3080+
hasMoreFragments: true
3081+
fragments: null
3082+
- author: GLEAN_AI
3083+
messageType: CONTENT
3084+
agentConfig:
3085+
agent: DEFAULT
3086+
mode: DEFAULT
3087+
hasMoreFragments: true
3088+
fragments:
3089+
- text: e are
3090+
- author: GLEAN_AI
3091+
messageType: CONTENT
3092+
agentConfig:
3093+
agent: DEFAULT
3094+
mode: DEFAULT
3095+
hasMoreFragments: true
3096+
fragments:
3097+
- text: no hol
3098+
- author: GLEAN_AI
3099+
messageType: CONTENT
3100+
agentConfig:
3101+
agent: DEFAULT
3102+
mode: DEFAULT
3103+
hasMoreFragments: false
3104+
fragments:
3105+
- text: idays!
3106+
updateResponse:
3107+
value:
3108+
messages:
3109+
- author: GLEAN_AI
3110+
messageType: UPDATE
3111+
agentConfig:
3112+
agent: DEFAULT
3113+
mode: DEFAULT
3114+
fragments:
3115+
- text: '**Reading:**'
3116+
- structuredResults:
3117+
- document:
3118+
id: '123'
3119+
title: Company Handbook
3120+
citationResponse:
3121+
value:
3122+
messages:
3123+
- author: GLEAN_AI
3124+
messageType: CONTENT
3125+
agentConfig:
3126+
agent: DEFAULT
3127+
mode: DEFAULT
3128+
citations:
3129+
- sourceDocument:
3130+
id: '123'
3131+
title: Company Handbook
3132+
referenceRanges:
3133+
- textRange:
3134+
startIndex: 0
3135+
endIndex: 12
3136+
type: CITATION
3137+
'400':
3138+
description: Invalid request
3139+
'401':
3140+
description: Not Authorized
3141+
'408':
3142+
description: Request Timeout
3143+
'429':
3144+
description: Too Many Requests
30103145
components:
30113146
securitySchemes:
30123147
BearerAuth:
@@ -10837,6 +10972,49 @@ components:
1083710972
instanceDescription:
1083810973
type: string
1083910974
description: A human readable string identifying this instance as compared to its peers, e.g. "github.com/askscio" or "github.askscio.com"
10975+
ChatRequestStream:
10976+
required:
10977+
- messages
10978+
properties:
10979+
saveChat:
10980+
type: boolean
10981+
description: >-
10982+
Save the current interaction as a Chat for the user to access and potentially continue later.
10983+
chatId:
10984+
type: string
10985+
description: >-
10986+
The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true.
10987+
messages:
10988+
type: array
10989+
description: >-
10990+
A list of chat messages, from most recent to least recent. It can be assumed that the first chat message in the list is the user's most recent query.
10991+
items:
10992+
$ref: '#/components/schemas/ChatMessage'
10993+
agentConfig:
10994+
$ref: '#/components/schemas/AgentConfig'
10995+
description: Describes the agent that will execute the request.
10996+
inclusions:
10997+
$ref: '#/components/schemas/ChatRestrictionFilters'
10998+
description: >-
10999+
A list of filters which only allows chat to access certain content.
11000+
exclusions:
11001+
$ref: '#/components/schemas/ChatRestrictionFilters'
11002+
description: >-
11003+
A list of filters which disallows chat from accessing certain content. If content is in both inclusions and exclusions, it'll be excluded.
11004+
timeoutMillis:
11005+
type: integer
11006+
description: >-
11007+
Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer.
11008+
example: 30000
11009+
applicationId:
11010+
type: string
11011+
description: >-
11012+
The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used.
11013+
stream:
11014+
type: boolean
11015+
description: >-
11016+
If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be.
11017+
default: true
1084011018
parameters:
1084111019
timezoneOffset:
1084211020
name: timezoneOffset

0 commit comments

Comments
 (0)