diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 05c59018..623bf216 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: 895c9d213122353173d7c129b2c8d4b7 + docChecksum: 1477738232aeb60aace8340880be72ae docVersion: 0.9.0 - speakeasyVersion: 1.557.0 - generationVersion: 2.623.0 - releaseVersion: 0.6.3 - configChecksum: f4420151b362f554dd36cc2e52ba1688 + speakeasyVersion: 1.557.1 + generationVersion: 2.623.2 + releaseVersion: 0.6.4 + configChecksum: 97a162cbd1df1380dc8322bed97ec589 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2127e650..5c3a8c76 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.6.3 + version: 0.6.4 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index c8c50dab..74d569f8 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -7259,6 +7259,9 @@ components: applicationId: type: string description: 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. + agentId: + type: string + description: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. stream: type: boolean description: 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. diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 80a8f88f..138efce9 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.557.0 +speakeasyVersion: 1.557.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:d7ce1ceb600711b8e88b818186b93b6e4275f01811996d436752410c100339a4 - sourceBlobDigest: sha256:e56c126a42ae3d72395b2891ac56b8f5264993a298d9d4f5e68748395cdd54cf + sourceRevisionDigest: sha256:254ed74184de2e725a0dc2cf521b132b29ece9d3ba6b12fd7e7b1ceaa2e6d043 + sourceBlobDigest: sha256:f2a59d8beefedbda0e59b25d09a930e1b907145f784bf8961fc31b862163d964 tags: - latest - - speakeasy-sdk-regen-1749247136 + - speakeasy-sdk-regen-1749454024 Glean Client API: sourceNamespace: glean-client-api sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2 @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:d7ce1ceb600711b8e88b818186b93b6e4275f01811996d436752410c100339a4 - sourceBlobDigest: sha256:e56c126a42ae3d72395b2891ac56b8f5264993a298d9d4f5e68748395cdd54cf + sourceRevisionDigest: sha256:254ed74184de2e725a0dc2cf521b132b29ece9d3ba6b12fd7e7b1ceaa2e6d043 + sourceBlobDigest: sha256:f2a59d8beefedbda0e59b25d09a930e1b907145f784bf8961fc31b862163d964 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:616f210191e4d9c7270884cda5aee3e53caa4a3c1eba93997f725bdd345eed8c + codeSamplesRevisionDigest: sha256:bd2c8dd3d421bb8899be6f133e8dcd287ceaeb9e7022ad1b5f3415d7b335c1ab workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 7cc69781..c9e94bc1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -138,4 +138,14 @@ Based on: ### Generated - [python v0.6.3] . ### Releases -- [PyPI v0.6.3] https://pypi.org/project/glean/0.6.3 - . \ No newline at end of file +- [PyPI v0.6.3] https://pypi.org/project/glean/0.6.3 - . + +## 2025-06-09 07:26:40 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.557.1 (2.623.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.6.4] . +### Releases +- [PyPI v0.6.4] https://pypi.org/project/glean/0.6.4 - . \ No newline at end of file diff --git a/docs/models/chatrequest.md b/docs/models/chatrequest.md index 4e5e35db..4aa02657 100644 --- a/docs/models/chatrequest.md +++ b/docs/models/chatrequest.md @@ -14,4 +14,5 @@ | `timeout_millis` | *Optional[int]* | :heavy_minus_sign: | Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. | 30000 | | `session_info` | [Optional[models.SessionInfo]](../models/sessioninfo.md) | :heavy_minus_sign: | N/A | | | `application_id` | *Optional[str]* | :heavy_minus_sign: | 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. | | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | 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. | | \ No newline at end of file diff --git a/docs/sdks/clientchat/README.md b/docs/sdks/clientchat/README.md index 37e78693..58d867d5 100644 --- a/docs/sdks/clientchat/README.md +++ b/docs/sdks/clientchat/README.md @@ -60,6 +60,7 @@ with Glean( | `timeout_millis` | *Optional[int]* | :heavy_minus_sign: | Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. | 30000 | | `session_info` | [Optional[models.SessionInfo]](../../models/sessioninfo.md) | :heavy_minus_sign: | N/A | | | `application_id` | *Optional[str]* | :heavy_minus_sign: | 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. | | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | 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. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -431,6 +432,7 @@ with Glean( | `timeout_millis` | *Optional[int]* | :heavy_minus_sign: | Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. | 30000 | | `session_info` | [Optional[models.SessionInfo]](../../models/sessioninfo.md) | :heavy_minus_sign: | N/A | | | `application_id` | *Optional[str]* | :heavy_minus_sign: | 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. | | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | 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. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/pyproject.toml b/pyproject.toml index cf9b5c8e..1ebfef56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "glean-api-client" -version = "0.6.3" +version = "0.6.4" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." }] license = "MIT" diff --git a/speakeasyusagegen/.speakeasy/logs/naming.log b/speakeasyusagegen/.speakeasy/logs/naming.log index 3c19ab32..720c4b16 100644 --- a/speakeasyusagegen/.speakeasy/logs/naming.log +++ b/speakeasyusagegen/.speakeasy/logs/naming.log @@ -308,38 +308,38 @@ DEBUG --- Renaming 2 types with name "authentication" --- DEBUG discriminated: Renamed to "client_authentication" - labels: "original_name:authentication group:client data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:client originalName:authentication" + labels: "original_name:authentication group:client data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:client originalName:authentication" DEBUG discriminated: Renamed to "indexing_authentication" - labels: "original_name:authentication group:indexing data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:indexing originalName:authentication" + labels: "original_name:authentication group:indexing data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:indexing originalName:authentication" DEBUG --- Renaming 3 types with name "documents" --- DEBUG discriminated: Renamed to "client_documents" - labels: "original_name:documents group:client data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:client originalName:documents" + labels: "original_name:documents group:client data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:client originalName:documents" DEBUG discriminated: Renamed to "indexing_documents" - labels: "original_name:documents group:indexing data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:indexing originalName:documents" + labels: "original_name:documents group:indexing data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:indexing originalName:documents" DEBUG discriminated: Renamed to "governance_documents" - labels: "original_name:documents group:governance group:client data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:client group:governance originalName:documents" + labels: "original_name:documents group:governance group:client data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:client group:governance originalName:documents" DEBUG --- Renaming 2 types with name "shortcuts" --- DEBUG discriminated: Renamed to "client_shortcuts" - labels: "original_name:shortcuts group:client data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:client originalName:shortcuts" + labels: "original_name:shortcuts group:client data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:client originalName:shortcuts" DEBUG discriminated: Renamed to "indexing_shortcuts" - labels: "original_name:shortcuts group:indexing data_type:SDK mainSDK:Glean" - registrationID: "scope:sdk mainSDK:Glean group:indexing originalName:shortcuts" + labels: "original_name:shortcuts group:indexing data_type:SDK" + registrationID: "scope:sdk mainSDK:SDK group:indexing originalName:shortcuts" DEBUG prepend_op_id: N/A rename "listpins_request" labels: "original_name:request operation:listpins operationTag:client.pins" registrationID: "scope:operations operationTag:client.pins operation:listpins requestResponse:request originalName:RequestBody" DEBUG -Glean (SDK empty) +Sdk (SDK empty) Client (SDK empty) Activity (SDK empty) Activity (events: array) diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index fa0612f2..a709ea9d 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean" -__version__: str = "0.6.3" +__version__: str = "0.6.4" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.623.0" -__user_agent__: str = "speakeasy-sdk/python 0.6.3 2.623.0 0.9.0 glean" +__gen_version__: str = "2.623.2" +__user_agent__: str = "speakeasy-sdk/python 0.6.4 2.623.2 0.9.0 glean" try: if __package__ is not None: diff --git a/src/glean/api_client/client_chat.py b/src/glean/api_client/client_chat.py index 875c3ce9..a8522b40 100644 --- a/src/glean/api_client/client_chat.py +++ b/src/glean/api_client/client_chat.py @@ -30,6 +30,7 @@ def create( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, application_id: Optional[str] = None, + agent_id: Optional[str] = None, stream: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -50,6 +51,7 @@ def create( :param timeout_millis: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. :param session_info: :param application_id: 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. + :param agent_id: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. :param stream: 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. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -86,6 +88,7 @@ def create( session_info, Optional[models.SessionInfo] ), application_id=application_id, + agent_id=agent_id, stream=stream, ), ) @@ -175,6 +178,7 @@ async def create_async( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, application_id: Optional[str] = None, + agent_id: Optional[str] = None, stream: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -195,6 +199,7 @@ async def create_async( :param timeout_millis: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. :param session_info: :param application_id: 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. + :param agent_id: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. :param stream: 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. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -231,6 +236,7 @@ async def create_async( session_info, Optional[models.SessionInfo] ), application_id=application_id, + agent_id=agent_id, stream=stream, ), ) @@ -1964,6 +1970,7 @@ def create_stream( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, application_id: Optional[str] = None, + agent_id: Optional[str] = None, stream: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1984,6 +1991,7 @@ def create_stream( :param timeout_millis: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. :param session_info: :param application_id: 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. + :param agent_id: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. :param stream: 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. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2020,6 +2028,7 @@ def create_stream( session_info, Optional[models.SessionInfo] ), application_id=application_id, + agent_id=agent_id, stream=stream, ), ) @@ -2109,6 +2118,7 @@ async def create_stream_async( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, application_id: Optional[str] = None, + agent_id: Optional[str] = None, stream: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2129,6 +2139,7 @@ async def create_stream_async( :param timeout_millis: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. :param session_info: :param application_id: 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. + :param agent_id: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. :param stream: 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. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2165,6 +2176,7 @@ async def create_stream_async( session_info, Optional[models.SessionInfo] ), application_id=application_id, + agent_id=agent_id, stream=stream, ), ) diff --git a/src/glean/api_client/models/chatrequest.py b/src/glean/api_client/models/chatrequest.py index 6b897ff5..59e0ded2 100644 --- a/src/glean/api_client/models/chatrequest.py +++ b/src/glean/api_client/models/chatrequest.py @@ -30,6 +30,8 @@ class ChatRequestTypedDict(TypedDict): session_info: NotRequired[SessionInfoTypedDict] application_id: NotRequired[str] r"""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.""" + agent_id: NotRequired[str] + r"""The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used.""" stream: NotRequired[bool] r"""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.""" @@ -67,5 +69,8 @@ class ChatRequest(BaseModel): ) r"""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.""" + agent_id: Annotated[Optional[str], pydantic.Field(alias="agentId")] = None + r"""The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used.""" + stream: Optional[bool] = None r"""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.""" diff --git a/tests/mockserver/internal/sdk/models/components/chatrequest.go b/tests/mockserver/internal/sdk/models/components/chatrequest.go index d8ed29b3..28474404 100644 --- a/tests/mockserver/internal/sdk/models/components/chatrequest.go +++ b/tests/mockserver/internal/sdk/models/components/chatrequest.go @@ -18,6 +18,8 @@ type ChatRequest struct { SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` // 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. ApplicationID *string `json:"applicationId,omitempty"` + // The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. + AgentID *string `json:"agentId,omitempty"` // 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. Stream *bool `json:"stream,omitempty"` } @@ -85,6 +87,13 @@ func (o *ChatRequest) GetApplicationID() *string { return o.ApplicationID } +func (o *ChatRequest) GetAgentID() *string { + if o == nil { + return nil + } + return o.AgentID +} + func (o *ChatRequest) GetStream() *bool { if o == nil { return nil