Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 45 additions & 96 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
python:
version: 0.17.21
version: 0.17.22
additionalDependencies:
dev: {}
main:
Expand Down
83 changes: 3 additions & 80 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ openapi: 3.1.0
info:
version: "0.9.0"
title: Glean API
x-source-commit-sha: 77999be6fb7bac7ce1b740a5f554037282298b5d
x-open-api-commit-sha: ea654b06c64649ac0076b89cdcea6e0792daec11
x-source-commit-sha: d0dbc7b464c50db93861cf4f3c0d374c0c8b1a39
x-open-api-commit-sha: aafc9eb0a47add94983a44ca92a52f31e24ea7ed
description: |
# Introduction
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.
Expand Down Expand Up @@ -9840,72 +9840,13 @@ components:
content:
type: string
minLength: 1
PlatformChatTextFormat:
type: object
additionalProperties: false
description: Unconstrained plain-text assistant output.
required:
- type
properties:
type:
type: string
description: Discriminator. Must be TEXT.
enum:
- TEXT
PlatformChatJsonSchemaFormat:
type: object
additionalProperties: false
description: Constrains the assistant response to a caller-supplied JSON Schema.
required:
- type
- name
- schema
properties:
type:
type: string
description: Discriminator. Must be JSON_SCHEMA.
enum:
- JSON_SCHEMA
name:
type: string
minLength: 1
maxLength: 64
description: A stable identifier for the schema.
description:
type: string
maxLength: 1024
description: An optional human-readable description of the schema.
schema:
type: object
additionalProperties: true
description: A JSON Schema object describing the desired output shape.
strict:
type: boolean
default: true
description: |
When true, the provider validates the response against the schema. Unsupported by some providers; defaults to true.
PlatformChatCreateRequest:
type: object
additionalProperties: false
required:
- input
example:
input: Summarize our parental leave policy as JSON.
text:
format:
type: JSON_SCHEMA
name: policy_summary
schema:
type: object
properties:
eligible_employees:
type: string
duration_weeks:
type: integer
required:
- eligible_employees
- duration_weeks
strict: true
input: Summarize our parental leave policy.
properties:
input:
description: |
Expand All @@ -9932,18 +9873,6 @@ components:
minLength: 1
description: |
Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
text:
type: object
additionalProperties: false
description: |
Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true.
properties:
format:
description: |
Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema.
oneOf:
- $ref: "#/components/schemas/PlatformChatTextFormat"
- $ref: "#/components/schemas/PlatformChatJsonSchemaFormat"
PlatformChatStreamResponseId:
type: string
minLength: 1
Expand All @@ -9963,12 +9892,6 @@ components:
- OUTPUT_TEXT
text:
type: string
structured_output:
type:
- object
- "null"
description: |
Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`.
annotations:
type: array
items:
Expand Down
17 changes: 1 addition & 16 deletions .speakeasy/tests.arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159057,24 +159057,9 @@ workflows:
requestBody:
contentType: application/json
payload:
input: Summarize our parental leave policy as JSON.
input: Summarize our parental leave policy.
store: true
stream: false
text:
format:
name: policy_summary
schema:
properties:
duration_weeks:
type: integer
eligible_employees:
type: string
required:
- eligible_employees
- duration_weeks
type: object
strict: true
type: JSON_SCHEMA
successCriteria:
- condition: $statusCode == 200
- condition: $response.header.Content-Type == application/json
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ speakeasyVersion: 1.808.1
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:509e25a8ae0bbaf6e23c95c58de651349216086a13278a3792b2e3f8be68fc6b
sourceBlobDigest: sha256:15ce4e757fd8eb3c2a3857cb15740c718b57c969342223ccc0de7437748a8609
sourceRevisionDigest: sha256:944e067962243f50e69e5d92bc4f12480dcfe9ef75cb4ad0894367e1c0c6dbd0
sourceBlobDigest: sha256:a801af72fad0680a940fa6819af3d54251e473e961254ab1f0a918332f725cd5
tags:
- latest
Glean Client API:
Expand All @@ -16,10 +16,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:509e25a8ae0bbaf6e23c95c58de651349216086a13278a3792b2e3f8be68fc6b
sourceBlobDigest: sha256:15ce4e757fd8eb3c2a3857cb15740c718b57c969342223ccc0de7437748a8609
sourceRevisionDigest: sha256:944e067962243f50e69e5d92bc4f12480dcfe9ef75cb4ad0894367e1c0c6dbd0
sourceBlobDigest: sha256:a801af72fad0680a940fa6819af3d54251e473e961254ab1f0a918332f725cd5
codeSamplesNamespace: glean-api-specs-python-code-samples
codeSamplesRevisionDigest: sha256:5de9ed3291b25ba50b857aa18d4dca14272ee47e2ce880201d3f3def4d0c5b63
codeSamplesRevisionDigest: sha256:2994fe38335b43341a5248e1694efe9cc1902a4788b861c3f2768e78927baa9e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,36 +640,15 @@ The stream is also a [Context Manager][context-manager] and can be used with the
underlying connection when the context is exited.

```python
from glean.api_client import Glean, models
from glean.api_client import Glean
import os


with Glean(
api_token=os.getenv("GLEAN_API_TOKEN"),
) as glean:

res = glean.chat.create_stream(input="Summarize our parental leave policy as JSON.", store=True, text={
"format_": {
"type": models.PlatformChatJSONSchemaFormatType.JSON_SCHEMA,
"name": "policy_summary",
"schema_": {
"type": "object",
"properties": {
"eligible_employees": {
"type": "string",
},
"duration_weeks": {
"type": "integer",
},
},
"required": [
"eligible_employees",
"duration_weeks",
],
},
"strict": True,
},
})
res = glean.chat.create_stream(input="Summarize our parental leave policy.", store=True)

with res as event_stream:
for event in event_stream:
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1068,4 +1068,14 @@ Based on:
### Generated
- [python v0.17.21] .
### Releases
- [PyPI v0.17.21] https://pypi.org/project/glean-api-client/0.17.21 - .
- [PyPI v0.17.21] https://pypi.org/project/glean-api-client/0.17.21 - .

## 2026-11-13 05:28:49
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.17.22] .
### Releases
- [PyPI v0.17.22] https://pypi.org/project/glean-api-client/0.17.22 - .
20 changes: 0 additions & 20 deletions docs/models/platformchatcreateformat.md

This file was deleted.

Loading
Loading