diff --git a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs index 019147d..997da9e 100644 --- a/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs +++ b/src/libs/ZAI/Generated/ZAI.Models.ChatCompletionTextRequest.g.cs @@ -53,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: 1F
- /// Example: 1F + /// Default Value: 1
+ /// Example: 1 ///
- /// 1F + /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public float? Temperature { get; set; } @@ -155,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: 1F
- /// Example: 1F + /// Default Value: 1
+ /// Example: 1 /// /// /// 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`.
diff --git a/src/libs/ZAI/Generated/autosdk.generated-examples.json b/src/libs/ZAI/Generated/autosdk.generated-examples.json index d6e1bc5..23dbb51 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.0,\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,\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 8aaea19..572c17e 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.0, + "temperature": 1, "stream": false } }, @@ -76,7 +76,7 @@ "content": "Write a poem about spring." } ], - "temperature": 1.0, + "temperature": 1, "stream": true } }, @@ -1230,7 +1230,9 @@ "properties": { "role": { "type": "string", - "enum": ["user"], + "enum": [ + "user" + ], "description": "Role of the message author", "default": "user" }, @@ -1244,7 +1246,10 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, { "title": "System Message", @@ -1252,7 +1257,9 @@ "properties": { "role": { "type": "string", - "enum": ["system"], + "enum": [ + "system" + ], "description": "Role of the message author", "default": "system" }, @@ -1266,9 +1273,11 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, - { "title": "Assistant Message", "type": "object", @@ -1276,7 +1285,9 @@ "properties": { "role": { "type": "string", - "enum": ["assistant"], + "enum": [ + "assistant" + ], "description": "Role of the message author", "default": "assistant" }, @@ -1302,7 +1313,11 @@ "type": { "type": "string", "description": "Tool type, supports web_search, retrieval, function", - "enum": ["function", "web_search", "retrieval"] + "enum": [ + "function", + "web_search", + "retrieval" + ] }, "function": { "type": "object", @@ -1317,14 +1332,22 @@ "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", @@ -1332,7 +1355,9 @@ "properties": { "role": { "type": "string", - "enum": ["tool"], + "enum": [ + "tool" + ], "description": "Role of the message author", "default": "tool" }, @@ -1350,7 +1375,11 @@ "description": "Indicates the tool call ID corresponding to this message" } }, - "required": ["role", "content", "tool_call_id"] + "required": [ + "role", + "content", + "tool_call_id" + ] } ] }, @@ -1375,10 +1404,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.0, - "default": 1.0, - "minimum": 0.0, - "maximum": 1.0 + "example": 1, + "default": 1, + "minimum": 0, + "maximum": 1 }, "top_p": { "type": "number", @@ -1387,7 +1416,7 @@ "example": 0.95, "default": 0.95, "minimum": 0.01, - "maximum": 1.0 + "maximum": 1 }, "max_tokens": { "type": "integer", @@ -1445,12 +1474,17 @@ "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", @@ -1498,7 +1532,9 @@ "properties": { "role": { "type": "string", - "enum": ["user"], + "enum": [ + "user" + ], "description": "Role of the message author", "default": "user" }, @@ -1519,7 +1555,10 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, { "title": "System Message", @@ -1527,7 +1566,9 @@ "properties": { "role": { "type": "string", - "enum": ["system"], + "enum": [ + "system" + ], "description": "Role of the message author", "default": "system" }, @@ -1541,9 +1582,11 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, - { "title": "Assistant Message", "type": "object", @@ -1551,7 +1594,9 @@ "properties": { "role": { "type": "string", - "enum": ["assistant"], + "enum": [ + "assistant" + ], "description": "Role of the message author", "default": "assistant" }, @@ -1565,7 +1610,9 @@ ] } }, - "required": ["role"] + "required": [ + "role" + ] } ] }, @@ -1592,8 +1639,8 @@ "format": "float", "example": 0.8, "default": 0.8, - "minimum": 0.0, - "maximum": 1.0 + "minimum": 0, + "maximum": 1 }, "top_p": { "type": "number", @@ -1602,7 +1649,7 @@ "example": 0.6, "default": 0.6, "minimum": 0.01, - "maximum": 1.0 + "maximum": 1 }, "max_tokens": { "type": "integer", @@ -1664,7 +1711,9 @@ "properties": { "type": { "type": "string", - "enum": ["text"], + "enum": [ + "text" + ], "description": "Content type is text", "default": "text" }, @@ -1673,7 +1722,10 @@ "description": "Text content" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, { @@ -1682,7 +1734,9 @@ "properties": { "type": { "type": "string", - "enum": ["image_url"], + "enum": [ + "image_url" + ], "description": "Content type is image URL", "default": "image_url" }, @@ -1695,11 +1749,16 @@ "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 }, { @@ -1708,7 +1767,9 @@ "properties": { "type": { "type": "string", - "enum": ["input_audio"], + "enum": [ + "input_audio" + ], "description": "Content type is audio input", "default": "input_audio" }, @@ -1723,24 +1784,34 @@ "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" }, @@ -1753,11 +1824,16 @@ "description": "Video URL address." } }, - "required": ["url"], + "required": [ + "url" + ], "additionalProperties": false } }, - "required": ["type", "video_url"], + "required": [ + "type", + "video_url" + ], "additionalProperties": false }, { @@ -1766,7 +1842,9 @@ "properties": { "type": { "type": "string", - "enum": ["file_url"], + "enum": [ + "file_url" + ], "description": "Content type is file URL", "default": "file_url" }, @@ -1779,11 +1857,16 @@ "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 } ] @@ -1796,7 +1879,9 @@ "properties": { "type": { "type": "string", - "enum": ["text"], + "enum": [ + "text" + ], "description": "Content type is text", "default": "text" }, @@ -1805,7 +1890,10 @@ "description": "Text content" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, { @@ -1814,7 +1902,9 @@ "properties": { "type": { "type": "string", - "enum": ["image_url"], + "enum": [ + "image_url" + ], "description": "Content type is image URL", "default": "image_url" }, @@ -1827,21 +1917,27 @@ "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" }, @@ -1854,11 +1950,16 @@ "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 }, { @@ -1867,7 +1968,9 @@ "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" }, @@ -1880,11 +1983,16 @@ "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 } ] @@ -3059,7 +3167,9 @@ "properties": { "role": { "type": "string", - "enum": ["user"], + "enum": [ + "user" + ], "description": "Role of the message author", "default": "user" }, @@ -3080,7 +3190,10 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, { "title": "System Message", @@ -3088,7 +3201,9 @@ "properties": { "role": { "type": "string", - "enum": ["system"], + "enum": [ + "system" + ], "description": "Role of the message author", "default": "system" }, @@ -3102,9 +3217,11 @@ ] } }, - "required": ["role", "content"] + "required": [ + "role", + "content" + ] }, - { "title": "Assistant Message", "type": "object", @@ -3112,7 +3229,9 @@ "properties": { "role": { "type": "string", - "enum": ["assistant"], + "enum": [ + "assistant" + ], "description": "Role of the message author", "default": "assistant" }, @@ -3126,7 +3245,9 @@ ] } }, - "required": ["role"] + "required": [ + "role" + ] } ] }, @@ -4310,7 +4431,12 @@ }, "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", @@ -4405,4 +4531,4 @@ } } } -} +} \ No newline at end of file