Skip to content

Commit ef11214

Browse files
devlooped-botkzu
authored andcommitted
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Ignore *.local recursively devlooped/oss@a225b7a - Add readme template devlooped/oss@2cc4ada - Keep the --yes on dnx runfile devlooped/oss@9c2f8c7 # xai-org/xai-proto - Add `ExtendVideo` RPC and `reference_images` for Video Generation (#41) xai-org/xai-proto@43a1b6b - Update protos for video generation failure case (#38) xai-org/xai-proto@2b1a1fc - Add agent_count field to support multi-agent model configurations (#42) xai-org/xai-proto@6473565
1 parent 6d1b6ec commit ef11214

8 files changed

Lines changed: 261 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BenchmarkDotNet.Artifacts
1212
.idea
1313
local.settings.json
1414
.env
15+
*.local
1516

1617
*.suo
1718
*.sdf

.netconfig

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
weak
8181
[file ".gitignore"]
8282
url = https://github.com/devlooped/oss/blob/main/.gitignore
83-
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
84-
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
83+
sha = a225b7a9f609f26bcc24e0d84f663387be251a7d
84+
etag = 20a8b49d57024abbd85aac5b0020c30e5eb68e0384b2761e93727c8780c4a991
8585
weak
8686
[file "Directory.Build.rsp"]
8787
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -152,13 +152,13 @@
152152
weak
153153
[file "src/xAI.Protocol/chat.proto"]
154154
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto
155-
sha = 712e28ae9319e881d6dd6473d22566d61fe22854
156-
etag = d68802a822549776b7acdc0c03a226c913375f588a7938b48741ea5d1852ef02
155+
sha = 6473565631bba0e29fbc11dfb3a66a98dd72d496
156+
etag = 881e524631d7e6d7a7244f34bf8d99ad0c3dc149146c3a89d0bb626586f99c7f
157157
weak
158158
[file "src/xAI.Protocol/deferred.proto"]
159159
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/deferred.proto
160-
sha = 626a3a3f22d8aa11c7a185bf8902e7d415df0462
161-
etag = d47b84dddfc4252abbced302fde18ea8093933a3a8d5516350db596d3ae86595
160+
sha = 2b1a1fc74c463f55ec92af764d4b790f4def2a24
161+
etag = 246c0340096b0dbc754ceb4933bde0ebf92af049ebffb06ed1fef1840d04c46b
162162
weak
163163
[file "src/xAI.Protocol/documents.proto"]
164164
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/documents.proto
@@ -197,8 +197,8 @@
197197
weak
198198
[file "src/xAI.Protocol/video.proto"]
199199
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/video.proto
200-
sha = 1813f69cd0fafba12eea98996cb6da15f29396b9
201-
etag = 69bb5336a09ae73e22e5d1a8af2d65386953face7d0b57917478e56e1c2fc5c6
200+
sha = 43a1b6b731943b8f031c2f2d946f7183f0933ffd
201+
etag = 37562e78a6d64800b09c643632a33b6bc902955b491114bd5b6ec957d23d6e64
202202
weak
203203
[file "src/xAI.Protocol/google/protobuf/timestamp.proto"]
204204
url = https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto
@@ -220,3 +220,13 @@
220220
sha = 97921a5fc1d2685d30fb6e74b283a0a6d81660dc
221221
etag = dcadaf10862661d714d4738a8255af4e80344343b45f1fa53260ff4778e3e88b
222222
weak
223+
[file "oss.cs"]
224+
url = https://github.com/devlooped/oss/blob/main/oss.cs
225+
sha = 9c2f8c729d7cd3dd052b5a09d12fb1f3926247e5
226+
etag = e195cacdb0c6ea7ca768514ec94f8595d008c7f5aae805b39beec330895045e3
227+
weak
228+
[file "readme.tmp.md"]
229+
url = https://github.com/devlooped/oss/blob/main/readme.tmp.md
230+
sha = 2cc4ada8059b1e2e3f32089e67dab27a8ddeb7fb
231+
etag = c7c0694bd13d2d7fdc8b0530c80d5cf032cb9fdaaa5e1f814e951e9e6489746a
232+
weak

oss.cs

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// First run: dnx runfile https://github.com/devlooped/oss/blob/main/oss.cs --yes --alias oss
2+
// Subsequently: dnx runfile oss --yes
3+
#:package Spectre.Console@*
4+
#:package CliWrap@*
5+
6+
using System;
7+
using System.IO;
8+
using System.Net.Http;
9+
using System.Runtime.InteropServices;
10+
using System.Threading.Tasks;
11+
using CliWrap;
12+
using Spectre.Console;
13+
14+
string dotnet = Path.GetFullPath(
15+
Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "..", "..", "..",
16+
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"));
17+
18+
AnsiConsole.Write(new FigletText("devlooped oss").Color(Color.Green));
19+
AnsiConsole.WriteLine();
20+
21+
var projectName = AnsiConsole.Prompt(
22+
new TextPrompt<string>("[green]Project name[/]:")
23+
.PromptStyle("yellow")
24+
.ValidationErrorMessage("[red]Project name cannot be empty[/]")
25+
.Validate(v => !string.IsNullOrWhiteSpace(v)));
26+
27+
var repoName = AnsiConsole.Prompt(
28+
new TextPrompt<string>("[green]Repo name[/]:")
29+
.PromptStyle("yellow")
30+
.DefaultValue(projectName));
31+
32+
var packageId = AnsiConsole.Prompt(
33+
new TextPrompt<string>("[green]Package ID[/]:")
34+
.PromptStyle("yellow")
35+
.DefaultValue($"Devlooped.{projectName}"));
36+
37+
AnsiConsole.WriteLine();
38+
AnsiConsole.Write(new Rule("[yellow]Setting up OSS project[/]").RuleStyle("grey").LeftJustified());
39+
AnsiConsole.WriteLine();
40+
41+
await RunDotNet("file init https://github.com/devlooped/oss/blob/main/.netconfig", "Initializing dotnet file sync from devlooped/oss");
42+
await RunDotNet($"new classlib -n {projectName} -o src/{projectName} -f net10.0", $"Creating class library src/{projectName}");
43+
await RunDotNet($"new xunit -n Tests -o src/Tests -f net10.0", "Creating xUnit test project src/Tests");
44+
await RunDotNet($"add src/Tests/Tests.csproj reference src/{projectName}/{projectName}.csproj", $"Adding reference from Tests to {projectName}");
45+
await RunDotNet($"new solution -n {projectName}", $"Creating solution {projectName}.slnx");
46+
await RunDotNet($"sln {projectName}.slnx add src/{projectName}/{projectName}.csproj src/Tests/Tests.csproj", $"Adding projects to {projectName}.slnx");
47+
48+
await AnsiConsole.Status()
49+
.Spinner(Spinner.Known.Dots)
50+
.SpinnerStyle(Style.Parse("green"))
51+
.StartAsync("Downloading readme.md template...", async ctx =>
52+
{
53+
using var http = new HttpClient();
54+
var readmeContent = await http.GetStringAsync(
55+
"https://raw.githubusercontent.com/devlooped/oss/main/readme.tmp.md");
56+
57+
readmeContent = readmeContent
58+
.Replace("{{PROJECT_NAME}}", projectName)
59+
.Replace("{{PACKAGE_ID}}", packageId)
60+
.Replace("{{REPO_NAME}}", repoName);
61+
62+
await File.WriteAllTextAsync("readme.md", readmeContent);
63+
ctx.Status("Downloaded and processed readme.md");
64+
});
65+
66+
AnsiConsole.MarkupLine("[green]✓[/] Created [yellow]readme.md[/]");
67+
68+
await File.WriteAllTextAsync(
69+
Path.Combine("src", projectName, "readme.md"),
70+
$"""
71+
[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black&color=C9FF30)](osmfeula.txt)
72+
[![OSS](https://img.shields.io/github/license/devlooped/oss.svg?color=blue)](license.txt)
73+
[![GitHub](https://img.shields.io/badge/-source-181717.svg?logo=GitHub)](https://github.com/devlooped/{repoName})
74+
75+
<!-- include ../../readme.md#content -->
76+
77+
<!-- include https://github.com/devlooped/.github/raw/main/osmf.md -->
78+
79+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
80+
81+
<!-- exclude -->
82+
""");
83+
84+
AnsiConsole.WriteLine();
85+
AnsiConsole.Write(new Rule("[green]Done![/]").RuleStyle("grey").LeftJustified());
86+
AnsiConsole.WriteLine();
87+
AnsiConsole.MarkupLine($"[bold]Project:[/] [yellow]{projectName}[/]");
88+
AnsiConsole.MarkupLine($"[bold]Repo:[/] [yellow]{repoName}[/]");
89+
AnsiConsole.MarkupLine($"[bold]Package ID:[/] [yellow]{packageId}[/]");
90+
91+
async Task RunDotNet(string command, string description)
92+
{
93+
AnsiConsole.MarkupLine($"[grey]{Markup.Escape(description)}...[/]");
94+
await Cli.Wrap(dotnet)
95+
.WithArguments(command)
96+
.WithStandardOutputPipe(PipeTarget.ToStream(Console.OpenStandardOutput()))
97+
.WithStandardErrorPipe(PipeTarget.ToStream(Console.OpenStandardError()))
98+
.ExecuteAsync();
99+
AnsiConsole.MarkupLine($"[green]✓[/] {Markup.Escape(description)}");
100+
}

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,11 @@ Uses your own API Key.
439439
[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4&s=39 "4OTC")](https://github.com/4OTC)
440440
[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea&v=4&s=39 "domischell")](https://github.com/DominicSchell)
441441
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
442-
[![Michael Hagedorn](https://avatars.githubusercontent.com/u/61711586?u=8f653dfcb641e8c18cc5f78692ebc6bb3a0c92be&v=4&s=39 "Michael Hagedorn")](https://github.com/Eule02)
443442
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
444-
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=739e110e62a75870c981640447efa5eb2cb3bc8f&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
443+
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
445444
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
446445
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
446+
[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4&s=39 "Lars")](https://github.com/latonz)
447447

448448

449449
<!-- sponsors.md -->

readme.tmp.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# {{PROJECT_NAME}}
2+
3+
[![Version](https://img.shields.io/nuget/vpre/{{PACKAGE_ID}}.svg?color=royalblue)](https://www.nuget.org/packages/{{PACKAGE_ID}})
4+
[![Downloads](https://img.shields.io/nuget/dt/{{PACKAGE_ID}}.svg?color=darkmagenta)](https://www.nuget.org/packages/{{PACKAGE_ID}})
5+
[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black&color=C9FF30)](https://github.com/devlooped/oss/blob/main/osmfeula.txt)
6+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/devlooped/oss/blob/main/license.txt)
7+
8+
<!-- include https://github.com/devlooped/.github/raw/main/osmf.md -->
9+
## Open Source Maintenance Fee
10+
11+
To ensure the long-term sustainability of this project, users of this package who generate
12+
revenue must pay an [Open Source Maintenance Fee](https://opensourcemaintenancefee.org).
13+
While the source code is freely available under the terms of the [License](license.txt),
14+
this package and other aspects of the project require [adherence to the Maintenance Fee](osmfeula.txt).
15+
16+
To pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/devlooped) at the proper
17+
OSMF tier. A single fee covers all of [Devlooped packages](https://www.nuget.org/profiles/Devlooped).
18+
19+
<!-- https://github.com/devlooped/.github/raw/main/osmf.md -->
20+
<!-- #content -->
21+
## Usage
22+
*{{PROJECT_NAME}}*
23+
<!-- #content -->
24+
---
25+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
26+
# Sponsors
27+
28+
<!-- sponsors.md -->
29+
[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius)
30+
[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
31+
[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock)
32+
[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet)
33+
[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon)
34+
[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon)
35+
[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd&v=4&s=39 "Kori Francis")](https://github.com/kfrancis)
36+
[![Uno Platform](https://avatars.githubusercontent.com/u/52228309?v=4&s=39 "Uno Platform")](https://github.com/unoplatform)
37+
[![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41&v=4&s=39 "Reuben Swartz")](https://github.com/rbnswartz)
38+
[![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4&s=39 "Jacob Foshee")](https://github.com/jfoshee)
39+
[![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f&v=4&s=39 "")](https://github.com/Mrxx99)
40+
[![Eric Johnson](https://avatars.githubusercontent.com/u/26369281?u=41b560c2bc493149b32d384b960e0948c78767ab&v=4&s=39 "Eric Johnson")](https://github.com/eajhnsn1)
41+
[![Jonathan ](https://avatars.githubusercontent.com/u/5510103?u=98dcfbef3f32de629d30f1f418a095bf09e14891&v=4&s=39 "Jonathan ")](https://github.com/Jonathan-Hickey)
42+
[![Ken Bonny](https://avatars.githubusercontent.com/u/6417376?u=569af445b6f387917029ffb5129e9cf9f6f68421&v=4&s=39 "Ken Bonny")](https://github.com/KenBonny)
43+
[![Simon Cropp](https://avatars.githubusercontent.com/u/122666?v=4&s=39 "Simon Cropp")](https://github.com/SimonCropp)
44+
[![agileworks-eu](https://avatars.githubusercontent.com/u/5989304?v=4&s=39 "agileworks-eu")](https://github.com/agileworks-eu)
45+
[![Zheyu Shen](https://avatars.githubusercontent.com/u/4067473?v=4&s=39 "Zheyu Shen")](https://github.com/arsdragonfly)
46+
[![Vezel](https://avatars.githubusercontent.com/u/87844133?v=4&s=39 "Vezel")](https://github.com/vezel-dev)
47+
[![ChilliCream](https://avatars.githubusercontent.com/u/16239022?v=4&s=39 "ChilliCream")](https://github.com/ChilliCream)
48+
[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4&s=39 "4OTC")](https://github.com/4OTC)
49+
[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea&v=4&s=39 "domischell")](https://github.com/DominicSchell)
50+
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
51+
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
52+
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
53+
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
54+
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
55+
[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4&s=39 "Lars")](https://github.com/latonz)
56+
57+
58+
<!-- sponsors.md -->
59+
[![Sponsor this project](https://avatars.githubusercontent.com/devlooped-sponsor?s=118 "Sponsor this project")](https://github.com/sponsors/devlooped)
60+
61+
[Learn more about GitHub Sponsors](https://github.com/sponsors)
62+
63+
<!-- https://github.com/devlooped/sponsors/raw/main/footer.md -->

src/xAI.Protocol/chat.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ message GetCompletionsRequest {
166166

167167
// Allow the users to control what optional fields to be returned in the response.
168168
repeated IncludeOption include = 26;
169+
170+
// Number of agents to use for multi-agent models.
171+
// Only valid when model is a `multi-agent` model. Defaults to `AGENT_COUNT_UNSPECIFIED`.
172+
optional AgentCount agent_count = 29;
169173
}
170174

171175
message GetChatCompletionResponse {
@@ -543,6 +547,16 @@ enum ReasoningEffort {
543547
EFFORT_HIGH = 3;
544548
}
545549

550+
// Number of agents to use for multi-agent models.
551+
enum AgentCount {
552+
// Unspecified / unset value.
553+
AGENT_COUNT_UNSPECIFIED = 0;
554+
// Use 4 agents.
555+
AGENT_COUNT_4 = 1;
556+
// Use 16 agents.
557+
AGENT_COUNT_16 = 2;
558+
}
559+
546560
enum ToolMode {
547561
// Invalid tool mode.
548562
TOOL_MODE_INVALID = 0;

src/xAI.Protocol/deferred.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ enum DeferredStatus {
3131

3232
// The request is still being processed.
3333
PENDING = 3;
34+
35+
// The request failed due to an internal service error.
36+
// The error message is in the `error` field of the response.
37+
FAILED = 4;
3438
}

src/xAI.Protocol/video.proto

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,23 @@ message VideoUrlContent {
5858
// An API service for interaction with video generation models.
5959
service Video {
6060
// Create a video based on a text prompt and optionally an image.
61-
// If an image is provided, generates video with the image as the first frame (image-to-video).
62-
// If no image is provided, generates video from text only (text-to-video).
61+
// If an image is provided, generates video with the image as the first frame
62+
// (image-to-video). If no image is provided, generates video from text only
63+
// (text-to-video).
6364
//
64-
// This is an asynchronous operation. The method returns immediately with a request_id
65-
// that can be used to poll for the result using GetDeferredVideo.
65+
// This is an asynchronous operation. The method returns immediately with a
66+
// request_id that can be used to poll for the result using GetDeferredVideo.
6667
rpc GenerateVideo(GenerateVideoRequest) returns (StartDeferredResponse) {}
6768

68-
// Gets the result of a video generation started by calling `GenerateVideo`.
69-
rpc GetDeferredVideo(GetDeferredVideoRequest) returns (GetDeferredVideoResponse) {}
70-
}
69+
// Extend an existing video by generating continuation content.
70+
//
71+
// This is an asynchronous operation. The method returns immediately with a
72+
// request_id that can be used to poll for the result using GetDeferredVideo.
73+
rpc ExtendVideo(ExtendVideoRequest) returns (StartDeferredResponse) {}
7174

72-
// Output destination for generated video.
73-
message VideoOutput {
74-
// Signed URL to upload the generated video via HTTP PUT.
75-
string upload_url = 1;
75+
// Gets the result of a video generation started by calling `GenerateVideo` or
76+
// `ExtendVideo`.
77+
rpc GetDeferredVideo(GetDeferredVideoRequest) returns (GetDeferredVideoResponse) {}
7678
}
7779

7880
// Request message for generating a video.
@@ -104,6 +106,11 @@ message GenerateVideoRequest {
104106
// Optional resolution for video generation.
105107
// Defaults to 480p if not specified.
106108
optional VideoResolution resolution = 8;
109+
110+
// Optional reference images for reference-to-video (R2V) generation.
111+
// When provided (and `image` is not set), generates video using these images
112+
// as style/content references.
113+
repeated ImageUrlContent reference_images = 13;
107114
}
108115

109116
// Request for retrieving deferred video generation results.
@@ -120,8 +127,20 @@ message VideoResponse {
120127
// The model used to generate the video (ignoring aliases).
121128
string model = 2;
122129

123-
// The usage of the request.
130+
// Billing and cost information for this request.
124131
SamplingUsage usage = 3;
132+
133+
// Structured error describing why video generation failed.
134+
// Only present when the background generation encountered a failure
135+
// (either client error 4xx or server error 5xx).
136+
optional VideoError error = 6;
137+
138+
// Approximate completion percentage for the video generation task (0-100).
139+
// - When status is `PENDING`: progress is between 0-99, indicating current
140+
// completion.
141+
// - When status is `DONE`: progress is 100.
142+
// - When status is `FAILED`: progress is 0.
143+
int32 progress = 7;
125144
}
126145

127146
// Contains all data related to a generated video.
@@ -144,6 +163,33 @@ message GetDeferredVideoResponse {
144163
// Current status of the request.
145164
DeferredStatus status = 1;
146165

147-
// Response. Only present if `status=DONE`
166+
// Response. Only present if `status=DONE` or `status=FAILED`.
167+
// When failed, the `error` field in VideoResponse describes the failure.
148168
optional VideoResponse response = 2;
149169
}
170+
171+
// Structured error returned when video generation fails.
172+
message VideoError {
173+
// Machine-readable error code (e.g. "invalid_argument", "internal_error").
174+
string code = 1;
175+
// Human-readable error message describing the failure.
176+
string message = 2;
177+
}
178+
179+
// Request message for extending an existing video.
180+
message ExtendVideoRequest {
181+
// Prompt describing what should happen next in the video.
182+
string prompt = 1;
183+
184+
// Input video to extend. The extension continues from the end of this video.
185+
// Supports URL or base64-encoded video data.
186+
// Input video must be between 2 and 30 seconds long.
187+
VideoUrlContent video = 2;
188+
189+
// Name or alias of the video generation model to be used.
190+
string model = 3;
191+
192+
// Duration of the extension segment to generate in seconds (1-10).
193+
// Defaults to 6 seconds if not specified.
194+
optional int32 duration = 4;
195+
}

0 commit comments

Comments
 (0)