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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions src/libs/ZAI/Generated/ZAI.AutoSDKHttpResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

#nullable enable

namespace ZAI
{
/// <summary>
/// Represents a successful HTTP response with status code and headers.
/// </summary>
public partial class AutoSDKHttpResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers)
: this(
statusCode: statusCode,
headers: headers,
requestUri: null)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
global::System.Uri? requestUri)
{
StatusCode = statusCode;
Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
RequestUri = requestUri;
}

/// <summary>
/// Gets the HTTP status code.
/// </summary>
public global::System.Net.HttpStatusCode StatusCode { get; }
/// <summary>
/// Gets the response headers.
/// </summary>
public global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> Headers { get; }
/// <summary>
/// Gets the final request URI associated with the response.
/// </summary>
public global::System.Uri? RequestUri { get; }

internal static global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> CreateHeaders(
global::System.Net.Http.HttpResponseMessage response)
{
response = response ?? throw new global::System.ArgumentNullException(nameof(response));

var headers = global::System.Linq.Enumerable.ToDictionary(
response.Headers,
static header => header.Key,
static header => (global::System.Collections.Generic.IEnumerable<string>)global::System.Linq.Enumerable.ToArray(header.Value),
global::System.StringComparer.OrdinalIgnoreCase);

if (response.Content?.Headers == null)
{
return headers;
}

foreach (var header in response.Content.Headers)
{
if (headers.TryGetValue(header.Key, out var existingValues))
{
headers[header.Key] = global::System.Linq.Enumerable.ToArray(
global::System.Linq.Enumerable.Concat(existingValues, header.Value));
}
else
{
headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value);
}
}

return headers;
}
}

/// <summary>
/// Represents a successful HTTP response with status code, headers, and body.
/// </summary>
public partial class AutoSDKHttpResponse<T> : AutoSDKHttpResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse{T}"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
T body)
: this(
statusCode: statusCode,
headers: headers,
requestUri: null,
body: body)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse{T}"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
global::System.Uri? requestUri,
T body)
: base(statusCode, headers, requestUri)
{
Body = body;
}

/// <summary>
/// Gets the response body.
/// </summary>
public T Body { get; }
}
}
20 changes: 20 additions & 0 deletions src/libs/ZAI/Generated/ZAI.IZaiClient.CreateAgents.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ public partial interface IZaiClient
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.OneOf<global::ZAI.TranslationAgentResponse, global::ZAI.SpecialEffectsVideosAgentResponse?, global::ZAI.GlmSlideAgentResponse>>> CreateAgentsAsResponseAsync(

global::ZAI.OneOf<global::ZAI.TranslationAgentRequest, global::ZAI.SpecialEffectsVideosAgentRequest, global::ZAI.GlmSlideAgentRequest> request,
global::ZAI.CreateAgentsAcceptLanguage? acceptLanguage = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// General Translation: General Translation API provides large model-based multilingual translation services, including general translation, paraphrase translation, two-step translation, and three-pass translation strategies. It supports automatic language detection, glossary customization, translation suggestions, and streaming output. Users only need to call the Translation API, input the text to be processed, specify the source language (auto-detection supported) and target language to receive high-quality translation results. <br/>
/// Popular Special Effects Videos: Popular special effects videos are intelligent templates launched based on trending features from pan-entertainment platforms, designed to precisely adapt to short video creative production needs. Currently, three effect templates are available: `French Kiss`, `Body Shake Dance`, and `Sexy Me`. After selecting a template, users only need to upload an image and enter corresponding prompts to generate a special effects video. <br/>
/// GLM Slide/Poster Agent: An intelligent creation agent built for working people and creators. It goes beyond traditional engineering-style assembly tools—supporting one-click generation of slides or posters from natural language instructions. By natively integrating content generation with layout aesthetics and design conventions, it helps you quickly produce polished, professional-grade materials while lowering design barriers and boosting creative efficiency.
/// </summary>
/// <param name="acceptLanguage">
/// Config desired response language for HTTP requests.<br/>
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down
18 changes: 18 additions & 0 deletions src/libs/ZAI/Generated/ZAI.IZaiClient.CreateAgentsAsyncResult.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ public partial interface IZaiClient
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.CommonAgentResultResponse>> CreateAgentsAsyncResultAsResponseAsync(

global::ZAI.CommonAgentResultRequest request,
global::ZAI.CreateAgentsAsyncResultAcceptLanguage? acceptLanguage = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// This endpoint is used to query the result of an asynchronous request.
/// </summary>
/// <param name="acceptLanguage">
/// Config desired response language for HTTP requests.<br/>
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="agentId">
/// Agent ID: `vidu_template_agent`.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ public partial interface IZaiClient
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.GlmSlideAgentConversationResponse>> CreateAgentsConversationAsResponseAsync(

global::ZAI.GlmSlideAgentConversationRequest request,
global::ZAI.CreateAgentsConversationAcceptLanguage? acceptLanguage = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// This endpoint is used to query the agent conversation history.Only support slides_glm_agent
/// </summary>
/// <param name="acceptLanguage">
/// Config desired response language for HTTP requests.<br/>
/// Default Value: en-US,en<br/>
/// Example: en-US,en
/// </param>
/// <param name="agentId">
/// Agent ID
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IZaiClient
/// Generate Image (Async)<br/>
/// Use the [GLM-Image](/guides/image/glm-image) series models to generate high-quality images from text prompts. Through quick and accurate understanding of user text descriptions, `AI` image expression becomes more precise and personalized. Only supports `GLM-Image` model.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.AsyncResponse>> CreatePaasV4AsyncImagesGenerationsAsResponseAsync(

global::ZAI.AsyncCreateImageRequest request,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Generate Image (Async)<br/>
/// Use the [GLM-Image](/guides/image/glm-image) series models to generate high-quality images from text prompts. Through quick and accurate understanding of user text descriptions, `AI` image expression becomes more precise and personalized. Only supports `GLM-Image` model.
/// </summary>
/// <param name="model">
/// Model code<br/>
/// Example: glm-image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IZaiClient
/// Speech to Text<br/>
/// Use the [GLM-ASR-2512](/guides/audio/glm-asr-2512) model to transcribe audio files into text, supporting multiple languages and real-time streaming transcription.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.AudioTranscriptionResponse>> CreatePaasV4AudioTranscriptionsAsResponseAsync(

global::ZAI.AudioTranscriptionRequest request,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Speech to Text<br/>
/// Use the [GLM-ASR-2512](/guides/audio/glm-asr-2512) model to transcribe audio files into text, supporting multiple languages and real-time streaming transcription.
/// </summary>
/// <param name="file">
/// The audio file to be transcribed. Supported audio file formats: `.wav / .mp3`. Specifications: file size ≤ `25 MB`, audio duration ≤ `30 seconds`.
/// </param>
Expand Down Expand Up @@ -60,5 +73,92 @@ public partial interface IZaiClient
string? userId = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Speech to Text<br/>
/// Use the [GLM-ASR-2512](/guides/audio/glm-asr-2512) model to transcribe audio files into text, supporting multiple languages and real-time streaming transcription.
/// </summary>
/// <param name="file">
/// The audio file to be transcribed. Supported audio file formats: `.wav / .mp3`. Specifications: file size ≤ `25 MB`, audio duration ≤ `30 seconds`.
/// </param>
/// <param name="filename">
/// The audio file to be transcribed. Supported audio file formats: `.wav / .mp3`. Specifications: file size ≤ `25 MB`, audio duration ≤ `30 seconds`.
/// </param>
/// <param name="fileBase64">
/// Base64 encoded audio file. Only one of file_base64 or file needs to be provided (if both are provided, file takes precedence).
/// </param>
/// <param name="model">
/// The model ID to invoke.<br/>
/// Default Value: glm-asr-2512
/// </param>
/// <param name="prompt">
/// In long text scenarios, you can provide previous transcription results as context. Recommended to be less than 8000 characters.
/// </param>
/// <param name="hotwords">
/// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items.
/// </param>
/// <param name="requestId">
/// 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.
/// </param>
/// <param name="userId">
/// 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.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AudioTranscriptionResponse> CreatePaasV4AudioTranscriptionsAsync(
global::System.IO.Stream file,
string filename,
string? fileBase64 = default,
global::ZAI.AudioTranscriptionRequestModel model = global::ZAI.AudioTranscriptionRequestModel.GlmAsr2512,
string? prompt = default,
global::System.Collections.Generic.IList<string>? hotwords = default,
string? requestId = default,
string? userId = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Speech to Text<br/>
/// Use the [GLM-ASR-2512](/guides/audio/glm-asr-2512) model to transcribe audio files into text, supporting multiple languages and real-time streaming transcription.
/// </summary>
/// <param name="file">
/// The audio file to be transcribed. Supported audio file formats: `.wav / .mp3`. Specifications: file size ≤ `25 MB`, audio duration ≤ `30 seconds`.
/// </param>
/// <param name="filename">
/// The audio file to be transcribed. Supported audio file formats: `.wav / .mp3`. Specifications: file size ≤ `25 MB`, audio duration ≤ `30 seconds`.
/// </param>
/// <param name="fileBase64">
/// Base64 encoded audio file. Only one of file_base64 or file needs to be provided (if both are provided, file takes precedence).
/// </param>
/// <param name="model">
/// The model ID to invoke.<br/>
/// Default Value: glm-asr-2512
/// </param>
/// <param name="prompt">
/// In long text scenarios, you can provide previous transcription results as context. Recommended to be less than 8000 characters.
/// </param>
/// <param name="hotwords">
/// Hotword list to improve recognition accuracy for domain-specific vocabulary. Format example: ["person_name","place_name"]. Recommended not to exceed 100 items.
/// </param>
/// <param name="requestId">
/// 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.
/// </param>
/// <param name="userId">
/// 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.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ZAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ZAI.AutoSDKHttpResponse<global::ZAI.AudioTranscriptionResponse>> CreatePaasV4AudioTranscriptionsAsResponseAsync(
global::System.IO.Stream file,
string filename,
string? fileBase64 = default,
global::ZAI.AudioTranscriptionRequestModel model = global::ZAI.AudioTranscriptionRequestModel.GlmAsr2512,
string? prompt = default,
global::System.Collections.Generic.IList<string>? hotwords = default,
string? requestId = default,
string? userId = default,
global::ZAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Loading