Skip to content

Commit 6535199

Browse files
committed
Update sync from new upstream files
* Add proto definitions for Imagine API (xai-org/xai-proto#31) # Changes - Extend Image API with aspect ratio/resolution options and usage reporting - Add Video API proto for deferred generation with aspect ratio/resolution and usage * Add proto definitions for Batch API (xai-org/xai-proto#30) Add support for multi-reference image editing (xai-org/xai-proto#35) - Add a new `images` parameter to the `GenerateImageRequest` message for multi-reference image editing
1 parent 15f353b commit 6535199

8 files changed

Lines changed: 765 additions & 29 deletions

File tree

.netconfig

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,36 @@
120120
weak
121121
[file "src/xAI.Protocol/."]
122122
url = https://github.com/xai-org/xai-proto/tree/main/proto/xai/api/v1/
123+
[file "src/xAI.Tests/Extensions/Attributes.cs"]
124+
url = https://github.com/devlooped/catbag/blob/main/Xunit/Attributes.cs
125+
sha = 40914971d4d6b42d6f8a90923b131136f7e609a5
126+
etag = c77e7b435ce1df06fb60a3b0e15a0833d8e45d4d19f366c6184140ebb4814b1a
127+
weak
128+
[file "osmfeula.txt"]
129+
url = https://github.com/devlooped/.github/blob/main/osmfeula.txt
130+
sha = 666a2a7c315f72199c418f11482a950fc69a8901
131+
etag = 91ea15c07bfd784036c6ca931f5b2df7e9767b8367146d96c79caef09d63899f
132+
weak
133+
[file "src/xAI/Extensions/Throw.cs"]
134+
url = https://github.com/devlooped/catbag/blob/main/System/Throw.cs
135+
sha = 3012d56be7554c483e5c5d277144c063969cada9
136+
etag = 43c81c6c6dcdf5baee40a9e3edc5e871e473e6c954c901b82bb87a3a48888ea0
137+
weak
138+
[file "src/Grok/Extensions/AIContentExtensions.cs"]
139+
url = https://github.com/dotnet/extensions/blob/main/src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents/AIContentExtensions.cs
140+
sha = c221abef4b4f1bf3fcf0bda27490e8b26bb479f4
141+
etag = 510868eaae58941d71cdcb5416f44ebf4436a22d342ca5838172127b04252fe0
142+
weak
123143
[file "src/xAI.Protocol/auth.proto"]
124144
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/auth.proto
125145
sha = 626a3a3f22d8aa11c7a185bf8902e7d415df0462
126146
etag = ea074da4f67b67ebf0e8a0b2114a1720d6b3176a8324aa1cfd22740e78049d80
127147
weak
148+
[file "src/xAI.Protocol/batch.proto"]
149+
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/batch.proto
150+
sha = 4724d8352feb7d4f13059c1bfd27ef0362f96684
151+
etag = 49810c4625d4995815164f4a519f526768386bfaf43d05b346e7fcd5cbe55289
152+
weak
128153
[file "src/xAI.Protocol/chat.proto"]
129154
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto
130155
sha = 712e28ae9319e881d6dd6473d22566d61fe22854
@@ -147,8 +172,8 @@
147172
weak
148173
[file "src/xAI.Protocol/image.proto"]
149174
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/image.proto
150-
sha = 626a3a3f22d8aa11c7a185bf8902e7d415df0462
151-
etag = 72140789ccabd84bb51e0120c4b86f78ffa03de324410887034c8c45684004c6
175+
sha = d67bcf3e661aa9641af9750632fa1c38ea974da1
176+
etag = 3ea27e240320c26d14b8c64d00f236c078127ebdb6fa957efc49232dfd75a20c
152177
weak
153178
[file "src/xAI.Protocol/models.proto"]
154179
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/models.proto
@@ -170,6 +195,11 @@
170195
sha = 362749661fa2d340d234ad372fab920538897821
171196
etag = bd66823dfde1a2fff714d3712104bef886baf22da9f94c7505acee37d3ff67fd
172197
weak
198+
[file "src/xAI.Protocol/video.proto"]
199+
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/video.proto
200+
sha = 1813f69cd0fafba12eea98996cb6da15f29396b9
201+
etag = 69bb5336a09ae73e22e5d1a8af2d65386953face7d0b57917478e56e1c2fc5c6
202+
weak
173203
[file "src/xAI.Protocol/google/protobuf/timestamp.proto"]
174204
url = https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto
175205
sha = 71f247a9cf5ddcd310d8aa5e05cea2acc72f9a7f
@@ -180,23 +210,13 @@
180210
sha = 407aa2d9319f5db12964540810b446fecc22d419
181211
etag = 0dca55f20a72d3279554837f4eba867a1de37fe0f4a7535c2d9bc43867361cc5
182212
weak
183-
[file "src/xAI.Tests/Extensions/Attributes.cs"]
184-
url = https://github.com/devlooped/catbag/blob/main/Xunit/Attributes.cs
185-
sha = 40914971d4d6b42d6f8a90923b131136f7e609a5
186-
etag = c77e7b435ce1df06fb60a3b0e15a0833d8e45d4d19f366c6184140ebb4814b1a
187-
weak
188-
[file "osmfeula.txt"]
189-
url = https://github.com/devlooped/.github/blob/main/osmfeula.txt
190-
sha = 666a2a7c315f72199c418f11482a950fc69a8901
191-
etag = 91ea15c07bfd784036c6ca931f5b2df7e9767b8367146d96c79caef09d63899f
192-
weak
193-
[file "src/xAI/Extensions/Throw.cs"]
194-
url = https://github.com/devlooped/catbag/blob/main/System/Throw.cs
195-
sha = 3012d56be7554c483e5c5d277144c063969cada9
196-
etag = 43c81c6c6dcdf5baee40a9e3edc5e871e473e6c954c901b82bb87a3a48888ea0
213+
[file "src/xAI.Protocol/google/rpc/status.proto"]
214+
url = https://github.com/googleapis/api-common-protos/blob/main/google/rpc/status.proto
215+
sha = cd3a6559b3ec6e81d47a311b1ba8a22c6096ff84
216+
etag = a8339d219bc4269194ad4b2fed7660637ad1d9aad5c6be7940c7dee171b45627
197217
weak
198-
[file "src/Grok/Extensions/AIContentExtensions.cs"]
199-
url = https://github.com/dotnet/extensions/blob/main/src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents/AIContentExtensions.cs
200-
sha = c221abef4b4f1bf3fcf0bda27490e8b26bb479f4
201-
etag = 510868eaae58941d71cdcb5416f44ebf4436a22d342ca5838172127b04252fe0
218+
[file "src/xAI.Protocol/google/protobuf/any.proto"]
219+
url = https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto
220+
sha = 97921a5fc1d2685d30fb6e74b283a0a6d81660dc
221+
etag = dcadaf10862661d714d4738a8255af4e80344343b45f1fa53260ff4778e3e88b
202222
weak

src/protofix.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222

2323
/// <summary>Check and fix imports in .proto files.</summary>
2424
/// <para name="dir">Optional directory, defaults to current directory.</para>
25-
static int FixProto(bool dryRun, [Argument] string? dir = default)
25+
static int FixProto(bool dryRun, bool debug, [Argument] string? dir = default)
2626
{
27+
if (debug)
28+
System.Diagnostics.Debugger.Launch();
29+
2730
dir ??= Directory.GetCurrentDirectory();
2831
var regex = ImportExpr();
2932
var result = 0;
@@ -42,11 +45,12 @@ static int FixProto(bool dryRun, [Argument] string? dir = default)
4245
{
4346
var path = match.Groups[1].Value;
4447
var baseDir = Path.GetDirectoryName(file)!;
45-
if (File.Exists(Path.Combine(baseDir, path)))
48+
if (File.Exists(Path.Combine(baseDir, path)) ||
49+
File.Exists(Path.Combine(dir, path)))
4650
{
4751
AnsiConsole.MarkupLine($":check_mark_button: {Path.GetRelativePath(dir, file)} [lime]{path}[/]");
4852
continue;
49-
}
53+
}
5054

5155
if (File.Exists(Path.Combine(baseDir, Path.GetFileName(path))))
5256
{

0 commit comments

Comments
 (0)