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
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,13 @@ partial void ProcessAgentEditJobResponseContent(
/// Descript will POST the job status (same format as [GET /jobs/{job_id}](#operation/getJob)) to this URL.<br/>
/// Example: https://example.com/webhooks/descript/job_callback
/// </param>
/// <param name="conversationId">
/// Conversation ID from a previous agent job to continue that conversation.<br/>
/// Requires `project_id` (a conversation belongs to an existing project).<br/>
/// When omitted, a new conversation is started. The `conversation_id` is returned<br/>
/// in the job result when the job completes.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </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 All @@ -749,6 +756,7 @@ partial void ProcessAgentEditJobResponseContent(
string? model = default,
global::Descript.AgentEditJobRequestTeamAccess? teamAccess = default,
string? callbackUrl = default,
global::System.Guid? conversationId = default,
global::Descript.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -761,6 +769,7 @@ partial void ProcessAgentEditJobResponseContent(
Prompt = prompt,
TeamAccess = teamAccess,
CallbackUrl = callbackUrl,
ConversationId = conversationId,
};

return await AgentEditJobAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ public partial interface IApiEndpointsClient
/// Descript will POST the job status (same format as [GET /jobs/{job_id}](#operation/getJob)) to this URL.<br/>
/// Example: https://example.com/webhooks/descript/job_callback
/// </param>
/// <param name="conversationId">
/// Conversation ID from a previous agent job to continue that conversation.<br/>
/// Requires `project_id` (a conversation belongs to an existing project).<br/>
/// When omitted, a new conversation is started. The `conversation_id` is returned<br/>
/// in the job result when the job completes.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </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 All @@ -124,6 +131,7 @@ public partial interface IApiEndpointsClient
string? model = default,
global::Descript.AgentEditJobRequestTeamAccess? teamAccess = default,
string? callbackUrl = default,
global::System.Guid? conversationId = default,
global::Descript.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ public sealed partial class AgentEditJobRequest
[global::System.Text.Json.Serialization.JsonPropertyName("callback_url")]
public string? CallbackUrl { get; set; }

/// <summary>
/// Conversation ID from a previous agent job to continue that conversation.<br/>
/// Requires `project_id` (a conversation belongs to an existing project).<br/>
/// When omitted, a new conversation is started. The `conversation_id` is returned<br/>
/// in the job result when the job completes.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </summary>
/// <example>a1b2c3d4-e5f6-7890-abcd-ef1234567890</example>
[global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")]
public global::System.Guid? ConversationId { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -121,6 +132,13 @@ public sealed partial class AgentEditJobRequest
/// Descript will POST the job status (same format as [GET /jobs/{job_id}](#operation/getJob)) to this URL.<br/>
/// Example: https://example.com/webhooks/descript/job_callback
/// </param>
/// <param name="conversationId">
/// Conversation ID from a previous agent job to continue that conversation.<br/>
/// Requires `project_id` (a conversation belongs to an existing project).<br/>
/// When omitted, a new conversation is started. The `conversation_id` is returned<br/>
/// in the job result when the job completes.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -131,7 +149,8 @@ public AgentEditJobRequest(
string? compositionId,
string? model,
global::Descript.AgentEditJobRequestTeamAccess? teamAccess,
string? callbackUrl)
string? callbackUrl,
global::System.Guid? conversationId)
{
this.ProjectId = projectId;
this.ProjectName = projectName;
Expand All @@ -140,6 +159,7 @@ public AgentEditJobRequest(
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.TeamAccess = teamAccess;
this.CallbackUrl = callbackUrl;
this.ConversationId = conversationId;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public sealed partial class AgentErrorResult
[global::System.Text.Json.Serialization.JsonPropertyName("error_code")]
public string? ErrorCode { get; set; }

/// <summary>
/// Conversation ID for this agent session, if one was created before the error occurred.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </summary>
/// <example>a1b2c3d4-e5f6-7890-abcd-ef1234567890</example>
[global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")]
public global::System.Guid? ConversationId { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -55,17 +63,23 @@ public sealed partial class AgentErrorResult
/// Machine-readable error code<br/>
/// Example: agent_execution_failed
/// </param>
/// <param name="conversationId">
/// Conversation ID for this agent session, if one was created before the error occurred.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public AgentErrorResult(
string errorMessage,
global::Descript.AgentErrorResultStatus status,
string? errorCode)
string? errorCode,
global::System.Guid? conversationId)
{
this.Status = status;
this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.ErrorCode = errorCode;
this.ConversationId = conversationId;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ public sealed partial class AgentSuccessResult
[global::System.Text.Json.Serialization.JsonPropertyName("ai_credits_used")]
public int? AiCreditsUsed { get; set; }

/// <summary>
/// Conversation ID for this agent session. Pass this value as `conversation_id` in a<br/>
/// subsequent [POST /jobs/agent](#operation/agentEditJob) request to continue the conversation.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </summary>
/// <example>a1b2c3d4-e5f6-7890-abcd-ef1234567890</example>
[global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")]
public global::System.Guid? ConversationId { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -80,6 +89,11 @@ public sealed partial class AgentSuccessResult
/// AI credits consumed by this operation<br/>
/// Example: 5
/// </param>
/// <param name="conversationId">
/// Conversation ID for this agent session. Pass this value as `conversation_id` in a<br/>
/// subsequent [POST /jobs/agent](#operation/agentEditJob) request to continue the conversation.<br/>
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -88,13 +102,15 @@ public AgentSuccessResult(
bool projectChanged,
global::Descript.AgentSuccessResultStatus status,
int? mediaSecondsUsed,
int? aiCreditsUsed)
int? aiCreditsUsed,
global::System.Guid? conversationId)
{
this.Status = status;
this.AgentResponse = agentResponse ?? throw new global::System.ArgumentNullException(nameof(agentResponse));
this.ProjectChanged = projectChanged;
this.MediaSecondsUsed = mediaSecondsUsed;
this.AiCreditsUsed = aiCreditsUsed;
this.ConversationId = conversationId;
}

/// <summary>
Expand Down
28 changes: 28 additions & 0 deletions src/libs/Descript/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,15 @@ paths:
Optional webhook URL to call when the job completes or fails.
Descript will POST the job status (same format as [GET /jobs/{job_id}](#operation/getJob)) to this URL.
example: https://example.com/webhooks/descript/job_callback
conversation_id:
type: string
format: uuid
description: |
Conversation ID from a previous agent job to continue that conversation.
Requires `project_id` (a conversation belongs to an existing project).
When omitted, a new conversation is started. The `conversation_id` is returned
in the job result when the job completes.
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
required:
- prompt
additionalProperties: false
Expand All @@ -815,6 +824,12 @@ paths:
project_id: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
composition_id: 39677a40-1c43-4c36-8449-46cfbc4de2b5
prompt: create a 30-second highlight reel with the best moments
continue_conversation:
summary: Continue a previous conversation
value:
project_id: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
prompt: now also add captions to the video
conversation_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
with_callback:
summary: Agent job with webhook callback
value:
Expand Down Expand Up @@ -2706,6 +2721,13 @@ components:
type: integer
description: AI credits consumed by this operation
example: 5
conversation_id:
type: string
format: uuid
description: |
Conversation ID for this agent session. Pass this value as `conversation_id` in a
subsequent [POST /jobs/agent](#operation/agentEditJob) request to continue the conversation.
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
required:
- status
- agent_response
Expand All @@ -2729,6 +2751,12 @@ components:
type: string
description: Machine-readable error code
example: agent_execution_failed
conversation_id:
type: string
format: uuid
description: |
Conversation ID for this agent session, if one was created before the error occurred.
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
required:
- status
- error_message
Expand Down