From 96fe12c6140abb6081e0250d7e1c7cc0d9f933d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 May 2026 02:58:13 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...lient.CreatePaasV4AudioTranscriptions.g.cs | 12 +- ...eatePaasV4AudioTranscriptionsAsStream.g.cs | 8 +- ....IZaiClient.CreatePaasV4LayoutParsing.g.cs | 6 +- .../ZAI.IZaiClient.CreatePaasV4Tokenizer.g.cs | 4 +- .../ZAI.IZaiClient.CreatePaasV4WebSearch.g.cs | 4 +- .../ZAI.Models.AudioTranscriptionRequest.g.cs | 8 +- .../ZAI.Models.ChatCompletionTextRequest.g.cs | 32 +- ...AI.Models.ChatCompletionVisionRequest.g.cs | 22 +- .../ZAI.Models.LayoutParsingRequest.g.cs | 14 +- .../ZAI.Models.TokenizerRequest.g.cs | 8 +- .../ZAI.Models.VideoCommonRequest.g.cs | 4 +- .../ZAI.Models.WebSearchRequest.g.cs | 8 +- ...lient.CreatePaasV4AudioTranscriptions.g.cs | 12 +- ...eatePaasV4AudioTranscriptionsAsStream.g.cs | 8 +- ...I.ZaiClient.CreatePaasV4LayoutParsing.g.cs | 6 +- .../ZAI.ZaiClient.CreatePaasV4Tokenizer.g.cs | 4 +- .../ZAI.ZaiClient.CreatePaasV4WebSearch.g.cs | 4 +- .../Generated/autosdk.generated-examples.json | 2 +- src/libs/ZAI/openapi.yaml | 320 ++++++------------ 19 files changed, 184 insertions(+), 302 deletions(-) diff --git a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptions.g.cs b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptions.g.cs index 192790f..e9947aa 100644 --- a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptions.g.cs +++ b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptions.g.cs @@ -54,10 +54,10 @@ public partial interface IZaiClient /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -98,10 +98,10 @@ public partial interface IZaiClient /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -141,10 +141,10 @@ public partial interface IZaiClient /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs index 185d391..e720a0b 100644 --- a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs +++ b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs @@ -41,10 +41,10 @@ public partial interface IZaiClient /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -85,10 +85,10 @@ public partial interface IZaiClient /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4LayoutParsing.g.cs b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4LayoutParsing.g.cs index f367c20..84a221e 100644 --- a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4LayoutParsing.g.cs +++ b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4LayoutParsing.g.cs @@ -57,12 +57,10 @@ public partial interface IZaiClient /// End page number for parsing when PDF is provided /// /// - /// Unique request identifier, automatically generated if not provided
- /// Example: req_123456789 + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// End user ID for abuse monitoring. Length: 6-128 characters
- /// Example: user_123456 + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4Tokenizer.g.cs b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4Tokenizer.g.cs index 19c8b32..85b6438 100644 --- a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4Tokenizer.g.cs +++ b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4Tokenizer.g.cs @@ -46,10 +46,10 @@ public partial interface IZaiClient /// List of tools the model can call. Supports up to `128` functions. /// /// - /// Passed by the client, must be unique. If empty, it will be generated by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique `ID` of the end user + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4WebSearch.g.cs b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4WebSearch.g.cs index 513656b..5dcc8b0 100644 --- a/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4WebSearch.g.cs +++ b/src/libs/ZAI/Generated/ZAI.IZaiClient.CreatePaasV4WebSearch.g.cs @@ -83,10 +83,10 @@ public partial interface IZaiClient /// `search_pro_jina` /// /// - /// User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.Models.AudioTranscriptionRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.AudioTranscriptionRequest.g.cs index 13e8ce8..52dd904 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.AudioTranscriptionRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.AudioTranscriptionRequest.g.cs @@ -57,13 +57,13 @@ public sealed partial class AudioTranscriptionRequest public bool? Stream { get; set; } /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } @@ -97,10 +97,10 @@ public sealed partial class AudioTranscriptionRequest /// Default Value: false /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// /// The model ID to invoke.
diff --git a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs index 12660cd..019147d 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs @@ -27,12 +27,6 @@ public sealed partial class ChatCompletionTextRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList> Messages { get; set; } - /// - /// Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] - public string? RequestId { get; set; } - /// /// When do_sample is true, sampling strategy is enabled; when do_sample is false, sampling strategy parameters such as temperature and top_p will not take effect. Default value is `true`.
/// Default Value: true
@@ -59,10 +53,10 @@ public sealed partial class ChatCompletionTextRequest /// /// Sampling temperature, controls the randomness of the output, must be a positive number within the range: `[0.0, 1.0]`. The GLM-5.1, GLM-5, GLM-4.7, GLM-4.6 series default value is `1.0`, GLM-4.5 series default value is `0.6`, GLM-4-32B-0414-128K default value is `0.75`.
- /// Default Value: 1
- /// Example: 1 + /// Default Value: 1F
+ /// Example: 1F ///
- /// 1 + /// 1F [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public float? Temperature { get; set; } @@ -117,6 +111,12 @@ public sealed partial class ChatCompletionTextRequest [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] public global::ZAI.ChatCompletionTextRequestResponseFormat? ResponseFormat { get; set; } + /// + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + public string? RequestId { get; set; } + /// /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// @@ -140,9 +140,6 @@ public sealed partial class ChatCompletionTextRequest /// /// The current conversation message list as the model’s prompt input, provided in JSON array format, e.g.,`{“role”: “user”, “content”: “Hello”}`. Possible message types include system messages, user messages, assistant messages, and tool messages. Note: The input must not consist of system messages or assistant messages only. /// - /// - /// Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default. - /// /// /// When do_sample is true, sampling strategy is enabled; when do_sample is false, sampling strategy parameters such as temperature and top_p will not take effect. Default value is `true`.
/// Default Value: true
@@ -158,8 +155,8 @@ public sealed partial class ChatCompletionTextRequest /// /// /// Sampling temperature, controls the randomness of the output, must be a positive number within the range: `[0.0, 1.0]`. The GLM-5.1, GLM-5, GLM-4.7, GLM-4.6 series default value is `1.0`, GLM-4.5 series default value is `0.6`, GLM-4-32B-0414-128K default value is `0.75`.
- /// Default Value: 1
- /// Example: 1 + /// Default Value: 1F
+ /// Example: 1F /// /// /// Another method of temperature sampling, value range is: `[0.01, 1.0]`. The GLM-5.1, GLM-5, GLM-4.7, GLM-4.6, GLM-4.5 series default value is `0.95`, GLM-4-32B-0414-128K default value is `0.9`.
@@ -187,6 +184,9 @@ public sealed partial class ChatCompletionTextRequest /// /// Specifies the response format of the model. Defaults to text. Supports two formats:{ "type": "text" } plain text mode, returns natural language text, { "type": "json_object" } JSON mode, returns valid JSON data. When using JSON mode, it’s recommended to clearly request JSON output in the prompt. /// + /// + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. + /// /// /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// @@ -196,7 +196,6 @@ public sealed partial class ChatCompletionTextRequest public ChatCompletionTextRequest( global::ZAI.ChatCompletionTextRequestModel model, global::System.Collections.Generic.IList> messages, - string? requestId, bool? doSample, bool? stream, global::ZAI.ChatThinking? thinking, @@ -208,11 +207,11 @@ public ChatCompletionTextRequest( global::ZAI.ChatCompletionTextRequestToolChoice? toolChoice, global::System.Collections.Generic.IList? stop, global::ZAI.ChatCompletionTextRequestResponseFormat? responseFormat, + string? requestId, string? userId) { this.Model = model; this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); - this.RequestId = requestId; this.DoSample = doSample; this.Stream = stream; this.Thinking = thinking; @@ -224,6 +223,7 @@ public ChatCompletionTextRequest( this.ToolChoice = toolChoice; this.Stop = stop; this.ResponseFormat = responseFormat; + this.RequestId = requestId; this.UserId = userId; } diff --git a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionVisionRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionVisionRequest.g.cs index 6a14c64..8fc4fbd 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionVisionRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionVisionRequest.g.cs @@ -27,12 +27,6 @@ public sealed partial class ChatCompletionVisionRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList> Messages { get; set; } - /// - /// Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] - public string? RequestId { get; set; } - /// /// When do_sample is true, sampling strategy is enabled; when do_sample is false, sampling strategy parameters such as temperature and top_p will not take effect. Default value is `true`.
/// Default Value: true
@@ -102,6 +96,12 @@ public sealed partial class ChatCompletionVisionRequest [global::System.Text.Json.Serialization.JsonPropertyName("stop")] public global::System.Collections.Generic.IList? Stop { get; set; } + /// + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + public string? RequestId { get; set; } + /// /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// @@ -125,9 +125,6 @@ public sealed partial class ChatCompletionVisionRequest /// /// The current conversation message list as the model’s prompt input, provided in JSON array format, e.g.,`{“role”: “user”, “content”: “Hello”}`. Possible message types include system messages, user messages. Note: The input must not consist of system or assistant messages only. /// - /// - /// Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default. - /// /// /// When do_sample is true, sampling strategy is enabled; when do_sample is false, sampling strategy parameters such as temperature and top_p will not take effect. Default value is `true`.
/// Default Value: true
@@ -164,6 +161,9 @@ public sealed partial class ChatCompletionVisionRequest /// /// Stop word list. Generation stops when the model encounters any specified string. Currently, only one stop word is supported, in the format ["stop_word1"]. /// + /// + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. + /// /// /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// @@ -173,7 +173,6 @@ public sealed partial class ChatCompletionVisionRequest public ChatCompletionVisionRequest( global::ZAI.ChatCompletionVisionRequestModel model, global::System.Collections.Generic.IList> messages, - string? requestId, bool? doSample, bool? stream, global::ZAI.ChatThinking? thinking, @@ -183,11 +182,11 @@ public ChatCompletionVisionRequest( global::System.Collections.Generic.IList? tools, global::ZAI.ChatCompletionVisionRequestToolChoice? toolChoice, global::System.Collections.Generic.IList? stop, + string? requestId, string? userId) { this.Model = model; this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); - this.RequestId = requestId; this.DoSample = doSample; this.Stream = stream; this.Thinking = thinking; @@ -197,6 +196,7 @@ public ChatCompletionVisionRequest( this.Tools = tools; this.ToolChoice = toolChoice; this.Stop = stop; + this.RequestId = requestId; this.UserId = userId; } diff --git a/src/libs/ZAI/Generated/ZAI.Models.LayoutParsingRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.LayoutParsingRequest.g.cs index 66e47e5..4899198 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.LayoutParsingRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.LayoutParsingRequest.g.cs @@ -53,18 +53,14 @@ public sealed partial class LayoutParsingRequest public int? EndPageId { get; set; } /// - /// Unique request identifier, automatically generated if not provided
- /// Example: req_123456789 + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. ///
- /// req_123456789 [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } /// - /// End user ID for abuse monitoring. Length: 6-128 characters
- /// Example: user_123456 + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. ///
- /// user_123456 [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } @@ -100,12 +96,10 @@ public sealed partial class LayoutParsingRequest /// End page number for parsing when PDF is provided /// /// - /// Unique request identifier, automatically generated if not provided
- /// Example: req_123456789 + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// End user ID for abuse monitoring. Length: 6-128 characters
- /// Example: user_123456 + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/ZAI/Generated/ZAI.Models.TokenizerRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.TokenizerRequest.g.cs index f1dc224..96b1963 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.TokenizerRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.TokenizerRequest.g.cs @@ -34,13 +34,13 @@ public sealed partial class TokenizerRequest public global::System.Collections.Generic.IList? Tools { get; set; } /// - /// Passed by the client, must be unique. If empty, it will be generated by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } /// - /// Unique `ID` of the end user + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } @@ -66,10 +66,10 @@ public sealed partial class TokenizerRequest /// List of tools the model can call. Supports up to `128` functions. /// /// - /// Passed by the client, must be unique. If empty, it will be generated by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique `ID` of the end user + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/ZAI/Generated/ZAI.Models.VideoCommonRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.VideoCommonRequest.g.cs index 4cec88b..872bb94 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.VideoCommonRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.VideoCommonRequest.g.cs @@ -9,7 +9,7 @@ namespace ZAI public sealed partial class VideoCommonRequest { /// - /// Provided by the client, must be unique; used to distinguish each request’s unique identifier. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } @@ -30,7 +30,7 @@ public sealed partial class VideoCommonRequest /// Initializes a new instance of the class. ///
/// - /// Provided by the client, must be unique; used to distinguish each request’s unique identifier. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// /// Unique ID of the end-user, assists the platform in intervening in end-user violations, generating illegal or inappropriate information, or other abusive behaviors. ID length requirement: minimum `6` characters, maximum `128` characters. diff --git a/src/libs/ZAI/Generated/ZAI.Models.WebSearchRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.WebSearchRequest.g.cs index 09aa48f..75ceddc 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.WebSearchRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.WebSearchRequest.g.cs @@ -63,13 +63,13 @@ public sealed partial class WebSearchRequest public global::ZAI.WebSearchRequestSearchRecencyFilter? SearchRecencyFilter { get; set; } /// - /// User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } /// - /// Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } @@ -112,10 +112,10 @@ public sealed partial class WebSearchRequest /// `search_pro_jina` /// /// - /// User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// /// The search engine code to call.
diff --git a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptions.g.cs b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptions.g.cs index a68470b..eda1575 100644 --- a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptions.g.cs +++ b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptions.g.cs @@ -604,10 +604,10 @@ request.Filename is null /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -667,10 +667,10 @@ request.Filename is null /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -1205,10 +1205,10 @@ request.Filename is null /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs index 41d863c..b6480cf 100644 --- a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs +++ b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4AudioTranscriptionsAsStream.g.cs @@ -508,10 +508,10 @@ request.Filename is null /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -576,10 +576,10 @@ request.Filename is null /// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items. /// /// - /// Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4LayoutParsing.g.cs b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4LayoutParsing.g.cs index 0950ce8..69e28c0 100644 --- a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4LayoutParsing.g.cs +++ b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4LayoutParsing.g.cs @@ -502,12 +502,10 @@ partial void ProcessCreatePaasV4LayoutParsingResponseContent( /// End page number for parsing when PDF is provided /// /// - /// Unique request identifier, automatically generated if not provided
- /// Example: req_123456789 + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// End user ID for abuse monitoring. Length: 6-128 characters
- /// Example: user_123456 + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4Tokenizer.g.cs b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4Tokenizer.g.cs index 02893bf..0c100d9 100644 --- a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4Tokenizer.g.cs +++ b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4Tokenizer.g.cs @@ -491,10 +491,10 @@ partial void ProcessCreatePaasV4TokenizerResponseContent( /// List of tools the model can call. Supports up to `128` functions. /// /// - /// Passed by the client, must be unique. If empty, it will be generated by default. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique `ID` of the end user + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4WebSearch.g.cs b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4WebSearch.g.cs index 9a4e2c0..178adba 100644 --- a/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4WebSearch.g.cs +++ b/src/libs/ZAI/Generated/ZAI.ZaiClient.CreatePaasV4WebSearch.g.cs @@ -539,10 +539,10 @@ partial void ProcessCreatePaasV4WebSearchResponseContent( /// `search_pro_jina` /// /// - /// User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one. + /// Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default. /// /// - /// Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters. + /// Unique ID for the end user, 6–128 characters. Avoid using sensitive information. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/ZAI/Generated/autosdk.generated-examples.json b/src/libs/ZAI/Generated/autosdk.generated-examples.json index 23dbb51..d6e1bc5 100644 --- a/src/libs/ZAI/Generated/autosdk.generated-examples.json +++ b/src/libs/ZAI/Generated/autosdk.generated-examples.json @@ -39,7 +39,7 @@ "Slug": "create-a-chat-completion-model-that-generates-ai-replies-for-given-conversation-messages-it-supports-multimodal-inputs-text-images-audio-video-file-offers-configurable-parameters-like-temperature-max-tokens-tool-use-and-supports-both-streaming-and-non-streaming-output-modes", "Description": "Create a chat completion model that generates AI replies for given conversation messages. It supports multimodal inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens, tool use), and supports both streaming and non-streaming output modes.", "Language": "csharp", - "Code": "using var client = new ZaiClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::ZAI.OneOf\u003Cglobal::ZAI.ChatCompletionTextRequest, global::ZAI.ChatCompletionVisionRequest\u003E\u003E(\n @\u0022{\n \u0022\u0022model\u0022\u0022: \u0022\u0022glm-5.1\u0022\u0022,\n \u0022\u0022messages\u0022\u0022: [\n {\n \u0022\u0022role\u0022\u0022: \u0022\u0022system\u0022\u0022,\n \u0022\u0022content\u0022\u0022: \u0022\u0022You are a useful AI assistant.\u0022\u0022\n },\n {\n \u0022\u0022role\u0022\u0022: \u0022\u0022user\u0022\u0022,\n \u0022\u0022content\u0022\u0022: \u0022\u0022Please tell us about the development of artificial intelligence.\u0022\u0022\n }\n ],\n \u0022\u0022temperature\u0022\u0022: 1,\n \u0022\u0022stream\u0022\u0022: false\n}\u0022)!;\n\nvar response = await client.CreatePaasV4ChatCompletionsAsync(\n request: request\n);", + "Code": "using var client = new ZaiClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::ZAI.OneOf\u003Cglobal::ZAI.ChatCompletionTextRequest, global::ZAI.ChatCompletionVisionRequest\u003E\u003E(\n @\u0022{\n \u0022\u0022model\u0022\u0022: \u0022\u0022glm-5.1\u0022\u0022,\n \u0022\u0022messages\u0022\u0022: [\n {\n \u0022\u0022role\u0022\u0022: \u0022\u0022system\u0022\u0022,\n \u0022\u0022content\u0022\u0022: \u0022\u0022You are a useful AI assistant.\u0022\u0022\n },\n {\n \u0022\u0022role\u0022\u0022: \u0022\u0022user\u0022\u0022,\n \u0022\u0022content\u0022\u0022: \u0022\u0022Please tell us about the development of artificial intelligence.\u0022\u0022\n }\n ],\n \u0022\u0022temperature\u0022\u0022: 1.0,\n \u0022\u0022stream\u0022\u0022: false\n}\u0022)!;\n\nvar response = await client.CreatePaasV4ChatCompletionsAsync(\n request: request\n);", "Format": "sdk", "OperationId": "createPaasV4ChatCompletions", "Setup": "This example assumes \u0060using ZAI;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." diff --git a/src/libs/ZAI/openapi.yaml b/src/libs/ZAI/openapi.yaml index f7a336f..dd91c16 100644 --- a/src/libs/ZAI/openapi.yaml +++ b/src/libs/ZAI/openapi.yaml @@ -63,7 +63,7 @@ "content": "Please tell us about the development of artificial intelligence." } ], - "temperature": 1, + "temperature": 1.0, "stream": false } }, @@ -76,7 +76,7 @@ "content": "Write a poem about spring." } ], - "temperature": 1, + "temperature": 1.0, "stream": true } }, @@ -1230,9 +1230,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "user" - ], + "enum": ["user"], "description": "Role of the message author", "default": "user" }, @@ -1246,10 +1244,7 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, { "title": "System Message", @@ -1257,9 +1252,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "system" - ], + "enum": ["system"], "description": "Role of the message author", "default": "system" }, @@ -1273,11 +1266,9 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, + { "title": "Assistant Message", "type": "object", @@ -1285,9 +1276,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "assistant" - ], + "enum": ["assistant"], "description": "Role of the message author", "default": "assistant" }, @@ -1313,11 +1302,7 @@ "type": { "type": "string", "description": "Tool type, supports web_search, retrieval, function", - "enum": [ - "function", - "web_search", - "retrieval" - ] + "enum": ["function", "web_search", "retrieval"] }, "function": { "type": "object", @@ -1332,22 +1317,14 @@ "description": "Function parameters, JSON format string" } }, - "required": [ - "name", - "arguments" - ] + "required": ["name", "arguments"] } }, - "required": [ - "id", - "type" - ] + "required": ["id", "type"] } } }, - "required": [ - "role" - ] + "required": ["role"] }, { "title": "Tool Message", @@ -1355,9 +1332,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "tool" - ], + "enum": ["tool"], "description": "Role of the message author", "default": "tool" }, @@ -1375,20 +1350,12 @@ "description": "Indicates the tool call ID corresponding to this message" } }, - "required": [ - "role", - "content", - "tool_call_id" - ] + "required": ["role", "content", "tool_call_id"] } ] }, "minItems": 1 }, - "request_id": { - "type": "string", - "description": "Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default." - }, "do_sample": { "type": "boolean", "example": true, @@ -1408,10 +1375,10 @@ "type": "number", "description": "Sampling temperature, controls the randomness of the output, must be a positive number within the range: `[0.0, 1.0]`. The GLM-5.1, GLM-5, GLM-4.7, GLM-4.6 series default value is `1.0`, GLM-4.5 series default value is `0.6`, GLM-4-32B-0414-128K default value is `0.75`.", "format": "float", - "example": 1, - "default": 1, - "minimum": 0, - "maximum": 1 + "example": 1.0, + "default": 1.0, + "minimum": 0.0, + "maximum": 1.0 }, "top_p": { "type": "number", @@ -1420,7 +1387,7 @@ "example": 0.95, "default": 0.95, "minimum": 0.01, - "maximum": 1 + "maximum": 1.0 }, "max_tokens": { "type": "integer", @@ -1478,17 +1445,18 @@ "properties": { "type": { "type": "string", - "enum": [ - "text", - "json_object" - ], + "enum": ["text", "json_object"], "default": "text", "description": "Output format type: text for plain text, json_object for JSON-formatted output." } }, - "required": [ - "type" - ] + "required": ["type"] + }, + "request_id": { + "type": "string", + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", @@ -1530,9 +1498,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "user" - ], + "enum": ["user"], "description": "Role of the message author", "default": "user" }, @@ -1553,10 +1519,7 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, { "title": "System Message", @@ -1564,9 +1527,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "system" - ], + "enum": ["system"], "description": "Role of the message author", "default": "system" }, @@ -1580,11 +1541,9 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, + { "title": "Assistant Message", "type": "object", @@ -1592,9 +1551,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "assistant" - ], + "enum": ["assistant"], "description": "Role of the message author", "default": "assistant" }, @@ -1608,18 +1565,12 @@ ] } }, - "required": [ - "role" - ] + "required": ["role"] } ] }, "minItems": 1 }, - "request_id": { - "type": "string", - "description": "Passed by the user side, needs to be unique; used to distinguish each request. If not provided by the user side, the platform will generate one by default." - }, "do_sample": { "type": "boolean", "example": true, @@ -1641,8 +1592,8 @@ "format": "float", "example": 0.8, "default": 0.8, - "minimum": 0, - "maximum": 1 + "minimum": 0.0, + "maximum": 1.0 }, "top_p": { "type": "number", @@ -1651,7 +1602,7 @@ "example": 0.6, "default": 0.6, "minimum": 0.01, - "maximum": 1 + "maximum": 1.0 }, "max_tokens": { "type": "integer", @@ -1691,6 +1642,12 @@ }, "maxItems": 4 }, + "request_id": { + "type": "string", + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 + }, "user_id": { "type": "string", "description": "Unique ID for the end user, 6–128 characters. Avoid using sensitive information.", @@ -1707,9 +1664,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "text" - ], + "enum": ["text"], "description": "Content type is text", "default": "text" }, @@ -1718,10 +1673,7 @@ "description": "Text content" } }, - "required": [ - "type", - "text" - ], + "required": ["type", "text"], "additionalProperties": false }, { @@ -1730,9 +1682,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "image_url" - ], + "enum": ["image_url"], "description": "Content type is image URL", "default": "image_url" }, @@ -1745,16 +1695,11 @@ "description": "Image URL or Base64 encoding. Image size limit is under 5M per image, with pixels not exceeding 6000*6000. Supports jpg, png, jpeg formats." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "image_url" - ], + "required": ["type", "image_url"], "additionalProperties": false }, { @@ -1763,9 +1708,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "input_audio" - ], + "enum": ["input_audio"], "description": "Content type is audio input", "default": "input_audio" }, @@ -1780,34 +1723,24 @@ "format": { "type": "string", "description": "Audio file format, supports wav and mp3", - "enum": [ - "wav", - "mp3" - ] + "enum": ["wav", "mp3"] } }, - "required": [ - "data", - "format" - ], + "required": ["data", "format"], "additionalProperties": false } }, - "required": [ - "type", - "input_audio" - ], + "required": ["type", "input_audio"], "additionalProperties": false }, { "title": "Video", "type": "object", + "properties": { "type": { "type": "string", - "enum": [ - "video_url" - ], + "enum": ["video_url"], "description": "Content type is video URL", "default": "video_url" }, @@ -1820,16 +1753,11 @@ "description": "Video URL address." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "video_url" - ], + "required": ["type", "video_url"], "additionalProperties": false }, { @@ -1838,9 +1766,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "file_url" - ], + "enum": ["file_url"], "description": "Content type is file URL", "default": "file_url" }, @@ -1853,16 +1779,11 @@ "description": "File URL address. Supports formats such as PDF and Word, with a maximum of 50 pages for parsing." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "file_url" - ], + "required": ["type", "file_url"], "additionalProperties": false } ] @@ -1875,9 +1796,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "text" - ], + "enum": ["text"], "description": "Content type is text", "default": "text" }, @@ -1886,10 +1805,7 @@ "description": "Text content" } }, - "required": [ - "type", - "text" - ], + "required": ["type", "text"], "additionalProperties": false }, { @@ -1898,9 +1814,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "image_url" - ], + "enum": ["image_url"], "description": "Content type is image URL", "default": "image_url" }, @@ -1913,27 +1827,21 @@ "description": "Image URL or Base64 encoding. Image size limit is under 5M per image, with pixels not exceeding 6000*6000. GLM-5V GLM4.6V series are limited to 150 sheets, GLM4.5V limit 50 sheets. Supports jpg, png, jpeg formats." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "image_url" - ], + "required": ["type", "image_url"], "additionalProperties": false }, { "title": "Video", "type": "object", + "properties": { "type": { "type": "string", - "enum": [ - "video_url" - ], + "enum": ["video_url"], "description": "Content type is video URL", "default": "video_url" }, @@ -1946,16 +1854,11 @@ "description": "Video URL address.The video size is limited to within 200 MB, GLM-5V GLM4.6V series are limited to 2 videos, GLM4.5V limit 1 video, and the format supports `mp4`,`mkv`,`mov`." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "video_url" - ], + "required": ["type", "video_url"], "additionalProperties": false }, { @@ -1964,9 +1867,7 @@ "properties": { "type": { "type": "string", - "enum": [ - "file_url" - ], + "enum": ["file_url"], "description": "Content type is file URL, not support passing both the `file_url` and `image_url` or `video_url` parameters at the same time.", "default": "file_url" }, @@ -1979,16 +1880,11 @@ "description": "File URL address. Only GLM-5V-Turbo, GLM-4.6V, GLM-4.5V supported. Supports formats such as pdf、txt、word、jsonl、xlsx、pptx, with a maximum of 50." } }, - "required": [ - "url" - ], + "required": ["url"], "additionalProperties": false } }, - "required": [ - "type", - "file_url" - ], + "required": ["type", "file_url"], "additionalProperties": false } ] @@ -2775,7 +2671,9 @@ "properties": { "request_id": { "type": "string", - "description": "Provided by the client, must be unique; used to distinguish each request’s unique identifier. If not provided by the client, the platform will generate one by default." + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", @@ -3068,11 +2966,15 @@ }, "request_id": { "type": "string", - "description": "Passed by the client, must be unique. A unique identifier to distinguish each request. If not provided by the client, the platform will generate one by default." + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", - "description": "A unique `ID` for the end user, helping the platform intervene in illegal activities, generation of illegal or inappropriate content, or other abusive behaviors by end users. `ID` length requirement: at least `6` characters, at most `128` characters." + "description": "Unique ID for the end user, 6–128 characters. Avoid using sensitive information.", + "minLength": 6, + "maxLength": 128 } } }, @@ -3157,9 +3059,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "user" - ], + "enum": ["user"], "description": "Role of the message author", "default": "user" }, @@ -3180,10 +3080,7 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, { "title": "System Message", @@ -3191,9 +3088,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "system" - ], + "enum": ["system"], "description": "Role of the message author", "default": "system" }, @@ -3207,11 +3102,9 @@ ] } }, - "required": [ - "role", - "content" - ] + "required": ["role", "content"] }, + { "title": "Assistant Message", "type": "object", @@ -3219,9 +3112,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "assistant" - ], + "enum": ["assistant"], "description": "Role of the message author", "default": "assistant" }, @@ -3235,9 +3126,7 @@ ] } }, - "required": [ - "role" - ] + "required": ["role"] } ] }, @@ -3256,11 +3145,15 @@ }, "request_id": { "type": "string", - "description": "Passed by the client, must be unique. If empty, it will be generated by default." + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", - "description": "Unique `ID` of the end user" + "description": "Unique ID for the end user, 6–128 characters. Avoid using sensitive information.", + "minLength": 6, + "maxLength": 128 } } }, @@ -3348,11 +3241,15 @@ }, "request_id": { "type": "string", - "description": "User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one." + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", - "description": "Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters." + "description": "Unique ID for the end user, 6–128 characters. Avoid using sensitive information.", + "minLength": 6, + "maxLength": 128 } }, "required": [ @@ -4288,15 +4185,15 @@ }, "request_id": { "type": "string", - "description": "Unique request identifier, automatically generated if not provided", - "example": "req_123456789" + "description": "Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.", + "minLength": 6, + "maxLength": 64 }, "user_id": { "type": "string", - "description": "End user ID for abuse monitoring. Length: 6-128 characters", + "description": "Unique ID for the end user, 6–128 characters. Avoid using sensitive information.", "minLength": 6, - "maxLength": 128, - "example": "user_123456" + "maxLength": 128 } } }, @@ -4413,12 +4310,7 @@ }, "minItems": 4, "maxItems": 4, - "example": [ - 0.1, - 0.1, - 0.5, - 0.3 - ] + "example": [0.1, 0.1, 0.5, 0.3] }, "content": { "type": "string", @@ -4513,4 +4405,4 @@ } } } -} \ No newline at end of file +}