diff --git a/.netconfig b/.netconfig index 9e10d73..bba6f22 100644 --- a/.netconfig +++ b/.netconfig @@ -147,13 +147,13 @@ weak [file "src/xAI.Protocol/batch.proto"] url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/batch.proto - sha = 4724d8352feb7d4f13059c1bfd27ef0362f96684 - etag = 49810c4625d4995815164f4a519f526768386bfaf43d05b346e7fcd5cbe55289 + sha = 9700be4bfddcb77db9a3d7fb3b69c5e47d704f22 + etag = 960f0b54fdd30c1680f801e5a1bf53c95438154c0850cb28ef614d808d53e8fe weak [file "src/xAI.Protocol/chat.proto"] url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto - sha = e0c743ba0dcd0a7f9b71a4a0d846c6ff3a9b7e4a - etag = 8656b4676c39de9d83c9dd8d102e3fce04df98f940536166baf41f893ba56f5d + sha = c9345abd85649ecb5b27fe8708f573b4ab9d6971 + etag = a64a560fdac1cb6d349d38b19a58605fa59169879f3d6d517518e573fd137b8c weak [file "src/xAI.Protocol/deferred.proto"] url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/deferred.proto @@ -235,3 +235,4 @@ url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/files.proto etag = 4c91f851b288a225acfc1173f2f8853a1b550da1e97d2fdcec99debb5f8fac43 weak + sha = 0c0f5353aa7ab2a4ffea310f9d9364ed5c424af2 diff --git a/readme.md b/readme.md index 21a3ee9..fbb297e 100644 --- a/readme.md +++ b/readme.md @@ -614,7 +614,6 @@ Uses your own API Key. [![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius) [![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc) -[![Khamza Davletov](https://avatars.githubusercontent.com/u/13615108?u=11b0038e255cdf9d1940fbb9ae9d1d57115697ab&v=4&s=39 "Khamza Davletov")](https://github.com/khamza85) [![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock) [![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet) [![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon) diff --git a/src/xAI.Protocol/batch.proto b/src/xAI.Protocol/batch.proto index fc25b31..3de2103 100644 --- a/src/xAI.Protocol/batch.proto +++ b/src/xAI.Protocol/batch.proto @@ -1,12 +1,13 @@ syntax = "proto3"; -option csharp_namespace = "xAI.Protocol"; package xai_api; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -import "chat.proto"; +import "xai/api/v1/chat.proto"; +import "xai/api/v1/image.proto"; +import "xai/api/v1/video.proto"; // An API service for processing batch requests asynchronously at lower priority than chat service. service BatchMgmt { @@ -66,6 +67,10 @@ message Batch { // Cost breakdown for processed requests. BatchCostBreakdown cost_breakdown = 9; + + // File ID of the uploaded JSONL input file (from Files API). Only set + // when the batch was created via file upload. + optional string input_file_id = 10; } // Holds aggregate information about the current state of a batch process. @@ -121,15 +126,25 @@ message BatchRequest { oneof request { // A completion request to send for processing in the batch. GetCompletionsRequest completion_request = 2; + // An image generation or editing request to send for processing in the batch. + GenerateImageRequest image_request = 3; + // A video generation request to send for processing in the batch. + GenerateVideoRequest video_request = 4; + // A video extension request to send for processing in the batch. + ExtendVideoRequest video_extension_request = 5; } } -// A container for the completion response that is returned in a `BatchResult`. +// A container for the response that is returned in a `BatchResult`. message BatchResultData { // The response from the batch request. oneof response { // A completion response that has finished processing in the batch. GetChatCompletionResponse completion_response = 2; + // An image generation response that has finished processing in the batch. + ImageResponse image_response = 3; + // A video generation response that has finished processing in the batch. + VideoResponse video_response = 4; } } @@ -183,6 +198,10 @@ message BatchRequestMetadata { message CreateBatchRequest { // The name of the batch to be created. string name = 1; + + // Optional file ID of a JSONL input file (uploaded via the Files API). + // When provided, the batch will be populated from the file's contents. + string input_file_id = 2; } // ------------------------------------------------------------------------------------------------ @@ -249,6 +268,9 @@ message ListBatchRequestMetadataRequest { // Optional pagination token to retrieve a specific page. Provided by `pagination_token` in `ListBatchRequestMetadataResponse`. optional string pagination_token = 3; + + // Optional filter by request state. If empty, all states are returned. + repeated BatchRequestMetadata.State status = 4; } // Response with the metadata of batch requests within a batch. diff --git a/src/xAI.Protocol/chat.proto b/src/xAI.Protocol/chat.proto index 49b9760..70e0c06 100644 --- a/src/xAI.Protocol/chat.proto +++ b/src/xAI.Protocol/chat.proto @@ -1,14 +1,13 @@ syntax = "proto3"; -option csharp_namespace = "xAI.Protocol"; package xai_api; import "google/protobuf/timestamp.proto"; -import "deferred.proto"; -import "documents.proto"; -import "image.proto"; -import "sample.proto"; -import "usage.proto"; +import "xai/api/v1/deferred.proto"; +import "xai/api/v1/documents.proto"; +import "xai/api/v1/image.proto"; +import "xai/api/v1/sample.proto"; +import "xai/api/v1/usage.proto"; // An API that exposes our language models via a Chat interface. service Chat { @@ -572,6 +571,7 @@ enum ReasoningEffort { EFFORT_LOW = 1; EFFORT_MEDIUM = 2; EFFORT_HIGH = 3; + EFFORT_NONE = 4; } // Number of agents to use for multi-agent models.