From fe171674f3dcea2a77306177a3939741b9c99f6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 10 Jun 2026 22:46:45 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...AssistantsCancelARunCommandApiCommand.g.cs | 1 - ...istantsCreateMessageCommandApiCommand.g.cs | 13 +++-- .../AssistantsCreateRunCommandApiCommand.g.cs | 41 +++++++------- ...tsCreateThreadAndRunCommandApiCommand.g.cs | 39 +++++++------- ...sistantsCreateThreadCommandApiCommand.g.cs | 15 +++--- ...istantsDeleteMessageCommandApiCommand.g.cs | 1 - ...sistantsDeleteThreadCommandApiCommand.g.cs | 1 - ...sistantsListMessagesCommandApiCommand.g.cs | 1 - ...sistantsListRunStepsCommandApiCommand.g.cs | 1 - .../AssistantsListRunsCommandApiCommand.g.cs | 1 - ...istantsModifyMessageCommandApiCommand.g.cs | 11 ++-- .../AssistantsModifyRunCommandApiCommand.g.cs | 11 ++-- ...sistantsModifyThreadCommandApiCommand.g.cs | 13 +++-- ...tantsRetrieveMessageCommandApiCommand.g.cs | 1 - ...ssistantsRetrieveRunCommandApiCommand.g.cs | 1 - ...tantsRetrieveRunStepCommandApiCommand.g.cs | 1 - ...stantsRetrieveThreadCommandApiCommand.g.cs | 1 - ...bmitToolOutputsToRunCommandApiCommand.g.cs | 11 ++-- .../AudioCreateSpeechCommandApiCommand.g.cs | 29 +++++----- ...ranscriptionAsStreamCommandApiCommand.g.cs | 30 ++++++----- ...oCreateTranscriptionCommandApiCommand.g.cs | 30 ++++++----- ...dioCreateTranslationCommandApiCommand.g.cs | 15 +++--- .../AudioCreateVoiceCommandApiCommand.g.cs | 1 - ...ioCreateVoiceConsentCommandApiCommand.g.cs | 1 - ...ioDeleteVoiceConsentCommandApiCommand.g.cs | 1 - ...dioListVoiceConsentsCommandApiCommand.g.cs | 1 - ...RetrieveVoiceConsentCommandApiCommand.g.cs | 1 - ...ioUpdateVoiceConsentCommandApiCommand.g.cs | 1 - ...ditLogsListAuditLogsCommandApiCommand.g.cs | 1 - .../BatchCancelBatchCommandApiCommand.g.cs | 1 - .../BatchCreateBatchCommandApiCommand.g.cs | 15 +++--- .../BatchListBatchesCommandApiCommand.g.cs | 1 - .../BatchRetrieveBatchCommandApiCommand.g.cs | 1 - .../CancelChatSessionCommandApiCommand.g.cs | 1 - ...catesForOrganizationCommandApiCommand.g.cs | 1 - ...rtificatesForProjectCommandApiCommand.g.cs | 1 - ...catesForOrganizationCommandApiCommand.g.cs | 1 - ...rtificatesForProjectCommandApiCommand.g.cs | 1 - ...tesDeleteCertificateCommandApiCommand.g.cs | 1 - ...icatesGetCertificateCommandApiCommand.g.cs | 1 - ...nizationCertificatesCommandApiCommand.g.cs | 1 - ...tProjectCertificatesCommandApiCommand.g.cs | 1 - ...tesModifyCertificateCommandApiCommand.g.cs | 11 ++-- ...tesUploadCertificateCommandApiCommand.g.cs | 11 ++-- ...atCompletionAsStreamCommandApiCommand.g.cs | 9 ++-- ...CreateChatCompletionCommandApiCommand.g.cs | 9 ++-- ...DeleteChatCompletionCommandApiCommand.g.cs | 1 - ...hatGetChatCompletionCommandApiCommand.g.cs | 1 - .../ChatGetChatMessagesCommandApiCommand.g.cs | 1 - ...tListChatCompletionsCommandApiCommand.g.cs | 1 - ...UpdateChatCompletionCommandApiCommand.g.cs | 11 ++-- .../CompactAResponseCommandApiCommand.g.cs | 31 ++++++----- ...ionsCreateCompletionCommandApiCommand.g.cs | 43 ++++++++------- ...sCreateAConversationCommandApiCommand.g.cs | 13 +++-- ...ersationsCreateItemsCommandApiCommand.g.cs | 1 - ...sDeleteAConversationCommandApiCommand.g.cs | 1 - ...rsationsDeleteAnItemCommandApiCommand.g.cs | 1 - ...nversationsListItemsCommandApiCommand.g.cs | 1 - ...etrieveAConversationCommandApiCommand.g.cs | 1 - ...ationsRetrieveAnItemCommandApiCommand.g.cs | 1 - ...sUpdateAConversationCommandApiCommand.g.cs | 11 ++-- .../CreateAdminApiKeyCommandApiCommand.g.cs | 1 - ...CreateChatKitSessionCommandApiCommand.g.cs | 15 +++--- .../CreateContainerCommandApiCommand.g.cs | 19 ++++--- .../CreateContainerFileCommandApiCommand.g.cs | 15 +++--- ...izationDataRetentionCommandApiCommand.g.cs | 1 - ...ProjectDataRetentionCommandApiCommand.g.cs | 1 - ...izationDataRetentionCommandApiCommand.g.cs | 1 - ...ProjectDataRetentionCommandApiCommand.g.cs | 1 - .../DeleteAContainerCommandApiCommand.g.cs | 1 - ...DeleteAContainerFileCommandApiCommand.g.cs | 1 - .../DeleteAdminApiKeyCommandApiCommand.g.cs | 1 - .../DeleteChatKitThreadCommandApiCommand.g.cs | 1 - ...ingsCreateEmbeddingsCommandApiCommand.g.cs | 27 +++++----- .../EvalsCancelEvalRunCommandApiCommand.g.cs | 1 - .../EvalsCreateEvalCommandApiCommand.g.cs | 13 +++-- .../EvalsCreateEvalRunCommandApiCommand.g.cs | 13 +++-- .../EvalsDeleteAnEvalCommandApiCommand.g.cs | 1 - .../EvalsDeleteEvalRunCommandApiCommand.g.cs | 1 - .../EvalsGetAnEvalCommandApiCommand.g.cs | 1 - .../EvalsGetAnEvalRunCommandApiCommand.g.cs | 1 - ...utputItemOfAnEvalRunCommandApiCommand.g.cs | 1 - ...etEvalRunOutputItemsCommandApiCommand.g.cs | 1 - .../EvalsGetEvalRunsCommandApiCommand.g.cs | 1 - .../EvalsListEvalsCommandApiCommand.g.cs | 1 - .../EvalsUpdateAnEvalCommandApiCommand.g.cs | 13 +++-- .../FilesDeleteFileCommandApiCommand.g.cs | 1 - .../FilesListFilesCommandApiCommand.g.cs | 1 - .../FilesRetrieveFileCommandApiCommand.g.cs | 1 - ...sRetrieveFileContentCommandApiCommand.g.cs | 1 - .../FilesUploadFileCommandApiCommand.g.cs | 18 +++---- ...ningCancelFineTuningCommandApiCommand.g.cs | 1 - ...heckpointPermissionsCommandApiCommand.g.cs | 1 - ...gCreateFineTuningJobCommandApiCommand.g.cs | 21 ++++---- ...CheckpointPermissionCommandApiCommand.g.cs | 1 - ...heckpointPermissionsCommandApiCommand.g.cs | 1 - ...ineTuningCheckpointsCommandApiCommand.g.cs | 1 - ...ListFineTuningEventsCommandApiCommand.g.cs | 1 - ...ngListFineTuningJobsCommandApiCommand.g.cs | 1 - ...uningPauseFineTuningCommandApiCommand.g.cs | 1 - ...ningResumeFineTuningCommandApiCommand.g.cs | 1 - ...etrieveFineTuningJobCommandApiCommand.g.cs | 1 - .../FineTuningRunGraderCommandApiCommand.g.cs | 11 ++-- ...TuningValidateGraderCommandApiCommand.g.cs | 1 - .../GetInputTokenCountsCommandApiCommand.g.cs | 43 ++++++++------- ...anizationRoleToGroupCommandApiCommand.g.cs | 1 - ...ationRoleAssignmentsCommandApiCommand.g.cs | 1 - ...roupOrganizationRoleCommandApiCommand.g.cs | 1 - ...izationRoleFromGroupCommandApiCommand.g.cs | 1 - ...oupUsersAddGroupUserCommandApiCommand.g.cs | 1 - ...pUsersListGroupUsersCommandApiCommand.g.cs | 1 - ...UsersRemoveGroupUserCommandApiCommand.g.cs | 1 - ...ersRetrieveGroupUserCommandApiCommand.g.cs | 1 - .../GroupsCreateGroupCommandApiCommand.g.cs | 1 - .../GroupsDeleteGroupCommandApiCommand.g.cs | 1 - .../GroupsListGroupsCommandApiCommand.g.cs | 1 - .../GroupsRetrieveGroupCommandApiCommand.g.cs | 1 - .../GroupsUpdateGroupCommandApiCommand.g.cs | 1 - ...ostedToolPermissionsCommandApiCommand.g.cs | 54 +++++++++---------- ...ostedToolPermissionsCommandApiCommand.g.cs | 1 - ...sCreateImageAsStreamCommandApiCommand.g.cs | 36 +++++++------ .../ImagesCreateImageCommandApiCommand.g.cs | 36 +++++++------ ...ateImageEditAsStreamCommandApiCommand.g.cs | 38 ++++++------- ...magesCreateImageEditCommandApiCommand.g.cs | 38 ++++++------- ...CreateImageVariationCommandApiCommand.g.cs | 19 ++++--- .../InvitesCreateInviteCommandApiCommand.g.cs | 11 ++-- .../InvitesDeleteInviteCommandApiCommand.g.cs | 1 - .../InvitesListInvitesCommandApiCommand.g.cs | 1 - ...nvitesRetrieveInviteCommandApiCommand.g.cs | 1 - ...ionAndProjectApiKeysCommandApiCommand.g.cs | 1 - ...stChatKitThreadItemsCommandApiCommand.g.cs | 1 - .../ListChatKitThreadsCommandApiCommand.g.cs | 1 - .../ListContainerFilesCommandApiCommand.g.cs | 1 - .../ListContainersCommandApiCommand.g.cs | 1 - ...eleteAFineTunedModelCommandApiCommand.g.cs | 1 - .../ModelsListModelsCommandApiCommand.g.cs | 1 - .../ModelsRetrieveModelCommandApiCommand.g.cs | 1 - ...ionsCreateModerationCommandApiCommand.g.cs | 23 ++++---- ...gnProjectRoleToGroupCommandApiCommand.g.cs | 1 - ...GroupRoleAssignmentsCommandApiCommand.g.cs | 1 - ...ieveProjectGroupRoleCommandApiCommand.g.cs | 1 - ...ProjectRoleFromGroupCommandApiCommand.g.cs | 1 - ...roupsAddProjectGroupCommandApiCommand.g.cs | 1 - ...upsListProjectGroupsCommandApiCommand.g.cs | 1 - ...psRemoveProjectGroupCommandApiCommand.g.cs | 1 - ...RetrieveProjectGroupCommandApiCommand.g.cs | 1 - ...ignProjectRoleToUserCommandApiCommand.g.cs | 1 - ...tUserRoleAssignmentsCommandApiCommand.g.cs | 1 - ...rieveProjectUserRoleCommandApiCommand.g.cs | 1 - ...nProjectRoleFromUserCommandApiCommand.g.cs | 1 - ...ojectsArchiveProjectCommandApiCommand.g.cs | 1 - ...rojectsCreateProjectCommandApiCommand.g.cs | 13 +++-- ...rojectServiceAccountCommandApiCommand.g.cs | 1 - ...ctsCreateProjectUserCommandApiCommand.g.cs | 13 +++-- ...sDeleteProjectApiKeyCommandApiCommand.g.cs | 1 - ...jectModelPermissionsCommandApiCommand.g.cs | 1 - ...rojectServiceAccountCommandApiCommand.g.cs | 1 - ...ctsDeleteProjectUserCommandApiCommand.g.cs | 1 - ...tsListProjectApiKeysCommandApiCommand.g.cs | 1 - ...istProjectRateLimitsCommandApiCommand.g.cs | 1 - ...ojectServiceAccountsCommandApiCommand.g.cs | 1 - ...ectsListProjectUsersCommandApiCommand.g.cs | 1 - ...ProjectsListProjectsCommandApiCommand.g.cs | 1 - ...rojectsModifyProjectCommandApiCommand.g.cs | 15 +++--- ...jectModelPermissionsCommandApiCommand.g.cs | 1 - ...difyProjectRateLimitCommandApiCommand.g.cs | 21 ++++---- ...ctsModifyProjectUserCommandApiCommand.g.cs | 11 ++-- ...etrieveProjectApiKeyCommandApiCommand.g.cs | 1 - ...jectsRetrieveProjectCommandApiCommand.g.cs | 1 - ...jectModelPermissionsCommandApiCommand.g.cs | 1 - ...rojectServiceAccountCommandApiCommand.g.cs | 1 - ...sRetrieveProjectUserCommandApiCommand.g.cs | 1 - ...rojectServiceAccountCommandApiCommand.g.cs | 13 +++-- .../RealtimeAcceptCallCommandApiCommand.g.cs | 44 ++++++++------- .../RealtimeCreateCallCommandApiCommand.g.cs | 24 ++++----- ...meCreateClientSecretCommandApiCommand.g.cs | 13 +++-- ...ealtimeCreateSessionCommandApiCommand.g.cs | 48 ++++++++--------- ...TranscriptionSessionCommandApiCommand.g.cs | 19 ++++--- ...nslationClientSecretCommandApiCommand.g.cs | 11 ++-- .../RealtimeHangUpCallCommandApiCommand.g.cs | 1 - .../RealtimeReferCallCommandApiCommand.g.cs | 1 - .../RealtimeRejectCallCommandApiCommand.g.cs | 11 ++-- ...onsesCancelAResponseCommandApiCommand.g.cs | 1 - ...odelResponseAsStreamCommandApiCommand.g.cs | 9 ++-- ...CreateAModelResponseCommandApiCommand.g.cs | 9 ++-- ...DeleteAModelResponseCommandApiCommand.g.cs | 1 - ...sesGetAModelResponseCommandApiCommand.g.cs | 1 - ...ponsesListInputItemsCommandApiCommand.g.cs | 1 - .../RetrieveAdminApiKeyCommandApiCommand.g.cs | 1 - ...etrieveChatKitThreadCommandApiCommand.g.cs | 1 - .../RetrieveContainerCommandApiCommand.g.cs | 1 - ...etrieveContainerFileCommandApiCommand.g.cs | 1 - ...ContainerFileContentCommandApiCommand.g.cs | 1 - ...eateOrganizationRoleCommandApiCommand.g.cs | 11 ++-- ...lesCreateProjectRoleCommandApiCommand.g.cs | 11 ++-- ...leteOrganizationRoleCommandApiCommand.g.cs | 1 - ...lesDeleteProjectRoleCommandApiCommand.g.cs | 1 - ...istOrganizationRolesCommandApiCommand.g.cs | 1 - ...olesListProjectRolesCommandApiCommand.g.cs | 1 - ...ieveOrganizationRoleCommandApiCommand.g.cs | 1 - ...sRetrieveProjectRoleCommandApiCommand.g.cs | 1 - ...dateOrganizationRoleCommandApiCommand.g.cs | 13 +++-- ...lesUpdateProjectRoleCommandApiCommand.g.cs | 13 +++-- .../SkillsCreateSkillCommandApiCommand.g.cs | 1 - ...lsCreateSkillVersionCommandApiCommand.g.cs | 11 ++-- .../SkillsDeleteSkillCommandApiCommand.g.cs | 1 - ...lsDeleteSkillVersionCommandApiCommand.g.cs | 1 - .../SkillsGetSkillCommandApiCommand.g.cs | 1 - ...killsGetSkillContentCommandApiCommand.g.cs | 1 - ...killsGetSkillVersionCommandApiCommand.g.cs | 1 - ...tSkillVersionContentCommandApiCommand.g.cs | 1 - ...llsListSkillVersionsCommandApiCommand.g.cs | 1 - .../SkillsListSkillsCommandApiCommand.g.cs | 1 - ...eSkillDefaultVersionCommandApiCommand.g.cs | 1 - ...ganizationSpendAlertCommandApiCommand.g.cs | 26 +++++---- ...ateProjectSpendAlertCommandApiCommand.g.cs | 26 +++++---- ...ganizationSpendAlertCommandApiCommand.g.cs | 1 - ...eteProjectSpendAlertCommandApiCommand.g.cs | 1 - ...anizationSpendAlertsCommandApiCommand.g.cs | 1 - ...stProjectSpendAlertsCommandApiCommand.g.cs | 1 - ...ganizationSpendAlertCommandApiCommand.g.cs | 26 +++++---- ...ateProjectSpendAlertCommandApiCommand.g.cs | 26 +++++---- ...UploadsAddUploadPartCommandApiCommand.g.cs | 1 - .../UploadsCancelUploadCommandApiCommand.g.cs | 1 - ...ploadsCompleteUploadCommandApiCommand.g.cs | 11 ++-- .../UploadsCreateUploadCommandApiCommand.g.cs | 18 +++---- .../UsageAudioSpeechesCommandApiCommand.g.cs | 1 - ...eAudioTranscriptionsCommandApiCommand.g.cs | 1 - ...eInterpreterSessionsCommandApiCommand.g.cs | 1 - .../UsageCompletionsCommandApiCommand.g.cs | 1 - .../Commands/UsageCostsCommandApiCommand.g.cs | 1 - .../UsageEmbeddingsCommandApiCommand.g.cs | 1 - ...UsageFileSearchCallsCommandApiCommand.g.cs | 1 - .../UsageImagesCommandApiCommand.g.cs | 1 - .../UsageModerationsCommandApiCommand.g.cs | 1 - .../UsageVectorStoresCommandApiCommand.g.cs | 1 - .../UsageWebSearchCallsCommandApiCommand.g.cs | 1 - ...ganizationRoleToUserCommandApiCommand.g.cs | 1 - ...ationRoleAssignmentsCommandApiCommand.g.cs | 1 - ...UserOrganizationRoleCommandApiCommand.g.cs | 1 - ...nizationRoleFromUserCommandApiCommand.g.cs | 1 - .../UsersDeleteUserCommandApiCommand.g.cs | 1 - .../UsersListUsersCommandApiCommand.g.cs | 1 - .../UsersModifyUserCommandApiCommand.g.cs | 17 +++--- .../UsersRetrieveUserCommandApiCommand.g.cs | 1 - ...VectorStoreFileBatchCommandApiCommand.g.cs | 1 - ...resCreateVectorStoreCommandApiCommand.g.cs | 21 ++++---- ...VectorStoreFileBatchCommandApiCommand.g.cs | 17 +++--- ...reateVectorStoreFileCommandApiCommand.g.cs | 13 +++-- ...resDeleteVectorStoreCommandApiCommand.g.cs | 1 - ...eleteVectorStoreFileCommandApiCommand.g.cs | 1 - ...ListVectorStoreFilesCommandApiCommand.g.cs | 1 - ...orStoreFilesInABatchCommandApiCommand.g.cs | 1 - ...oresListVectorStoresCommandApiCommand.g.cs | 1 - ...resModifyVectorStoreCommandApiCommand.g.cs | 15 +++--- ...sRetrieveVectorStoreCommandApiCommand.g.cs | 1 - ...VectorStoreFileBatchCommandApiCommand.g.cs | 1 - ...rieveVectorStoreFileCommandApiCommand.g.cs | 1 - ...ctorStoreFileContentCommandApiCommand.g.cs | 1 - ...resSearchVectorStoreCommandApiCommand.g.cs | 17 +++--- ...rStoreFileAttributesCommandApiCommand.g.cs | 11 ++-- ...CreateVideoCharacterCommandApiCommand.g.cs | 1 - .../VideosCreateVideoCommandApiCommand.g.cs | 17 +++--- ...ideosCreateVideoEditCommandApiCommand.g.cs | 1 - ...eosCreateVideoExtendCommandApiCommand.g.cs | 1 - .../VideosDeleteVideoCommandApiCommand.g.cs | 1 - ...eosGetVideoCharacterCommandApiCommand.g.cs | 1 - .../VideosListVideosCommandApiCommand.g.cs | 1 - .../VideosRemixVideoCommandApiCommand.g.cs | 1 - .../VideosRetrieveVideoCommandApiCommand.g.cs | 1 - ...RetrieveVideoContentCommandApiCommand.g.cs | 1 - 271 files changed, 704 insertions(+), 971 deletions(-) diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs index 064e4d76..d041e16b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs index 35880fe2..7c41167a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -41,18 +40,18 @@ internal static partial class AssistantsCreateMessageCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -97,7 +96,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -114,8 +113,8 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var role = parseResult.GetRequiredValue(Role); var content = parseResult.GetRequiredValue(Content); - var attachments = CliRuntime.WasSpecified(parseResult, Attachments) ? parseResult.GetValue(Attachments) : __requestBase is not null ? __requestBase.Attachments : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var attachments = parseResult.GetValue(Attachments) ?? __requestBase?.Attachments; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs index e5c5c813..78751224 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -134,18 +133,18 @@ We generally recommend altering this or temperature but not both. **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly ""stuck"" request. Also note that the message content may be partially cut off if `finish_reason=""length""`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -204,7 +203,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -221,22 +220,22 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var include = parseResult.GetValue(Include); var assistantId = parseResult.GetRequiredValue(AssistantId); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var reasoningEffort = CliRuntime.WasSpecified(parseResult, ReasoningEffort) ? parseResult.GetValue(ReasoningEffort) : __requestBase is not null ? __requestBase.ReasoningEffort : default; - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var additionalInstructions = CliRuntime.WasSpecified(parseResult, AdditionalInstructions) ? parseResult.GetValue(AdditionalInstructions) : __requestBase is not null ? __requestBase.AdditionalInstructions : default; - var additionalMessages = CliRuntime.WasSpecified(parseResult, AdditionalMessages) ? parseResult.GetValue(AdditionalMessages) : __requestBase is not null ? __requestBase.AdditionalMessages : default; - var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; - var temperature = CliRuntime.WasSpecified(parseResult, Temperature) ? parseResult.GetValue(Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var topP = CliRuntime.WasSpecified(parseResult, TopP) ? parseResult.GetValue(TopP) : __requestBase is not null ? __requestBase.TopP : default; - var stream = CliRuntime.WasSpecified(parseResult, Stream) ? parseResult.GetValue(Stream) : __requestBase is not null ? __requestBase.Stream : default; - var maxPromptTokens = CliRuntime.WasSpecified(parseResult, MaxPromptTokens) ? parseResult.GetValue(MaxPromptTokens) : __requestBase is not null ? __requestBase.MaxPromptTokens : default; - var maxCompletionTokens = CliRuntime.WasSpecified(parseResult, MaxCompletionTokens) ? parseResult.GetValue(MaxCompletionTokens) : __requestBase is not null ? __requestBase.MaxCompletionTokens : default; - var truncationStrategy = CliRuntime.WasSpecified(parseResult, TruncationStrategy) ? parseResult.GetValue(TruncationStrategy) : __requestBase is not null ? __requestBase.TruncationStrategy : default; - var toolChoice = CliRuntime.WasSpecified(parseResult, ToolChoice) ? parseResult.GetValue(ToolChoice) : __requestBase is not null ? __requestBase.ToolChoice : default; - var parallelToolCalls = CliRuntime.WasSpecified(parseResult, ParallelToolCalls) ? parseResult.GetValue(ParallelToolCalls) : __requestBase is not null ? __requestBase.ParallelToolCalls : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, ResponseFormat) ? parseResult.GetValue(ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var reasoningEffort = parseResult.GetValue(ReasoningEffort) ?? __requestBase?.ReasoningEffort; + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var additionalInstructions = parseResult.GetValue(AdditionalInstructions) ?? __requestBase?.AdditionalInstructions; + var additionalMessages = parseResult.GetValue(AdditionalMessages) ?? __requestBase?.AdditionalMessages; + var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; + var topP = parseResult.GetValue(TopP) ?? __requestBase?.TopP; + var stream = parseResult.GetValue(Stream) ?? __requestBase?.Stream; + var maxPromptTokens = parseResult.GetValue(MaxPromptTokens) ?? __requestBase?.MaxPromptTokens; + var maxCompletionTokens = parseResult.GetValue(MaxCompletionTokens) ?? __requestBase?.MaxCompletionTokens; + var truncationStrategy = parseResult.GetValue(TruncationStrategy) ?? __requestBase?.TruncationStrategy; + var toolChoice = parseResult.GetValue(ToolChoice) ?? __requestBase?.ToolChoice; + var parallelToolCalls = parseResult.GetValue(ParallelToolCalls) ?? __requestBase?.ParallelToolCalls; + var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs index 45a79971..316818e5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -116,18 +115,18 @@ We generally recommend altering this or temperature but not both. **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly ""stuck"" request. Also note that the message content may be partially cut off if `finish_reason=""length""`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -183,7 +182,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -198,21 +197,21 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var assistantId = parseResult.GetRequiredValue(AssistantId); - var thread = CliRuntime.WasSpecified(parseResult, Thread) ? parseResult.GetValue(Thread) : __requestBase is not null ? __requestBase.Thread : default; - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default; - var toolResources = CliRuntime.WasSpecified(parseResult, ToolResources) ? parseResult.GetValue(ToolResources) : __requestBase is not null ? __requestBase.ToolResources : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; - var temperature = CliRuntime.WasSpecified(parseResult, Temperature) ? parseResult.GetValue(Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var topP = CliRuntime.WasSpecified(parseResult, TopP) ? parseResult.GetValue(TopP) : __requestBase is not null ? __requestBase.TopP : default; - var stream = CliRuntime.WasSpecified(parseResult, Stream) ? parseResult.GetValue(Stream) : __requestBase is not null ? __requestBase.Stream : default; - var maxPromptTokens = CliRuntime.WasSpecified(parseResult, MaxPromptTokens) ? parseResult.GetValue(MaxPromptTokens) : __requestBase is not null ? __requestBase.MaxPromptTokens : default; - var maxCompletionTokens = CliRuntime.WasSpecified(parseResult, MaxCompletionTokens) ? parseResult.GetValue(MaxCompletionTokens) : __requestBase is not null ? __requestBase.MaxCompletionTokens : default; - var truncationStrategy = CliRuntime.WasSpecified(parseResult, TruncationStrategy) ? parseResult.GetValue(TruncationStrategy) : __requestBase is not null ? __requestBase.TruncationStrategy : default; - var toolChoice = CliRuntime.WasSpecified(parseResult, ToolChoice) ? parseResult.GetValue(ToolChoice) : __requestBase is not null ? __requestBase.ToolChoice : default; - var parallelToolCalls = CliRuntime.WasSpecified(parseResult, ParallelToolCalls) ? parseResult.GetValue(ParallelToolCalls) : __requestBase is not null ? __requestBase.ParallelToolCalls : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, ResponseFormat) ? parseResult.GetValue(ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; + var thread = parseResult.GetValue(Thread) ?? __requestBase?.Thread; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools; + var toolResources = parseResult.GetValue(ToolResources) ?? __requestBase?.ToolResources; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; + var topP = parseResult.GetValue(TopP) ?? __requestBase?.TopP; + var stream = parseResult.GetValue(Stream) ?? __requestBase?.Stream; + var maxPromptTokens = parseResult.GetValue(MaxPromptTokens) ?? __requestBase?.MaxPromptTokens; + var maxCompletionTokens = parseResult.GetValue(MaxCompletionTokens) ?? __requestBase?.MaxCompletionTokens; + var truncationStrategy = parseResult.GetValue(TruncationStrategy) ?? __requestBase?.TruncationStrategy; + var toolChoice = parseResult.GetValue(ToolChoice) ?? __requestBase?.ToolChoice; + var parallelToolCalls = parseResult.GetValue(ParallelToolCalls) ?? __requestBase?.ParallelToolCalls; + var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs index d62a40f7..537570cc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class AssistantsCreateThreadCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -92,9 +91,9 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var messages = CliRuntime.WasSpecified(parseResult, Messages) ? parseResult.GetValue(Messages) : __requestBase is not null ? __requestBase.Messages : default; - var toolResources = CliRuntime.WasSpecified(parseResult, ToolResources) ? parseResult.GetValue(ToolResources) : __requestBase is not null ? __requestBase.ToolResources : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var messages = parseResult.GetValue(Messages) ?? __requestBase?.Messages; + var toolResources = parseResult.GetValue(ToolResources) ?? __requestBase?.ToolResources; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs index b9290b0a..9a9f2e7d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs index fe014861..75fc3854 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs index 29be19f3..a04c7711 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs index 0eb462d9..8514ee5f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs index 3ff52d51..3814bf1f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs index 200e5f56..d020c8e5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class AssistantsModifyMessageCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,7 +93,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); var messageId = parseResult.GetRequiredValue(MessageId); - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs index 100796da..2b3be3c6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class AssistantsModifyRunCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,7 +93,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); var runId = parseResult.GetRequiredValue(RunId); - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs index 0539b6e1..601f3fbb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class AssistantsModifyThreadCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -93,8 +92,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); - var toolResources = CliRuntime.WasSpecified(parseResult, ToolResources) ? parseResult.GetValue(ToolResources) : __requestBase is not null ? __requestBase.ToolResources : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var toolResources = parseResult.GetValue(ToolResources) ?? __requestBase?.ToolResources; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs index 16906654..0f429412 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs index e66d19f5..f868a081 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs index 7ce2b68b..ca7a8f35 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs index d6792475..5ba3ce93 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs index ece1cd3c..5e56021c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +28,18 @@ internal static partial class AssistantsSubmitToolOutputsToRunCommandApiCommand private static Option Stream { get; } = CliRuntime.CreateNullableBoolOption( name: @"--stream", description: @""); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -85,7 +84,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -102,7 +101,7 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var runId = parseResult.GetRequiredValue(RunId); var toolOutputs = parseResult.GetRequiredValue(ToolOutputs); - var stream = CliRuntime.WasSpecified(parseResult, Stream) ? parseResult.GetValue(Stream) : __requestBase is not null ? __requestBase.Stream : default; + var stream = parseResult.GetValue(Stream) ?? __requestBase?.Stream; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs index 6e8f8c6c..f114b4f2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -15,7 +14,7 @@ internal static partial class AudioCreateSpeechCommandApiCommand Required = true, }; - private static Option InputOption { get; } = new( + private static Option Input { get; } = new( name: @"--input") { Description = @"The text to generate audio for. The maximum length is 4096 characters.", @@ -52,18 +51,18 @@ internal static partial class AudioCreateSpeechCommandApiCommand { Description = @"The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.", }; - private static Option RequestInput { get; } = new(@"--request-input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -76,24 +75,24 @@ public static Command Create() Returns the audio file content, or a stream of audio events. "); command.Options.Add(Model); - command.Options.Add(InputOption); + command.Options.Add(Input); command.Options.Add(Instructions); command.Options.Add(Voice); command.Options.Add(ResponseFormat); command.Options.Add(Speed); command.Options.Add(StreamFormat); - command.Options.Add(RequestInput); + command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(RequestInput) is not null; + var hasInput = result.GetResult(Input) is not null; var hasRequestJson = result.GetResult(RequestJson) is not null; var hasRequestFile = result.GetResult(RequestFile) is not null; var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -102,18 +101,18 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - RequestInput, + Input, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var input = parseResult.GetRequiredValue(InputOption); - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; + var input = parseResult.GetRequiredValue(Input); + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; var voice = parseResult.GetRequiredValue(Voice); - var responseFormat = CliRuntime.WasSpecified(parseResult, ResponseFormat) ? parseResult.GetValue(ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var speed = CliRuntime.WasSpecified(parseResult, Speed) ? parseResult.GetValue(Speed) : __requestBase is not null ? __requestBase.Speed : default; - var streamFormat = CliRuntime.WasSpecified(parseResult, StreamFormat) ? parseResult.GetValue(StreamFormat) : __requestBase is not null ? __requestBase.StreamFormat : default; + var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; + var speed = parseResult.GetValue(Speed) ?? __requestBase?.Speed; + var streamFormat = parseResult.GetValue(StreamFormat) ?? __requestBase?.StreamFormat; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs index 31c59fd9..24f1648c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +28,18 @@ internal static partial class AudioCreateTranscriptionAsStreamCommandApiCommand Description = @"", }; private static readonly CreateTranscriptionRequestOptionSet CreateTranscriptionRequestOptionSetOptions = CreateTranscriptionRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -62,6 +61,7 @@ public static Command Create() command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Temperature); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Include); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities); + command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Stream); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences); command.Options.Add(Input); @@ -75,7 +75,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -91,15 +91,16 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var file = parseResult.GetRequiredValue(File); var model = parseResult.GetRequiredValue(Model); - var chunkingStrategy = CliRuntime.WasSpecified(parseResult, ChunkingStrategy) ? parseResult.GetValue(ChunkingStrategy) : __requestBase is not null ? __requestBase.ChunkingStrategy : default; var filename = parseResult.GetRequiredValue(CreateTranscriptionRequestOptionSetOptions.Filename); - var language = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Language) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Language) : __requestBase is not null ? __requestBase.Language : default; - var prompt = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Prompt) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Prompt) : __requestBase is not null ? __requestBase.Prompt : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var temperature = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Temperature) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var include = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Include) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Include) : __requestBase is not null ? __requestBase.Include : default; - var timestampGranularities = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) : __requestBase is not null ? __requestBase.TimestampGranularities : default; - var knownSpeakerNames = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) : __requestBase is not null ? __requestBase.KnownSpeakerNames : default; - var knownSpeakerReferences = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) : __requestBase is not null ? __requestBase.KnownSpeakerReferences : default; + var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; var filename = parseResult.GetRequiredValue(CreateTranscriptionRequestOptionSetOptions.Filename); + var language = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Language) ?? __requestBase?.Language; + var prompt = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Prompt) ?? __requestBase?.Prompt; + var responseFormat = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var temperature = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Temperature) ?? __requestBase?.Temperature; + var include = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Include) ?? __requestBase?.Include; + var timestampGranularities = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) ?? __requestBase?.TimestampGranularities; + var stream = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var knownSpeakerNames = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) ?? __requestBase?.KnownSpeakerNames; + var knownSpeakerReferences = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) ?? __requestBase?.KnownSpeakerReferences; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -114,6 +115,7 @@ await CliRuntime.RunAsync(async () => temperature: temperature, include: include, timestampGranularities: timestampGranularities, + stream: stream, knownSpeakerNames: knownSpeakerNames, knownSpeakerReferences: knownSpeakerReferences, cancellationToken: cancellationToken); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs index 179f0994..db019a85 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +28,18 @@ internal static partial class AudioCreateTranscriptionCommandApiCommand Description = @"", }; private static readonly CreateTranscriptionRequestOptionSet CreateTranscriptionRequestOptionSetOptions = CreateTranscriptionRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -82,6 +81,7 @@ public static Command Create() command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Temperature); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Include); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities); + command.Options.Add(CreateTranscriptionRequestOptionSetOptions.Stream); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames); command.Options.Add(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences); command.Options.Add(Input); @@ -95,7 +95,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -111,15 +111,16 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var file = parseResult.GetRequiredValue(File); var model = parseResult.GetRequiredValue(Model); - var chunkingStrategy = CliRuntime.WasSpecified(parseResult, ChunkingStrategy) ? parseResult.GetValue(ChunkingStrategy) : __requestBase is not null ? __requestBase.ChunkingStrategy : default; var filename = parseResult.GetRequiredValue(CreateTranscriptionRequestOptionSetOptions.Filename); - var language = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Language) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Language) : __requestBase is not null ? __requestBase.Language : default; - var prompt = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Prompt) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Prompt) : __requestBase is not null ? __requestBase.Prompt : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var temperature = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Temperature) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var include = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.Include) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Include) : __requestBase is not null ? __requestBase.Include : default; - var timestampGranularities = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) : __requestBase is not null ? __requestBase.TimestampGranularities : default; - var knownSpeakerNames = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) : __requestBase is not null ? __requestBase.KnownSpeakerNames : default; - var knownSpeakerReferences = CliRuntime.WasSpecified(parseResult, CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) ? parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) : __requestBase is not null ? __requestBase.KnownSpeakerReferences : default; + var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; var filename = parseResult.GetRequiredValue(CreateTranscriptionRequestOptionSetOptions.Filename); + var language = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Language) ?? __requestBase?.Language; + var prompt = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Prompt) ?? __requestBase?.Prompt; + var responseFormat = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var temperature = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Temperature) ?? __requestBase?.Temperature; + var include = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Include) ?? __requestBase?.Include; + var timestampGranularities = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.TimestampGranularities) ?? __requestBase?.TimestampGranularities; + var stream = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var knownSpeakerNames = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerNames) ?? __requestBase?.KnownSpeakerNames; + var knownSpeakerReferences = parseResult.GetValue(CreateTranscriptionRequestOptionSetOptions.KnownSpeakerReferences) ?? __requestBase?.KnownSpeakerReferences; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -134,6 +135,7 @@ await CliRuntime.RunAsync(async () => temperature: temperature, include: include, timestampGranularities: timestampGranularities, + stream: stream, knownSpeakerNames: knownSpeakerNames, knownSpeakerReferences: knownSpeakerReferences, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs index 044d4f29..a41c86ef 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -51,18 +50,18 @@ internal static partial class AudioCreateTranslationCommandApiCommand Description = @"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -108,7 +107,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -125,9 +124,9 @@ await CliRuntime.RunAsync(async () => var file = parseResult.GetRequiredValue(File); var filename = parseResult.GetRequiredValue(Filename); var model = parseResult.GetRequiredValue(Model); - var prompt = CliRuntime.WasSpecified(parseResult, Prompt) ? parseResult.GetValue(Prompt) : __requestBase is not null ? __requestBase.Prompt : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, ResponseFormat) ? parseResult.GetValue(ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var temperature = CliRuntime.WasSpecified(parseResult, Temperature) ? parseResult.GetValue(Temperature) : __requestBase is not null ? __requestBase.Temperature : default; + var prompt = parseResult.GetValue(Prompt) ?? __requestBase?.Prompt; + var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; + var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs index 007743e9..ffdea1eb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs index 2e2a36d9..c3e16f37 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs index a368eb81..ddb8b8e6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs index 592995b2..99419d43 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs index 4284ef41..f194fdbc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs index 90e6eae5..27377b4b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs index 06dee1a4..ef5686b5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs index f7af058a..a2cdd931 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs index f366c254..78daa2f1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -43,18 +42,18 @@ Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/re { Description = @"The expiration policy for the output and/or error file that are generated for a batch.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -99,7 +98,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -115,9 +114,9 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var inputFileId = parseResult.GetRequiredValue(InputFileId); var endpoint = parseResult.GetRequiredValue(Endpoint); - var completionWindow = CliRuntime.WasSpecified(parseResult, CompletionWindow) ? parseResult.GetValue(CompletionWindow) : __requestBase is not null ? __requestBase.CompletionWindow : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; - var outputExpiresAfter = CliRuntime.WasSpecified(parseResult, OutputExpiresAfter) ? parseResult.GetValue(OutputExpiresAfter) : __requestBase is not null ? __requestBase.OutputExpiresAfter : default; + var completionWindow = parseResult.GetValue(CompletionWindow) ?? __requestBase?.CompletionWindow; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var outputExpiresAfter = parseResult.GetValue(OutputExpiresAfter) ?? __requestBase?.OutputExpiresAfter; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs index fe50a22b..0f0e4c68 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs index 663c6a36..15ae57c6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs index 0e3d68eb..f724cc92 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs index 74f67453..c63bfa55 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs index 87d83e55..33018fd5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs index 326d763c..7cad55b9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs index 9b3d189f..f42598bd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs index 72ae8965..c7dbb139 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs index d8a4a19f..230a60bc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs index fc446f0d..f865eb44 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs index ff629c98..59eb22fb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs index b02b8e77..2153cf96 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +17,18 @@ internal static partial class CertificatesModifyCertificateCommandApiCommand { Description = @"The updated name for the certificate", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -72,7 +71,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -87,7 +86,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var certificateId = parseResult.GetRequiredValue(CertificateId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs index cddd7b70..20fc5927 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -19,18 +18,18 @@ internal static partial class CertificatesUploadCertificateCommandApiCommand Description = @"The certificate content in PEM format", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -75,7 +74,7 @@ Organizations can upload up to 50 certificates. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -89,7 +88,7 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; var certificate = parseResult.GetRequiredValue(Certificate); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs index a13b1711..b4301ed3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -8,18 +7,18 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ChatCreateChatCompletionAsStreamCommandApiCommand { - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -58,7 +57,7 @@ [refer to the reasoning guide](/docs/guides/reasoning). var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount != 1) { - result.AddError(@"Specify exactly one of --input, --request-json, or --request-file."); + result.AddError("Specify exactly one of --input, --request-json, or --request-file."); } }); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs index 2176e26e..96d8045e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -8,18 +7,18 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ChatCreateChatCompletionCommandApiCommand { - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ [refer to the reasoning guide](/docs/guides/reasoning). var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount != 1) { - result.AddError(@"Specify exactly one of --input, --request-json, or --request-file."); + result.AddError("Specify exactly one of --input, --request-json, or --request-file."); } }); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs index 1112c9a4..e4d8ccd1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs index 86739749..edb83da1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs index 98143f8d..0b5990cc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs index 3fd4e277..a25515b7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs index d19ec0e2..d797f7ec 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +17,18 @@ internal static partial class ChatUpdateChatCompletionCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -74,7 +73,7 @@ the only supported modification is to update the `metadata` field. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -89,7 +88,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var completionId = parseResult.GetRequiredValue(CompletionId); - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs index 3850100b..f74eb13e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -14,7 +13,7 @@ internal static partial class CompactAResponseCommandApiCommand Required = true, }; - private static Option>?> InputOption { get; } = new( + private static Option>?> Input { get; } = new( name: @"--input") { Description = @"", @@ -49,18 +48,18 @@ internal static partial class CompactAResponseCommandApiCommand { Description = @"", }; - private static Option RequestInput { get; } = new(@"--request-input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -92,24 +91,24 @@ public static Command Create() Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced)."); command.Options.Add(Model); - command.Options.Add(InputOption); + command.Options.Add(Input); command.Options.Add(PreviousResponseId); command.Options.Add(Instructions); command.Options.Add(PromptCacheKey); command.Options.Add(PromptCacheRetention); command.Options.Add(ServiceTier); - command.Options.Add(RequestInput); + command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(RequestInput) is not null; + var hasInput = result.GetResult(Input) is not null; var hasRequestJson = result.GetResult(RequestJson) is not null; var hasRequestFile = result.GetResult(RequestFile) is not null; var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -118,18 +117,18 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - RequestInput, + Input, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var input = CliRuntime.WasSpecified(parseResult, InputOption) ? parseResult.GetValue(InputOption) : __requestBase is not null ? __requestBase.Input : default; - var previousResponseId = CliRuntime.WasSpecified(parseResult, PreviousResponseId) ? parseResult.GetValue(PreviousResponseId) : __requestBase is not null ? __requestBase.PreviousResponseId : default; - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var promptCacheKey = CliRuntime.WasSpecified(parseResult, PromptCacheKey) ? parseResult.GetValue(PromptCacheKey) : __requestBase is not null ? __requestBase.PromptCacheKey : default; - var promptCacheRetention = CliRuntime.WasSpecified(parseResult, PromptCacheRetention) ? parseResult.GetValue(PromptCacheRetention) : __requestBase is not null ? __requestBase.PromptCacheRetention : default; - var serviceTier = CliRuntime.WasSpecified(parseResult, ServiceTier) ? parseResult.GetValue(ServiceTier) : __requestBase is not null ? __requestBase.ServiceTier : default; + var input = parseResult.GetValue(Input) ?? __requestBase?.Input; + var previousResponseId = parseResult.GetValue(PreviousResponseId) ?? __requestBase?.PreviousResponseId; + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var promptCacheKey = parseResult.GetValue(PromptCacheKey) ?? __requestBase?.PromptCacheKey; + var promptCacheRetention = parseResult.GetValue(PromptCacheRetention) ?? __requestBase?.PromptCacheRetention; + var serviceTier = parseResult.GetValue(ServiceTier) ?? __requestBase?.ServiceTier; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs index 94a9753e..4a7188f3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -159,18 +158,18 @@ We generally recommend altering this or `temperature` but not both. Description = @"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids). ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -231,7 +230,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -246,23 +245,23 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var prompt = CliRuntime.WasSpecified(parseResult, Prompt) ? parseResult.GetValue(Prompt) : __requestBase is not null ? __requestBase.Prompt : default; - var bestOf = CliRuntime.WasSpecified(parseResult, BestOf) ? parseResult.GetValue(BestOf) : __requestBase is not null ? __requestBase.BestOf : default; - var echo = CliRuntime.WasSpecified(parseResult, Echo) ? parseResult.GetValue(Echo) : __requestBase is not null ? __requestBase.Echo : default; - var frequencyPenalty = CliRuntime.WasSpecified(parseResult, FrequencyPenalty) ? parseResult.GetValue(FrequencyPenalty) : __requestBase is not null ? __requestBase.FrequencyPenalty : default; - var logitBias = CliRuntime.WasSpecified(parseResult, LogitBias) ? parseResult.GetValue(LogitBias) : __requestBase is not null ? __requestBase.LogitBias : default; - var logprobs = CliRuntime.WasSpecified(parseResult, Logprobs) ? parseResult.GetValue(Logprobs) : __requestBase is not null ? __requestBase.Logprobs : default; - var maxTokens = CliRuntime.WasSpecified(parseResult, MaxTokens) ? parseResult.GetValue(MaxTokens) : __requestBase is not null ? __requestBase.MaxTokens : default; - var n = CliRuntime.WasSpecified(parseResult, N) ? parseResult.GetValue(N) : __requestBase is not null ? __requestBase.N : default; - var presencePenalty = CliRuntime.WasSpecified(parseResult, PresencePenalty) ? parseResult.GetValue(PresencePenalty) : __requestBase is not null ? __requestBase.PresencePenalty : default; - var seed = CliRuntime.WasSpecified(parseResult, Seed) ? parseResult.GetValue(Seed) : __requestBase is not null ? __requestBase.Seed : default; - var stop = CliRuntime.WasSpecified(parseResult, Stop) ? parseResult.GetValue(Stop) : __requestBase is not null ? __requestBase.Stop : default; - var stream = CliRuntime.WasSpecified(parseResult, Stream) ? parseResult.GetValue(Stream) : __requestBase is not null ? __requestBase.Stream : default; - var streamOptions = CliRuntime.WasSpecified(parseResult, StreamOptions) ? parseResult.GetValue(StreamOptions) : __requestBase is not null ? __requestBase.StreamOptions : default; - var suffix = CliRuntime.WasSpecified(parseResult, Suffix) ? parseResult.GetValue(Suffix) : __requestBase is not null ? __requestBase.Suffix : default; - var temperature = CliRuntime.WasSpecified(parseResult, Temperature) ? parseResult.GetValue(Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var topP = CliRuntime.WasSpecified(parseResult, TopP) ? parseResult.GetValue(TopP) : __requestBase is not null ? __requestBase.TopP : default; - var user = CliRuntime.WasSpecified(parseResult, User) ? parseResult.GetValue(User) : __requestBase is not null ? __requestBase.User : default; + var prompt = parseResult.GetValue(Prompt) ?? __requestBase?.Prompt; + var bestOf = parseResult.GetValue(BestOf) ?? __requestBase?.BestOf; + var echo = parseResult.GetValue(Echo) ?? __requestBase?.Echo; + var frequencyPenalty = parseResult.GetValue(FrequencyPenalty) ?? __requestBase?.FrequencyPenalty; + var logitBias = parseResult.GetValue(LogitBias) ?? __requestBase?.LogitBias; + var logprobs = parseResult.GetValue(Logprobs) ?? __requestBase?.Logprobs; + var maxTokens = parseResult.GetValue(MaxTokens) ?? __requestBase?.MaxTokens; + var n = parseResult.GetValue(N) ?? __requestBase?.N; + var presencePenalty = parseResult.GetValue(PresencePenalty) ?? __requestBase?.PresencePenalty; + var seed = parseResult.GetValue(Seed) ?? __requestBase?.Seed; + var stop = parseResult.GetValue(Stop) ?? __requestBase?.Stop; + var stream = parseResult.GetValue(Stream) ?? __requestBase?.Stream; + var streamOptions = parseResult.GetValue(StreamOptions) ?? __requestBase?.StreamOptions; + var suffix = parseResult.GetValue(Suffix) ?? __requestBase?.Suffix; + var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; + var topP = parseResult.GetValue(TopP) ?? __requestBase?.TopP; + var user = parseResult.GetValue(User) ?? __requestBase?.User; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs index 7d945424..a7706b1e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +17,18 @@ internal static partial class ConversationsCreateAConversationCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -71,7 +70,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -85,8 +84,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; - var items = CliRuntime.WasSpecified(parseResult, Items) ? parseResult.GetValue(Items) : __requestBase is not null ? __requestBase.Items : default; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var items = parseResult.GetValue(Items) ?? __requestBase?.Items; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs index 9464185a..f0722c7b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs index 293640ed..2d1e0f87 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs index 78867dc1..eafa37e8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs index f8013cd0..78b358d2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs index aa089372..66e84400 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs index 885ecb83..33c9814b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs index e3c74c94..eed4cc37 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -19,18 +18,18 @@ internal static partial class ConversationsUpdateAConversationCommandApiCommand Description = @"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -72,7 +71,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -87,7 +86,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var conversationId = parseResult.GetRequiredValue(ConversationId); - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs index 7b6901da..c959c7f5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs index af4a7abd..5f67465e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -38,18 +37,18 @@ internal static partial class CreateChatKitSessionCommandApiCommand { Description = @"Optional overrides for ChatKit runtime configuration features", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -94,7 +93,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -110,9 +109,9 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var workflow = parseResult.GetRequiredValue(Workflow); var user = parseResult.GetRequiredValue(User); - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; - var rateLimits = CliRuntime.WasSpecified(parseResult, RateLimits) ? parseResult.GetValue(RateLimits) : __requestBase is not null ? __requestBase.RateLimits : default; - var chatkitConfiguration = CliRuntime.WasSpecified(parseResult, ChatkitConfiguration) ? parseResult.GetValue(ChatkitConfiguration) : __requestBase is not null ? __requestBase.ChatkitConfiguration : default; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var rateLimits = parseResult.GetValue(RateLimits) ?? __requestBase?.RateLimits; + var chatkitConfiguration = parseResult.GetValue(ChatkitConfiguration) ?? __requestBase?.ChatkitConfiguration; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs index 2e754aae..1f8a9b4b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -42,18 +41,18 @@ internal static partial class CreateContainerCommandApiCommand { Description = @"Network access policy for the container.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -100,7 +99,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -115,11 +114,11 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var name = parseResult.GetRequiredValue(NameOption); - var fileIds = CliRuntime.WasSpecified(parseResult, FileIds) ? parseResult.GetValue(FileIds) : __requestBase is not null ? __requestBase.FileIds : default; - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; - var skills = CliRuntime.WasSpecified(parseResult, Skills) ? parseResult.GetValue(Skills) : __requestBase is not null ? __requestBase.Skills : default; - var memoryLimit = CliRuntime.WasSpecified(parseResult, MemoryLimit) ? parseResult.GetValue(MemoryLimit) : __requestBase is not null ? __requestBase.MemoryLimit : default; - var networkPolicy = CliRuntime.WasSpecified(parseResult, NetworkPolicy) ? parseResult.GetValue(NetworkPolicy) : __requestBase is not null ? __requestBase.NetworkPolicy : default; + var fileIds = parseResult.GetValue(FileIds) ?? __requestBase?.FileIds; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var skills = parseResult.GetValue(Skills) ?? __requestBase?.Skills; + var memoryLimit = parseResult.GetValue(MemoryLimit) ?? __requestBase?.MemoryLimit; + var networkPolicy = parseResult.GetValue(NetworkPolicy) ?? __requestBase?.NetworkPolicy; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs index 8735f932..6543959b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -32,18 +31,18 @@ internal static partial class CreateContainerFileCommandApiCommand Description = @"The File object (not file name) to be uploaded. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -92,7 +91,7 @@ Creates a container file. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -107,9 +106,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var containerId = parseResult.GetRequiredValue(ContainerId); - var fileId = CliRuntime.WasSpecified(parseResult, FileId) ? parseResult.GetValue(FileId) : __requestBase is not null ? __requestBase.FileId : default; - var file = CliRuntime.WasSpecified(parseResult, File) ? parseResult.GetValue(File) : __requestBase is not null ? __requestBase.File : default; - var filename = CliRuntime.WasSpecified(parseResult, Filename) ? parseResult.GetValue(Filename) : __requestBase is not null ? __requestBase.Filename : default; + var fileId = parseResult.GetValue(FileId) ?? __requestBase?.FileId; + var file = parseResult.GetValue(File) ?? __requestBase?.File; + var filename = parseResult.GetValue(Filename) ?? __requestBase?.Filename; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs index e9022efd..6b9f0542 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs index 7690610d..1c997c4e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs index f30d7dbf..81393ee9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs index 7a3ce1d3..e69e8bbb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs index a5341527..81494e15 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs index 70abcdeb..78b417e2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs index c18943b1..c40df049 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs index 6566b2e7..a506b361 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs index 96fd1aff..ca8a1e84 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -7,7 +6,7 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class EmbeddingsCreateEmbeddingsCommandApiCommand { - private static Option, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>> InputOption { get; } = new( + private static Option, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>> Input { get; } = new( name: @"--input") { Description = @"Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. @@ -42,18 +41,18 @@ internal static partial class EmbeddingsCreateEmbeddingsCommandApiCommand Description = @"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids). ", }; - private static Option RequestInput { get; } = new(@"--request-input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -82,23 +81,23 @@ private static string FormatResponse(ParseResult parseResult, global::tryAGI.Ope public static Command Create() { var command = new Command(@"create-embeddings", @"Creates an embedding vector representing the input text."); - command.Options.Add(InputOption); + command.Options.Add(Input); command.Options.Add(Model); command.Options.Add(EncodingFormat); command.Options.Add(Dimensions); command.Options.Add(User); - command.Options.Add(RequestInput); + command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(RequestInput) is not null; + var hasInput = result.GetResult(Input) is not null; var hasRequestJson = result.GetResult(RequestJson) is not null; var hasRequestFile = result.GetResult(RequestFile) is not null; var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -107,16 +106,16 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - RequestInput, + Input, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var input = parseResult.GetRequiredValue(InputOption); + var input = parseResult.GetRequiredValue(Input); var model = parseResult.GetRequiredValue(Model); - var encodingFormat = CliRuntime.WasSpecified(parseResult, EncodingFormat) ? parseResult.GetValue(EncodingFormat) : __requestBase is not null ? __requestBase.EncodingFormat : default; - var dimensions = CliRuntime.WasSpecified(parseResult, Dimensions) ? parseResult.GetValue(Dimensions) : __requestBase is not null ? __requestBase.Dimensions : default; - var user = CliRuntime.WasSpecified(parseResult, User) ? parseResult.GetValue(User) : __requestBase is not null ? __requestBase.User : default; + var encodingFormat = parseResult.GetValue(EncodingFormat) ?? __requestBase?.EncodingFormat; + var dimensions = parseResult.GetValue(Dimensions) ?? __requestBase?.Dimensions; + var user = parseResult.GetValue(User) ?? __requestBase?.User; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs index 0e45389e..d32b9da1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs index 1da2263a..d094e13f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -32,18 +31,18 @@ internal static partial class EvalsCreateEvalCommandApiCommand Description = @"A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -90,7 +89,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -104,8 +103,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; var dataSourceConfig = parseResult.GetRequiredValue(DataSourceConfig); var testingCriteria = parseResult.GetRequiredValue(TestingCriteria); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs index 0a54f45f..05fd6ac5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -31,18 +30,18 @@ internal static partial class EvalsCreateEvalRunCommandApiCommand Description = @"Details about the run's data source.", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -87,7 +86,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -102,8 +101,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var evalId = parseResult.GetRequiredValue(EvalId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; var dataSource = parseResult.GetRequiredValue(DataSource); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs index 416d6f4d..8efb4da2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs index e71c6258..9e870fe0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs index f14adf21..b780e5f6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs index 57ecd300..55e3a318 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs index f96a96e5..8631a1fb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs index 7528363c..e97cd7a1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs index d2d90d93..0fe1e1a5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs index 5be7b2b2..80c9c7b0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs index 6b33d6bd..f75cdaa2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class EvalsUpdateAnEvalCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -79,7 +78,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,8 +93,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var evalId = parseResult.GetRequiredValue(EvalId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs index d16381bd..2840ef0c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs index 574c60b5..a957226a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs index f288fa96..f9934bbf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs index e643a73a..fae7865b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs index 1662a018..ce57bd97 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -37,18 +36,18 @@ internal static partial class FilesUploadFileCommandApiCommand Required = true, }; private static readonly FileExpirationAfterOptionSet ExpiresAfterOptions = FileExpirationAfterOptionSet.Create(@"expires-after"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -117,7 +116,7 @@ storage limits. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -134,18 +133,17 @@ await CliRuntime.RunAsync(async () => var file = parseResult.GetRequiredValue(File); var filename = parseResult.GetRequiredValue(Filename); var purpose = parseResult.GetRequiredValue(Purpose); - - var __expiresAfterBase = __requestBase?.ExpiresAfter; var expiresAfterAnchor = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) ? parseResult.GetValue(ExpiresAfterOptions.Anchor) : __expiresAfterBase is not null ? __expiresAfterBase.Anchor : default; + var expiresAfterAnchor = parseResult.GetValue(ExpiresAfterOptions.Anchor) ?? __requestBase?.ExpiresAfter?.Anchor; var expiresAfterSeconds = parseResult.GetValue(ExpiresAfterOptions.Seconds); var __expiresAfterSpecified = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) || CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Seconds); var expiresAfter = - __expiresAfterSpecified || __expiresAfterBase is not null + __expiresAfterSpecified || __requestBase?.ExpiresAfter is not null ? new global::tryAGI.OpenAI.FileExpirationAfter { Anchor = expiresAfterAnchor, - Seconds = expiresAfterSeconds!, + Seconds = expiresAfterSeconds, } - : __expiresAfterBase; + : __requestBase?.ExpiresAfter; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs index 0714df16..41abf113 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs index 4f393f4a..904c20bf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs index c6c5cbf6..7277b91c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -82,18 +81,18 @@ Your dataset must be formatted as a JSONL file. You must upload your file with t { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -146,7 +145,7 @@ Response includes details of the enqueued job including job status and the name var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -162,12 +161,12 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); var trainingFile = parseResult.GetRequiredValue(TrainingFile); - var suffix = CliRuntime.WasSpecified(parseResult, Suffix) ? parseResult.GetValue(Suffix) : __requestBase is not null ? __requestBase.Suffix : default; - var validationFile = CliRuntime.WasSpecified(parseResult, ValidationFile) ? parseResult.GetValue(ValidationFile) : __requestBase is not null ? __requestBase.ValidationFile : default; - var integrations = CliRuntime.WasSpecified(parseResult, Integrations) ? parseResult.GetValue(Integrations) : __requestBase is not null ? __requestBase.Integrations : default; - var seed = CliRuntime.WasSpecified(parseResult, Seed) ? parseResult.GetValue(Seed) : __requestBase is not null ? __requestBase.Seed : default; - var method = CliRuntime.WasSpecified(parseResult, Method) ? parseResult.GetValue(Method) : __requestBase is not null ? __requestBase.Method : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var suffix = parseResult.GetValue(Suffix) ?? __requestBase?.Suffix; + var validationFile = parseResult.GetValue(ValidationFile) ?? __requestBase?.ValidationFile; + var integrations = parseResult.GetValue(Integrations) ?? __requestBase?.Integrations; + var seed = parseResult.GetValue(Seed) ?? __requestBase?.Seed; + var method = parseResult.GetValue(Method) ?? __requestBase?.Method; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs index 79038531..d10bff4e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs index 1c66c8f8..9e58e73a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs index b71aec9f..ae3b20f2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs index 2a38c751..669ffac6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs index 03b7e619..f7cf1322 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs index c15dba50..f2f6aa8d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs index 499e4816..0a3c9066 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs index d10834fa..f3901eb0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs index cee14d65..7f8693a4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -33,18 +32,18 @@ valid JSON string. ", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -88,7 +87,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -103,7 +102,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var grader = parseResult.GetRequiredValue(Grader); - var item = CliRuntime.WasSpecified(parseResult, Item) ? parseResult.GetValue(Item) : __requestBase is not null ? __requestBase.Item : default; + var item = parseResult.GetValue(Item) ?? __requestBase?.Item; var modelSample = parseResult.GetRequiredValue(ModelSample); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs index ffb57bae..5ee157ea 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs index 988666f0..8e0f9465 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -13,7 +12,7 @@ internal static partial class GetInputTokenCountsCommandApiCommand Description = @"", }; - private static Option>?> InputOption { get; } = new( + private static Option>?> Input { get; } = new( name: @"--input") { Description = @"", @@ -76,18 +75,18 @@ internal static partial class GetInputTokenCountsCommandApiCommand private static Option ParallelToolCalls { get; } = CliRuntime.CreateNullableBoolOption( name: @"--parallel-tool-calls", description: @""); - private static Option RequestInput { get; } = new(@"--request-input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -119,7 +118,7 @@ public static Command Create() Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count."); command.Options.Add(Model); - command.Options.Add(InputOption); + command.Options.Add(Input); command.Options.Add(PreviousResponseId); command.Options.Add(Tools); command.Options.Add(Text); @@ -130,18 +129,18 @@ public static Command Create() command.Options.Add(Conversation); command.Options.Add(ToolChoice); command.Options.Add(ParallelToolCalls); - command.Options.Add(RequestInput); + command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(RequestInput) is not null; + var hasInput = result.GetResult(Input) is not null; var hasRequestJson = result.GetResult(RequestJson) is not null; var hasRequestFile = result.GetResult(RequestFile) is not null; var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -150,23 +149,23 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - RequestInput, + Input, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var input = CliRuntime.WasSpecified(parseResult, InputOption) ? parseResult.GetValue(InputOption) : __requestBase is not null ? __requestBase.Input : default; - var previousResponseId = CliRuntime.WasSpecified(parseResult, PreviousResponseId) ? parseResult.GetValue(PreviousResponseId) : __requestBase is not null ? __requestBase.PreviousResponseId : default; - var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default; - var text = CliRuntime.WasSpecified(parseResult, Text) ? parseResult.GetValue(Text) : __requestBase is not null ? __requestBase.Text : default; - var reasoning = CliRuntime.WasSpecified(parseResult, Reasoning) ? parseResult.GetValue(Reasoning) : __requestBase is not null ? __requestBase.Reasoning : default; - var truncation = CliRuntime.WasSpecified(parseResult, Truncation) ? parseResult.GetValue(Truncation) : __requestBase is not null ? __requestBase.Truncation : default; - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var personality = CliRuntime.WasSpecified(parseResult, Personality) ? parseResult.GetValue(Personality) : __requestBase is not null ? __requestBase.Personality : default; - var conversation = CliRuntime.WasSpecified(parseResult, Conversation) ? parseResult.GetValue(Conversation) : __requestBase is not null ? __requestBase.Conversation : default; - var toolChoice = CliRuntime.WasSpecified(parseResult, ToolChoice) ? parseResult.GetValue(ToolChoice) : __requestBase is not null ? __requestBase.ToolChoice : default; - var parallelToolCalls = CliRuntime.WasSpecified(parseResult, ParallelToolCalls) ? parseResult.GetValue(ParallelToolCalls) : __requestBase is not null ? __requestBase.ParallelToolCalls : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var input = parseResult.GetValue(Input) ?? __requestBase?.Input; + var previousResponseId = parseResult.GetValue(PreviousResponseId) ?? __requestBase?.PreviousResponseId; + var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools; + var text = parseResult.GetValue(Text) ?? __requestBase?.Text; + var reasoning = parseResult.GetValue(Reasoning) ?? __requestBase?.Reasoning; + var truncation = parseResult.GetValue(Truncation) ?? __requestBase?.Truncation; + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var personality = parseResult.GetValue(Personality) ?? __requestBase?.Personality; + var conversation = parseResult.GetValue(Conversation) ?? __requestBase?.Conversation; + var toolChoice = parseResult.GetValue(ToolChoice) ?? __requestBase?.ToolChoice; + var parallelToolCalls = parseResult.GetValue(ParallelToolCalls) ?? __requestBase?.ParallelToolCalls; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs index 5357f317..411cce39 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs index 5bf61b6a..26065d5c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs index 51bc9333..35969dea 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs index 1e1bcf54..342a7a30 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs index 7aa77f31..a6d59c18 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs index 539ad171..6cda59c1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs index fa44da6a..1635f1fe 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs index b46cbf16..10d46754 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs index cc602bf8..dc890c8f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs index 260524ca..a825aaf6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs index 96522c90..bed8166a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs index ca262ff7..8d726170 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs index 4e4aa873..e99584d1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs index ba3b825e..64533912 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -21,18 +20,18 @@ internal static partial class HostedToolsModifyProjectHostedToolPermissionsComma private static readonly HostedToolPermissionUpdateOptionSet McpOptions = HostedToolPermissionUpdateOptionSet.Create(@"mcp"); private static readonly HostedToolPermissionUpdateOptionSet CodeInterpreterOptions = HostedToolPermissionUpdateOptionSet.Create(@"code-interpreter"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -73,7 +72,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -88,56 +87,51 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - - var __fileSearchBase = __requestBase?.FileSearch; var fileSearchEnabled = parseResult.GetValue(FileSearchOptions.Enabled); + var fileSearchEnabled = parseResult.GetValue(FileSearchOptions.Enabled); var __fileSearchSpecified = CliRuntime.WasSpecified(parseResult, FileSearchOptions.Enabled); var fileSearch = - __fileSearchSpecified || __fileSearchBase is not null + __fileSearchSpecified || __requestBase?.FileSearch is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = fileSearchEnabled!, + Enabled = fileSearchEnabled, } - : __fileSearchBase; - - var __webSearchBase = __requestBase?.WebSearch; var webSearchEnabled = parseResult.GetValue(WebSearchOptions.Enabled); + : __requestBase?.FileSearch; + var webSearchEnabled = parseResult.GetValue(WebSearchOptions.Enabled); var __webSearchSpecified = CliRuntime.WasSpecified(parseResult, WebSearchOptions.Enabled); var webSearch = - __webSearchSpecified || __webSearchBase is not null + __webSearchSpecified || __requestBase?.WebSearch is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = webSearchEnabled!, + Enabled = webSearchEnabled, } - : __webSearchBase; - - var __imageGenerationBase = __requestBase?.ImageGeneration; var imageGenerationEnabled = parseResult.GetValue(ImageGenerationOptions.Enabled); + : __requestBase?.WebSearch; + var imageGenerationEnabled = parseResult.GetValue(ImageGenerationOptions.Enabled); var __imageGenerationSpecified = CliRuntime.WasSpecified(parseResult, ImageGenerationOptions.Enabled); var imageGeneration = - __imageGenerationSpecified || __imageGenerationBase is not null + __imageGenerationSpecified || __requestBase?.ImageGeneration is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = imageGenerationEnabled!, + Enabled = imageGenerationEnabled, } - : __imageGenerationBase; - - var __mcpBase = __requestBase?.Mcp; var mcpEnabled = parseResult.GetValue(McpOptions.Enabled); + : __requestBase?.ImageGeneration; + var mcpEnabled = parseResult.GetValue(McpOptions.Enabled); var __mcpSpecified = CliRuntime.WasSpecified(parseResult, McpOptions.Enabled); var mcp = - __mcpSpecified || __mcpBase is not null + __mcpSpecified || __requestBase?.Mcp is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = mcpEnabled!, + Enabled = mcpEnabled, } - : __mcpBase; - - var __codeInterpreterBase = __requestBase?.CodeInterpreter; var codeInterpreterEnabled = parseResult.GetValue(CodeInterpreterOptions.Enabled); + : __requestBase?.Mcp; + var codeInterpreterEnabled = parseResult.GetValue(CodeInterpreterOptions.Enabled); var __codeInterpreterSpecified = CliRuntime.WasSpecified(parseResult, CodeInterpreterOptions.Enabled); var codeInterpreter = - __codeInterpreterSpecified || __codeInterpreterBase is not null + __codeInterpreterSpecified || __requestBase?.CodeInterpreter is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = codeInterpreterEnabled!, + Enabled = codeInterpreterEnabled, } - : __codeInterpreterBase; + : __requestBase?.CodeInterpreter; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs index 0c47a610..1c60ccad 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs index 17ac236b..3acbefbc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -19,18 +18,18 @@ internal static partial class ImagesCreateImageAsStreamCommandApiCommand Description = @"The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.", }; private static readonly CreateImageRequestOptionSet CreateImageRequestOptionSetOptions = CreateImageRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -47,6 +46,7 @@ public static Command Create() command.Options.Add(CreateImageRequestOptionSetOptions.ResponseFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputCompression); + command.Options.Add(CreateImageRequestOptionSetOptions.Stream); command.Options.Add(CreateImageRequestOptionSetOptions.PartialImages); command.Options.Add(CreateImageRequestOptionSetOptions.Moderation); command.Options.Add(CreateImageRequestOptionSetOptions.Background); @@ -63,7 +63,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -77,18 +77,19 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); - var n = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.N) : __requestBase is not null ? __requestBase.N : default; - var quality = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) : __requestBase is not null ? __requestBase.Quality : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) : __requestBase is not null ? __requestBase.OutputFormat : default; - var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) : __requestBase is not null ? __requestBase.OutputCompression : default; - var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) : __requestBase is not null ? __requestBase.PartialImages : default; - var moderation = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Moderation) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) : __requestBase is not null ? __requestBase.Moderation : default; - var background = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) : __requestBase is not null ? __requestBase.Background : default; - var style = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Style) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Style) : __requestBase is not null ? __requestBase.Style : default; - var user = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.User) : __requestBase is not null ? __requestBase.User : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); + var n = parseResult.GetValue(CreateImageRequestOptionSetOptions.N) ?? __requestBase?.N; + var quality = parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) ?? __requestBase?.Quality; + var responseFormat = parseResult.GetValue(CreateImageRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var outputFormat = parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) ?? __requestBase?.OutputFormat; + var outputCompression = parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) ?? __requestBase?.OutputCompression; + var stream = parseResult.GetValue(CreateImageRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var partialImages = parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) ?? __requestBase?.PartialImages; + var moderation = parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) ?? __requestBase?.Moderation; + var background = parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) ?? __requestBase?.Background; + var style = parseResult.GetValue(CreateImageRequestOptionSetOptions.Style) ?? __requestBase?.Style; + var user = parseResult.GetValue(CreateImageRequestOptionSetOptions.User) ?? __requestBase?.User; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -101,6 +102,7 @@ await CliRuntime.RunAsync(async () => responseFormat: responseFormat, outputFormat: outputFormat, outputCompression: outputCompression, + stream: stream, partialImages: partialImages, moderation: moderation, background: background, diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs index da3f2d5a..43d2c145 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -19,18 +18,18 @@ internal static partial class ImagesCreateImageCommandApiCommand Description = @"The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.", }; private static readonly CreateImageRequestOptionSet CreateImageRequestOptionSetOptions = CreateImageRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -67,6 +66,7 @@ public static Command Create() command.Options.Add(CreateImageRequestOptionSetOptions.ResponseFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputCompression); + command.Options.Add(CreateImageRequestOptionSetOptions.Stream); command.Options.Add(CreateImageRequestOptionSetOptions.PartialImages); command.Options.Add(CreateImageRequestOptionSetOptions.Moderation); command.Options.Add(CreateImageRequestOptionSetOptions.Background); @@ -83,7 +83,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -97,18 +97,19 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); - var n = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.N) : __requestBase is not null ? __requestBase.N : default; - var quality = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) : __requestBase is not null ? __requestBase.Quality : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) : __requestBase is not null ? __requestBase.OutputFormat : default; - var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) : __requestBase is not null ? __requestBase.OutputCompression : default; - var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) : __requestBase is not null ? __requestBase.PartialImages : default; - var moderation = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Moderation) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) : __requestBase is not null ? __requestBase.Moderation : default; - var background = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) : __requestBase is not null ? __requestBase.Background : default; - var style = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Style) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Style) : __requestBase is not null ? __requestBase.Style : default; - var user = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.User) : __requestBase is not null ? __requestBase.User : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); + var n = parseResult.GetValue(CreateImageRequestOptionSetOptions.N) ?? __requestBase?.N; + var quality = parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) ?? __requestBase?.Quality; + var responseFormat = parseResult.GetValue(CreateImageRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var outputFormat = parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) ?? __requestBase?.OutputFormat; + var outputCompression = parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) ?? __requestBase?.OutputCompression; + var stream = parseResult.GetValue(CreateImageRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var partialImages = parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) ?? __requestBase?.PartialImages; + var moderation = parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) ?? __requestBase?.Moderation; + var background = parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) ?? __requestBase?.Background; + var style = parseResult.GetValue(CreateImageRequestOptionSetOptions.Style) ?? __requestBase?.Style; + var user = parseResult.GetValue(CreateImageRequestOptionSetOptions.User) ?? __requestBase?.User; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -121,6 +122,7 @@ await CliRuntime.RunAsync(async () => responseFormat: responseFormat, outputFormat: outputFormat, outputCompression: outputCompression, + stream: stream, partialImages: partialImages, moderation: moderation, background: background, diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs index 403469ea..f28cc9be 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -46,18 +45,18 @@ file less than 50MB. You can provide up to 16 images. Description = @"", }; private static readonly CreateImageEditRequestOptionSet CreateImageEditRequestOptionSetOptions = CreateImageEditRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -85,6 +84,7 @@ public static Command Create() command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageEditRequestOptionSetOptions.User); + command.Options.Add(CreateImageEditRequestOptionSetOptions.Stream); command.Options.Add(CreateImageEditRequestOptionSetOptions.PartialImages); command.Options.Add(CreateImageEditRequestOptionSetOptions.Quality); command.Options.Add(Input); @@ -98,7 +98,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -113,19 +113,20 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); - var mask = CliRuntime.WasSpecified(parseResult, Mask) ? parseResult.GetValue(Mask) : __requestBase is not null ? __requestBase.Mask : default; - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; - var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : __requestBase is not null ? __requestBase.InputFidelity : default; var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); - var maskname = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Maskname) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) : __requestBase is not null ? __requestBase.Maskname : default; - var background = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) : __requestBase is not null ? __requestBase.Background : default; - var n = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) : __requestBase is not null ? __requestBase.N : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) : __requestBase is not null ? __requestBase.OutputFormat : default; - var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) : __requestBase is not null ? __requestBase.OutputCompression : default; - var user = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) : __requestBase is not null ? __requestBase.User : default; - var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) : __requestBase is not null ? __requestBase.PartialImages : default; - var quality = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) : __requestBase is not null ? __requestBase.Quality : default; + var mask = parseResult.GetValue(Mask) ?? __requestBase?.Mask; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; + var inputFidelity = parseResult.GetValue(InputFidelity) ?? __requestBase?.InputFidelity; var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); + var maskname = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) ?? __requestBase?.Maskname; + var background = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) ?? __requestBase?.Background; + var n = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) ?? __requestBase?.N; + var responseFormat = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var outputFormat = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) ?? __requestBase?.OutputFormat; + var outputCompression = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) ?? __requestBase?.OutputCompression; + var user = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) ?? __requestBase?.User; + var stream = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var partialImages = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) ?? __requestBase?.PartialImages; + var quality = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) ?? __requestBase?.Quality; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -143,6 +144,7 @@ await CliRuntime.RunAsync(async () => outputFormat: outputFormat, outputCompression: outputCompression, user: user, + stream: stream, partialImages: partialImages, quality: quality, cancellationToken: cancellationToken); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs index 9eec08f4..e94d2a89 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -46,18 +45,18 @@ file less than 50MB. You can provide up to 16 images. Description = @"", }; private static readonly CreateImageEditRequestOptionSet CreateImageEditRequestOptionSetOptions = CreateImageEditRequestOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -105,6 +104,7 @@ public static Command Create() command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageEditRequestOptionSetOptions.User); + command.Options.Add(CreateImageEditRequestOptionSetOptions.Stream); command.Options.Add(CreateImageEditRequestOptionSetOptions.PartialImages); command.Options.Add(CreateImageEditRequestOptionSetOptions.Quality); command.Options.Add(Input); @@ -118,7 +118,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -133,19 +133,20 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); - var mask = CliRuntime.WasSpecified(parseResult, Mask) ? parseResult.GetValue(Mask) : __requestBase is not null ? __requestBase.Mask : default; - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; - var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : __requestBase is not null ? __requestBase.InputFidelity : default; var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); - var maskname = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Maskname) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) : __requestBase is not null ? __requestBase.Maskname : default; - var background = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) : __requestBase is not null ? __requestBase.Background : default; - var n = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) : __requestBase is not null ? __requestBase.N : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.ResponseFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) : __requestBase is not null ? __requestBase.OutputFormat : default; - var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) : __requestBase is not null ? __requestBase.OutputCompression : default; - var user = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) : __requestBase is not null ? __requestBase.User : default; - var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) : __requestBase is not null ? __requestBase.PartialImages : default; - var quality = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) : __requestBase is not null ? __requestBase.Quality : default; + var mask = parseResult.GetValue(Mask) ?? __requestBase?.Mask; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; + var inputFidelity = parseResult.GetValue(InputFidelity) ?? __requestBase?.InputFidelity; var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); + var maskname = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) ?? __requestBase?.Maskname; + var background = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) ?? __requestBase?.Background; + var n = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) ?? __requestBase?.N; + var responseFormat = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.ResponseFormat) ?? __requestBase?.ResponseFormat; + var outputFormat = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) ?? __requestBase?.OutputFormat; + var outputCompression = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) ?? __requestBase?.OutputCompression; + var user = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) ?? __requestBase?.User; + var stream = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Stream) ?? __requestBase?.Stream; + var partialImages = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) ?? __requestBase?.PartialImages; + var quality = parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) ?? __requestBase?.Quality; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -163,6 +164,7 @@ await CliRuntime.RunAsync(async () => outputFormat: outputFormat, outputCompression: outputCompression, user: user, + stream: stream, partialImages: partialImages, quality: quality, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs index d8f4e7f8..288a35fb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -51,18 +50,18 @@ internal static partial class ImagesCreateImageVariationCommandApiCommand Description = @"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids). ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -109,7 +108,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -125,11 +124,11 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); var imagename = parseResult.GetRequiredValue(Imagename); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var n = CliRuntime.WasSpecified(parseResult, N) ? parseResult.GetValue(N) : __requestBase is not null ? __requestBase.N : default; - var responseFormat = CliRuntime.WasSpecified(parseResult, ResponseFormat) ? parseResult.GetValue(ResponseFormat) : __requestBase is not null ? __requestBase.ResponseFormat : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; - var user = CliRuntime.WasSpecified(parseResult, User) ? parseResult.GetValue(User) : __requestBase is not null ? __requestBase.User : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var n = parseResult.GetValue(N) ?? __requestBase?.N; + var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; + var user = parseResult.GetValue(User) ?? __requestBase?.User; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs index ad4c225e..c1cff2b3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -26,18 +25,18 @@ internal static partial class InvitesCreateInviteCommandApiCommand { Description = @"An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. If empty list is passed, the user will not be invited to any projects, including the default one.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -80,7 +79,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -96,7 +95,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var email = parseResult.GetRequiredValue(Email); var role = parseResult.GetRequiredValue(Role); - var projects = CliRuntime.WasSpecified(parseResult, Projects) ? parseResult.GetValue(Projects) : __requestBase is not null ? __requestBase.Projects : default; + var projects = parseResult.GetValue(Projects) ?? __requestBase?.Projects; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs index da53ace6..b600dcb5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs index 9d5fb593..8a04498a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs index 54bb0183..e3adb5e4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs index 31e97993..a091f616 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs index fd043ab9..df398259 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs index 09111b31..17d147d6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs index 28277250..19387bc7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs index db1e950c..4ae88039 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs index 539bc2fa..8796c42c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs index 223ce086..34dddfad 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs index 33c13390..fba37fb3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs index bb6dc5a4..788fcc09 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -7,7 +6,7 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ModerationsCreateModerationCommandApiCommand { - private static Option, global::System.Collections.Generic.IList>>> InputOption { get; } = new( + private static Option, global::System.Collections.Generic.IList>>> Input { get; } = new( name: @"--input") { Description = @"Input (or inputs) to classify. Can be a single string, an array of strings, or @@ -24,18 +23,18 @@ [the moderation guide](/docs/guides/moderation), and learn about available models [here](/docs/models#moderation). ", }; - private static Option RequestInput { get; } = new(@"--request-input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -66,20 +65,20 @@ public static Command Create() var command = new Command(@"create-moderation", @"Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation). "); - command.Options.Add(InputOption); + command.Options.Add(Input); command.Options.Add(Model); - command.Options.Add(RequestInput); + command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(RequestInput) is not null; + var hasInput = result.GetResult(Input) is not null; var hasRequestJson = result.GetResult(RequestJson) is not null; var hasRequestFile = result.GetResult(RequestFile) is not null; var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -88,13 +87,13 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - RequestInput, + Input, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var input = parseResult.GetRequiredValue(InputOption); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; + var input = parseResult.GetRequiredValue(Input); + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs index e0a3170a..70db9b59 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs index 3aa6f2e2..4ecd61fa 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs index eaaeb5d7..c21c032a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs index bfb9073e..e8954e52 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs index c2a77a46..4bfb8ce9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs index 3f78ee58..e35d4a6d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs index de2d8073..cbd1b94e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs index 63932dce..b43e59fc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs index 89acd619..56fcb4c8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs index 757a2189..d1e0b4ce 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs index 44af74d5..e3cd1ef2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs index 247d955d..7d995c34 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs index 34a6a636..ead2c3fd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs index f5cac4b9..e8d92728 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class ProjectsCreateProjectCommandApiCommand { Description = @"External key ID to associate with the project.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -93,8 +92,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var name = parseResult.GetRequiredValue(NameOption); - var geography = CliRuntime.WasSpecified(parseResult, Geography) ? parseResult.GetValue(Geography) : __requestBase is not null ? __requestBase.Geography : default; - var externalKeyId = CliRuntime.WasSpecified(parseResult, ExternalKeyId) ? parseResult.GetValue(ExternalKeyId) : __requestBase is not null ? __requestBase.ExternalKeyId : default; + var geography = parseResult.GetValue(Geography) ?? __requestBase?.Geography; + var externalKeyId = parseResult.GetValue(ExternalKeyId) ?? __requestBase?.ExternalKeyId; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs index 62f81d7c..60fe0fbb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs index d436e320..cfc7a063 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -31,18 +30,18 @@ internal static partial class ProjectsCreateProjectUserCommandApiCommand Description = @"`owner` or `member`", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -86,7 +85,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -101,8 +100,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - var userId = CliRuntime.WasSpecified(parseResult, UserId) ? parseResult.GetValue(UserId) : __requestBase is not null ? __requestBase.UserId : default; - var email = CliRuntime.WasSpecified(parseResult, Email) ? parseResult.GetValue(Email) : __requestBase is not null ? __requestBase.Email : default; + var userId = parseResult.GetValue(UserId) ?? __requestBase?.UserId; + var email = parseResult.GetValue(Email) ?? __requestBase?.Email; var role = parseResult.GetRequiredValue(Role); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs index 31ecea2d..9818b9cb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs index 987e3df0..fb0c76c2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs index 111182bf..ff95cfe2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs index 7ff389a7..b256ced3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs index 37080ba8..bf46c13a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs index 68a35c54..42dcd7d7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs index 50f00ccb..bd783cb1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs index 866d3e33..0ca22675 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs index bb1e4290..af41d183 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs index 9bfb10d1..772ed381 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -30,18 +29,18 @@ internal static partial class ProjectsModifyProjectCommandApiCommand { Description = @"Geography for the project.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -85,7 +84,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -100,9 +99,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var externalKeyId = CliRuntime.WasSpecified(parseResult, ExternalKeyId) ? parseResult.GetValue(ExternalKeyId) : __requestBase is not null ? __requestBase.ExternalKeyId : default; - var geography = CliRuntime.WasSpecified(parseResult, Geography) ? parseResult.GetValue(Geography) : __requestBase is not null ? __requestBase.Geography : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var externalKeyId = parseResult.GetValue(ExternalKeyId) ?? __requestBase?.ExternalKeyId; + var geography = parseResult.GetValue(Geography) ?? __requestBase?.Geography; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs index 168f0560..f1322360 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs index dbcd0ec9..5d919f24 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -54,18 +53,18 @@ internal static partial class ProjectsModifyProjectRateLimitCommandApiCommand { Description = @"The maximum batch input tokens per day. Only relevant for certain models.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -113,7 +112,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -129,12 +128,12 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var rateLimitId = parseResult.GetRequiredValue(RateLimitId); - var maxRequestsPer1Minute = CliRuntime.WasSpecified(parseResult, MaxRequestsPer1Minute) ? parseResult.GetValue(MaxRequestsPer1Minute) : __requestBase is not null ? __requestBase.MaxRequestsPer1Minute : default; - var maxTokensPer1Minute = CliRuntime.WasSpecified(parseResult, MaxTokensPer1Minute) ? parseResult.GetValue(MaxTokensPer1Minute) : __requestBase is not null ? __requestBase.MaxTokensPer1Minute : default; - var maxImagesPer1Minute = CliRuntime.WasSpecified(parseResult, MaxImagesPer1Minute) ? parseResult.GetValue(MaxImagesPer1Minute) : __requestBase is not null ? __requestBase.MaxImagesPer1Minute : default; - var maxAudioMegabytesPer1Minute = CliRuntime.WasSpecified(parseResult, MaxAudioMegabytesPer1Minute) ? parseResult.GetValue(MaxAudioMegabytesPer1Minute) : __requestBase is not null ? __requestBase.MaxAudioMegabytesPer1Minute : default; - var maxRequestsPer1Day = CliRuntime.WasSpecified(parseResult, MaxRequestsPer1Day) ? parseResult.GetValue(MaxRequestsPer1Day) : __requestBase is not null ? __requestBase.MaxRequestsPer1Day : default; - var batch1DayMaxInputTokens = CliRuntime.WasSpecified(parseResult, Batch1DayMaxInputTokens) ? parseResult.GetValue(Batch1DayMaxInputTokens) : __requestBase is not null ? __requestBase.Batch1DayMaxInputTokens : default; + var maxRequestsPer1Minute = parseResult.GetValue(MaxRequestsPer1Minute) ?? __requestBase?.MaxRequestsPer1Minute; + var maxTokensPer1Minute = parseResult.GetValue(MaxTokensPer1Minute) ?? __requestBase?.MaxTokensPer1Minute; + var maxImagesPer1Minute = parseResult.GetValue(MaxImagesPer1Minute) ?? __requestBase?.MaxImagesPer1Minute; + var maxAudioMegabytesPer1Minute = parseResult.GetValue(MaxAudioMegabytesPer1Minute) ?? __requestBase?.MaxAudioMegabytesPer1Minute; + var maxRequestsPer1Day = parseResult.GetValue(MaxRequestsPer1Day) ?? __requestBase?.MaxRequestsPer1Day; + var batch1DayMaxInputTokens = parseResult.GetValue(Batch1DayMaxInputTokens) ?? __requestBase?.Batch1DayMaxInputTokens; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs index 09bb72ae..d05e10c3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class ProjectsModifyProjectUserCommandApiCommand { Description = @"`owner` or `member`", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,7 +93,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var userId = parseResult.GetRequiredValue(UserId); - var role = CliRuntime.WasSpecified(parseResult, Role) ? parseResult.GetValue(Role) : __requestBase is not null ? __requestBase.Role : default; + var role = parseResult.GetValue(Role) ?? __requestBase?.Role; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs index da5f691b..613f2b40 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs index 45dd531b..833a303b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs index 5e48cde7..4016bed3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs index 7682b1be..26d9bff9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs index a52e8ff3..729ade4b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs index 1f3e1bc5..5dab70ab 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -30,18 +29,18 @@ internal static partial class ProjectsUpdateProjectServiceAccountCommandApiComma { Description = @"The updated service account role.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -85,7 +84,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -101,8 +100,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var serviceAccountId = parseResult.GetRequiredValue(ServiceAccountId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var role = CliRuntime.WasSpecified(parseResult, Role) ? parseResult.GetValue(Role) : __requestBase is not null ? __requestBase.Role : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var role = parseResult.GetValue(Role) ?? __requestBase?.Role; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs index e70961e8..4a968617 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -86,18 +85,18 @@ given model. Defaults to `inf`. private static readonly RealtimeSessionCreateRequestGAOptionSet RealtimeSessionCreateRequestGAOptionSetOptions = RealtimeSessionCreateRequestGAOptionSet.Create(); private static readonly PromptVariant1OptionSet PromptOptions = PromptVariant1OptionSet.Create(@"prompt"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -132,7 +131,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -147,30 +146,29 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var callId = parseResult.GetRequiredValue(CallId); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; - var audio = CliRuntime.WasSpecified(parseResult, Audio) ? parseResult.GetValue(Audio) : __requestBase is not null ? __requestBase.Audio : default; - var tracing = CliRuntime.WasSpecified(parseResult, Tracing) ? parseResult.GetValue(Tracing) : __requestBase is not null ? __requestBase.Tracing : default; - var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default; - var toolChoice = CliRuntime.WasSpecified(parseResult, ToolChoice) ? parseResult.GetValue(ToolChoice) : __requestBase is not null ? __requestBase.ToolChoice : default; - var reasoning = CliRuntime.WasSpecified(parseResult, Reasoning) ? parseResult.GetValue(Reasoning) : __requestBase is not null ? __requestBase.Reasoning : default; - var maxOutputTokens = CliRuntime.WasSpecified(parseResult, MaxOutputTokens) ? parseResult.GetValue(MaxOutputTokens) : __requestBase is not null ? __requestBase.MaxOutputTokens : default; - var truncation = CliRuntime.WasSpecified(parseResult, Truncation) ? parseResult.GetValue(Truncation) : __requestBase is not null ? __requestBase.Truncation : default; var type = CliRuntime.WasSpecified(parseResult, RealtimeSessionCreateRequestGAOptionSetOptions.Type) ? parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Type) : __requestBase is not null ? __requestBase.Type : default; - var outputModalities = CliRuntime.WasSpecified(parseResult, RealtimeSessionCreateRequestGAOptionSetOptions.OutputModalities) ? parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.OutputModalities) : __requestBase is not null ? __requestBase.OutputModalities : default; - var instructions = CliRuntime.WasSpecified(parseResult, RealtimeSessionCreateRequestGAOptionSetOptions.Instructions) ? parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var include = CliRuntime.WasSpecified(parseResult, RealtimeSessionCreateRequestGAOptionSetOptions.Include) ? parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Include) : __requestBase is not null ? __requestBase.Include : default; - var parallelToolCalls = CliRuntime.WasSpecified(parseResult, RealtimeSessionCreateRequestGAOptionSetOptions.ParallelToolCalls) ? parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.ParallelToolCalls) : __requestBase is not null ? __requestBase.ParallelToolCalls : default; - - var __promptBase = __requestBase?.Prompt; var promptId = parseResult.GetValue(PromptOptions.Id); - var promptVersion = CliRuntime.WasSpecified(parseResult, PromptOptions.Version) ? parseResult.GetValue(PromptOptions.Version) : __promptBase is not null ? __promptBase.Version : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var audio = parseResult.GetValue(Audio) ?? __requestBase?.Audio; + var tracing = parseResult.GetValue(Tracing) ?? __requestBase?.Tracing; + var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools; + var toolChoice = parseResult.GetValue(ToolChoice) ?? __requestBase?.ToolChoice; + var reasoning = parseResult.GetValue(Reasoning) ?? __requestBase?.Reasoning; + var maxOutputTokens = parseResult.GetValue(MaxOutputTokens) ?? __requestBase?.MaxOutputTokens; + var truncation = parseResult.GetValue(Truncation) ?? __requestBase?.Truncation; var type = parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Type) ?? __requestBase?.Type; + var outputModalities = parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.OutputModalities) ?? __requestBase?.OutputModalities; + var instructions = parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Instructions) ?? __requestBase?.Instructions; + var include = parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.Include) ?? __requestBase?.Include; + var parallelToolCalls = parseResult.GetValue(RealtimeSessionCreateRequestGAOptionSetOptions.ParallelToolCalls) ?? __requestBase?.ParallelToolCalls; + var promptId = parseResult.GetValue(PromptOptions.Id); + var promptVersion = parseResult.GetValue(PromptOptions.Version) ?? __requestBase?.Prompt?.Version; var __promptSpecified = CliRuntime.WasSpecified(parseResult, PromptOptions.Id) || CliRuntime.WasSpecified(parseResult, PromptOptions.Version); var prompt = - __promptSpecified || __promptBase is not null + __promptSpecified || __requestBase?.Prompt is not null ? new global::tryAGI.OpenAI.PromptVariant1 { - Id = promptId!, + Id = promptId, Version = promptVersion, } - : __promptBase; + : __requestBase?.Prompt; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs index b1ad49b4..365c8235 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -14,18 +13,18 @@ internal static partial class RealtimeCreateCallCommandApiCommand Required = true, }; private static readonly RealtimeSessionCreateRequestGAOptionSet SessionOptions = RealtimeSessionCreateRequestGAOptionSet.Create(@"session"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -71,7 +70,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -86,15 +85,14 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var sdp = parseResult.GetRequiredValue(Sdp); - - var __sessionBase = __requestBase?.Session; var sessionType = CliRuntime.WasSpecified(parseResult, SessionOptions.Type) ? parseResult.GetValue(SessionOptions.Type) : __sessionBase is not null ? __sessionBase.Type : default; - var sessionOutputModalities = CliRuntime.WasSpecified(parseResult, SessionOptions.OutputModalities) ? parseResult.GetValue(SessionOptions.OutputModalities) : __sessionBase is not null ? __sessionBase.OutputModalities : default; - var sessionInstructions = CliRuntime.WasSpecified(parseResult, SessionOptions.Instructions) ? parseResult.GetValue(SessionOptions.Instructions) : __sessionBase is not null ? __sessionBase.Instructions : default; - var sessionInclude = CliRuntime.WasSpecified(parseResult, SessionOptions.Include) ? parseResult.GetValue(SessionOptions.Include) : __sessionBase is not null ? __sessionBase.Include : default; - var sessionParallelToolCalls = CliRuntime.WasSpecified(parseResult, SessionOptions.ParallelToolCalls) ? parseResult.GetValue(SessionOptions.ParallelToolCalls) : __sessionBase is not null ? __sessionBase.ParallelToolCalls : default; + var sessionType = parseResult.GetValue(SessionOptions.Type) ?? __requestBase?.Session?.Type; + var sessionOutputModalities = parseResult.GetValue(SessionOptions.OutputModalities) ?? __requestBase?.Session?.OutputModalities; + var sessionInstructions = parseResult.GetValue(SessionOptions.Instructions) ?? __requestBase?.Session?.Instructions; + var sessionInclude = parseResult.GetValue(SessionOptions.Include) ?? __requestBase?.Session?.Include; + var sessionParallelToolCalls = parseResult.GetValue(SessionOptions.ParallelToolCalls) ?? __requestBase?.Session?.ParallelToolCalls; var __sessionSpecified = CliRuntime.WasSpecified(parseResult, SessionOptions.Type) || CliRuntime.WasSpecified(parseResult, SessionOptions.OutputModalities) || CliRuntime.WasSpecified(parseResult, SessionOptions.Instructions) || CliRuntime.WasSpecified(parseResult, SessionOptions.Include) || CliRuntime.WasSpecified(parseResult, SessionOptions.ParallelToolCalls); var session = - __sessionSpecified || __sessionBase is not null + __sessionSpecified || __requestBase?.Session is not null ? new global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA { Type = sessionType, @@ -103,7 +101,7 @@ await CliRuntime.RunAsync(async () => Include = sessionInclude, ParallelToolCalls = sessionParallelToolCalls, } - : __sessionBase; + : __requestBase?.Session; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs index a9803aa0..c753538e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ until it expires. session or a transcription session. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -90,7 +89,7 @@ Returns the created client secret and the effective session object. The client s var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -104,8 +103,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; - var session = CliRuntime.WasSpecified(parseResult, Session) ? parseResult.GetValue(Session) : __requestBase is not null ? __requestBase.Session : default; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var session = parseResult.GetValue(Session) ?? __requestBase?.Session; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs index 862c912a..87b3800a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -139,18 +138,18 @@ given model. Defaults to `inf`. ", }; private static readonly PromptVariant1OptionSet PromptOptions = PromptVariant1OptionSet.Create(@"prompt"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -215,7 +214,7 @@ a usable ephemeral API token that can be used to authenticate browser clients var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -230,32 +229,31 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var clientSecret = parseResult.GetRequiredValue(ClientSecret); - var modalities = CliRuntime.WasSpecified(parseResult, Modalities) ? parseResult.GetValue(Modalities) : __requestBase is not null ? __requestBase.Modalities : default; - var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; - var voice = CliRuntime.WasSpecified(parseResult, Voice) ? parseResult.GetValue(Voice) : __requestBase is not null ? __requestBase.Voice : default; - var inputAudioFormat = CliRuntime.WasSpecified(parseResult, InputAudioFormat) ? parseResult.GetValue(InputAudioFormat) : __requestBase is not null ? __requestBase.InputAudioFormat : default; - var outputAudioFormat = CliRuntime.WasSpecified(parseResult, OutputAudioFormat) ? parseResult.GetValue(OutputAudioFormat) : __requestBase is not null ? __requestBase.OutputAudioFormat : default; - var inputAudioTranscription = CliRuntime.WasSpecified(parseResult, InputAudioTranscription) ? parseResult.GetValue(InputAudioTranscription) : __requestBase is not null ? __requestBase.InputAudioTranscription : default; - var speed = CliRuntime.WasSpecified(parseResult, Speed) ? parseResult.GetValue(Speed) : __requestBase is not null ? __requestBase.Speed : default; - var tracing = CliRuntime.WasSpecified(parseResult, Tracing) ? parseResult.GetValue(Tracing) : __requestBase is not null ? __requestBase.Tracing : default; - var turnDetection = CliRuntime.WasSpecified(parseResult, TurnDetection) ? parseResult.GetValue(TurnDetection) : __requestBase is not null ? __requestBase.TurnDetection : default; - var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default; - var toolChoice = CliRuntime.WasSpecified(parseResult, ToolChoice) ? parseResult.GetValue(ToolChoice) : __requestBase is not null ? __requestBase.ToolChoice : default; - var temperature = CliRuntime.WasSpecified(parseResult, Temperature) ? parseResult.GetValue(Temperature) : __requestBase is not null ? __requestBase.Temperature : default; - var maxResponseOutputTokens = CliRuntime.WasSpecified(parseResult, MaxResponseOutputTokens) ? parseResult.GetValue(MaxResponseOutputTokens) : __requestBase is not null ? __requestBase.MaxResponseOutputTokens : default; - var truncation = CliRuntime.WasSpecified(parseResult, Truncation) ? parseResult.GetValue(Truncation) : __requestBase is not null ? __requestBase.Truncation : default; - - var __promptBase = __requestBase?.Prompt; var promptId = parseResult.GetValue(PromptOptions.Id); - var promptVersion = CliRuntime.WasSpecified(parseResult, PromptOptions.Version) ? parseResult.GetValue(PromptOptions.Version) : __promptBase is not null ? __promptBase.Version : default; + var modalities = parseResult.GetValue(Modalities) ?? __requestBase?.Modalities; + var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var voice = parseResult.GetValue(Voice) ?? __requestBase?.Voice; + var inputAudioFormat = parseResult.GetValue(InputAudioFormat) ?? __requestBase?.InputAudioFormat; + var outputAudioFormat = parseResult.GetValue(OutputAudioFormat) ?? __requestBase?.OutputAudioFormat; + var inputAudioTranscription = parseResult.GetValue(InputAudioTranscription) ?? __requestBase?.InputAudioTranscription; + var speed = parseResult.GetValue(Speed) ?? __requestBase?.Speed; + var tracing = parseResult.GetValue(Tracing) ?? __requestBase?.Tracing; + var turnDetection = parseResult.GetValue(TurnDetection) ?? __requestBase?.TurnDetection; + var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools; + var toolChoice = parseResult.GetValue(ToolChoice) ?? __requestBase?.ToolChoice; + var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; + var maxResponseOutputTokens = parseResult.GetValue(MaxResponseOutputTokens) ?? __requestBase?.MaxResponseOutputTokens; + var truncation = parseResult.GetValue(Truncation) ?? __requestBase?.Truncation; + var promptId = parseResult.GetValue(PromptOptions.Id); + var promptVersion = parseResult.GetValue(PromptOptions.Version) ?? __requestBase?.Prompt?.Version; var __promptSpecified = CliRuntime.WasSpecified(parseResult, PromptOptions.Id) || CliRuntime.WasSpecified(parseResult, PromptOptions.Version); var prompt = - __promptSpecified || __promptBase is not null + __promptSpecified || __requestBase?.Prompt is not null ? new global::tryAGI.OpenAI.PromptVariant1 { - Id = promptId!, + Id = promptId, Version = promptVersion, } - : __promptBase; + : __requestBase?.Prompt; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs index 3c71ccdb..9087cbd1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -46,18 +45,18 @@ single channel (mono), and little-endian byte order. `item.input_audio_transcription.logprobs` ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -111,7 +110,7 @@ a usable ephemeral API token that can be used to authenticate browser clients var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -125,11 +124,11 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var turnDetection = CliRuntime.WasSpecified(parseResult, TurnDetection) ? parseResult.GetValue(TurnDetection) : __requestBase is not null ? __requestBase.TurnDetection : default; - var inputAudioNoiseReduction = CliRuntime.WasSpecified(parseResult, InputAudioNoiseReduction) ? parseResult.GetValue(InputAudioNoiseReduction) : __requestBase is not null ? __requestBase.InputAudioNoiseReduction : default; - var inputAudioFormat = CliRuntime.WasSpecified(parseResult, InputAudioFormat) ? parseResult.GetValue(InputAudioFormat) : __requestBase is not null ? __requestBase.InputAudioFormat : default; - var inputAudioTranscription = CliRuntime.WasSpecified(parseResult, InputAudioTranscription) ? parseResult.GetValue(InputAudioTranscription) : __requestBase is not null ? __requestBase.InputAudioTranscription : default; - var include = CliRuntime.WasSpecified(parseResult, Include) ? parseResult.GetValue(Include) : __requestBase is not null ? __requestBase.Include : default; + var turnDetection = parseResult.GetValue(TurnDetection) ?? __requestBase?.TurnDetection; + var inputAudioNoiseReduction = parseResult.GetValue(InputAudioNoiseReduction) ?? __requestBase?.InputAudioNoiseReduction; + var inputAudioFormat = parseResult.GetValue(InputAudioFormat) ?? __requestBase?.InputAudioFormat; + var inputAudioTranscription = parseResult.GetValue(InputAudioTranscription) ?? __requestBase?.InputAudioTranscription; + var include = parseResult.GetValue(Include) ?? __requestBase?.Include; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs index 706780fc..b88a5113 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -25,18 +24,18 @@ audio in and translated audio plus transcript deltas out continuously. ", Required = true, }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -87,7 +86,7 @@ The client secret is a string that looks like `ek_1234`. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -101,7 +100,7 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; var session = parseResult.GetRequiredValue(Session); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs index fe60a563..63869e15 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs index be815633..1b0f0e72 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs index dec9ddbf..10a617e0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -21,18 +20,18 @@ internal static partial class RealtimeRejectCallCommandApiCommand Description = @"SIP response code to send back to the caller. Defaults to `603` (Decline) when omitted.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -54,7 +53,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -69,7 +68,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var callId = parseResult.GetRequiredValue(CallId); - var statusCode = CliRuntime.WasSpecified(parseResult, StatusCode) ? parseResult.GetValue(StatusCode) : __requestBase is not null ? __requestBase.StatusCode : default; + var statusCode = parseResult.GetValue(StatusCode) ?? __requestBase?.StatusCode; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs index 0a27a1aa..2484caab 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs index 3a0e5f3d..b62cedd4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -8,18 +7,18 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ResponsesCreateAModelResponseAsStreamCommandApiCommand { - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -47,7 +46,7 @@ or [file search](/docs/guides/tools-file-search) to use your own data var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount != 1) { - result.AddError(@"Specify exactly one of --input, --request-json, or --request-file."); + result.AddError("Specify exactly one of --input, --request-json, or --request-file."); } }); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs index 7c578aed..80539dda 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -8,18 +7,18 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ResponsesCreateAModelResponseCommandApiCommand { - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -67,7 +66,7 @@ or [file search](/docs/guides/tools-file-search) to use your own data var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount != 1) { - result.AddError(@"Specify exactly one of --input, --request-json, or --request-file."); + result.AddError("Specify exactly one of --input, --request-json, or --request-file."); } }); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs index 8122706b..10d8ae19 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs index b74f446f..09979d5c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs index adfe0ae6..00f0591f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs index e410daf3..0d16fb1a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs index 2ad41b6f..646e551d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs index 0aadd094..15208b42 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs index 28ca919f..0f05ac18 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs index c057600e..7644af0e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs index 955b64e1..bcd447d2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -8,18 +7,18 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class RolesCreateOrganizationRoleCommandApiCommand { private static readonly PublicCreateOrganizationRoleBodyOptionSet PublicCreateOrganizationRoleBodyOptionSetOptions = PublicCreateOrganizationRoleBodyOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -62,7 +61,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -77,7 +76,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var roleName = parseResult.GetRequiredValue(PublicCreateOrganizationRoleBodyOptionSetOptions.RoleName); var permissions = parseResult.GetRequiredValue(PublicCreateOrganizationRoleBodyOptionSetOptions.Permissions); - var description = CliRuntime.WasSpecified(parseResult, PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; + var description = parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs index ff40c56f..f1b44b27 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -13,18 +12,18 @@ internal static partial class RolesCreateProjectRoleCommandApiCommand Description = @"The ID of the project to update.", }; private static readonly PublicCreateOrganizationRoleBodyOptionSet PublicCreateOrganizationRoleBodyOptionSetOptions = PublicCreateOrganizationRoleBodyOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -67,7 +66,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -83,7 +82,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var roleName = parseResult.GetRequiredValue(PublicCreateOrganizationRoleBodyOptionSetOptions.RoleName); var permissions = parseResult.GetRequiredValue(PublicCreateOrganizationRoleBodyOptionSetOptions.Permissions); - var description = CliRuntime.WasSpecified(parseResult, PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; + var description = parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs index 2b1c2a0c..c47d8afb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs index a311b34e..58d99e65 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs index 4b84b4f1..60b4df2b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs index 05c7ec7d..94fbcfb4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs index 041c9293..5c8d9873 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs index 36e26e15..3f5c2f13 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs index c8879677..05734115 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -19,18 +18,18 @@ internal static partial class RolesUpdateOrganizationRoleCommandApiCommand Description = @"Updated set of permissions for the role.", }; private static readonly PublicUpdateOrganizationRoleBodyOptionSet PublicUpdateOrganizationRoleBodyOptionSetOptions = PublicUpdateOrganizationRoleBodyOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -73,7 +72,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -88,8 +87,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var roleId = parseResult.GetRequiredValue(RoleId); - var permissions = CliRuntime.WasSpecified(parseResult, Permissions) ? parseResult.GetValue(Permissions) : __requestBase is not null ? __requestBase.Permissions : default; var description = CliRuntime.WasSpecified(parseResult, PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; - var roleName = CliRuntime.WasSpecified(parseResult, PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ? parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) : __requestBase is not null ? __requestBase.RoleName : default; + var permissions = parseResult.GetValue(Permissions) ?? __requestBase?.Permissions; var description = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; + var roleName = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ?? __requestBase?.RoleName; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs index 86bbd723..e33e7e33 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -25,18 +24,18 @@ internal static partial class RolesUpdateProjectRoleCommandApiCommand Description = @"Updated set of permissions for the role.", }; private static readonly PublicUpdateOrganizationRoleBodyOptionSet PublicUpdateOrganizationRoleBodyOptionSetOptions = PublicUpdateOrganizationRoleBodyOptionSet.Create(); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -80,7 +79,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -96,8 +95,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var roleId = parseResult.GetRequiredValue(RoleId); - var permissions = CliRuntime.WasSpecified(parseResult, Permissions) ? parseResult.GetValue(Permissions) : __requestBase is not null ? __requestBase.Permissions : default; var description = CliRuntime.WasSpecified(parseResult, PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; - var roleName = CliRuntime.WasSpecified(parseResult, PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ? parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) : __requestBase is not null ? __requestBase.RoleName : default; + var permissions = parseResult.GetValue(Permissions) ?? __requestBase?.Permissions; var description = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; + var roleName = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ?? __requestBase?.RoleName; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs index 51bda3a3..4932067e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs index 131730d3..854620fb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +22,18 @@ internal static partial class SkillsCreateSkillVersionCommandApiCommand private static Option Default { get; } = CliRuntime.CreateNullableBoolOption( name: @"--default", description: @"Whether to set this version as the default."); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -77,7 +76,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -93,7 +92,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var skillId = parseResult.GetRequiredValue(SkillId); var files = parseResult.GetRequiredValue(Files); - var @default = CliRuntime.WasSpecified(parseResult, Default) ? parseResult.GetValue(Default) : __requestBase is not null ? __requestBase.Default : default; + var @default = parseResult.GetValue(Default) ?? __requestBase?.Default; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs index 22c529c4..ec16a24a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs index ccaa914e..fcf92b77 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs index 2e2a0149..6e7141e3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs index ef796895..6869ba7c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs index 087895ae..9f855f77 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs index 838795f6..1e436da0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs index 0309f7e2..fd4b32b2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs index 8e52d927..d2283088 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs index 314c2ec7..b1d1247c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs index d71c5789..2d9a733f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -10,18 +9,18 @@ internal static partial class SpendAlertsCreateOrganizationSpendAlertCommandApiC private static readonly CreateSpendAlertBodyOptionSet CreateSpendAlertBodyOptionSetOptions = CreateSpendAlertBodyOptionSet.Create(); private static readonly SpendAlertNotificationChannelOptionSet NotificationChannelOptions = SpendAlertNotificationChannelOptionSet.Create(@"notification-channel"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -66,7 +65,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -80,22 +79,21 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var thresholdAmount = parseResult.GetRequiredValue(CreateSpendAlertBodyOptionSetOptions.ThresholdAmount); - var currency = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Currency) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) : __requestBase is not null ? __requestBase.Currency : default; - var interval = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Interval) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) : __requestBase is not null ? __requestBase.Interval : default; - - var __notificationChannelBase = __requestBase?.NotificationChannel; var notificationChannelType = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) ? parseResult.GetValue(NotificationChannelOptions.Type) : __notificationChannelBase is not null ? __notificationChannelBase.Type : default; + var currency = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; + var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; + var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; var notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; + var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __notificationChannelBase is not null + __notificationChannelSpecified || __requestBase?.NotificationChannel is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients!, + Recipients = notificationChannelRecipients, SubjectPrefix = notificationChannelSubjectPrefix, } - : __notificationChannelBase; + : __requestBase?.NotificationChannel; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -103,7 +101,7 @@ await CliRuntime.RunAsync(async () => thresholdAmount: thresholdAmount, currency: currency, interval: interval, - notificationChannel: notificationChannel!, + notificationChannel: notificationChannel, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs index 7a5a80d9..5f2edbe2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -15,18 +14,18 @@ internal static partial class SpendAlertsCreateProjectSpendAlertCommandApiComman private static readonly CreateSpendAlertBodyOptionSet CreateSpendAlertBodyOptionSetOptions = CreateSpendAlertBodyOptionSet.Create(); private static readonly SpendAlertNotificationChannelOptionSet NotificationChannelOptions = SpendAlertNotificationChannelOptionSet.Create(@"notification-channel"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -71,7 +70,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -86,22 +85,21 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var thresholdAmount = parseResult.GetRequiredValue(CreateSpendAlertBodyOptionSetOptions.ThresholdAmount); - var currency = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Currency) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) : __requestBase is not null ? __requestBase.Currency : default; - var interval = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Interval) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) : __requestBase is not null ? __requestBase.Interval : default; - - var __notificationChannelBase = __requestBase?.NotificationChannel; var notificationChannelType = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) ? parseResult.GetValue(NotificationChannelOptions.Type) : __notificationChannelBase is not null ? __notificationChannelBase.Type : default; + var currency = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; + var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; + var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; var notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; + var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __notificationChannelBase is not null + __notificationChannelSpecified || __requestBase?.NotificationChannel is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients!, + Recipients = notificationChannelRecipients, SubjectPrefix = notificationChannelSubjectPrefix, } - : __notificationChannelBase; + : __requestBase?.NotificationChannel; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -110,7 +108,7 @@ await CliRuntime.RunAsync(async () => thresholdAmount: thresholdAmount, currency: currency, interval: interval, - notificationChannel: notificationChannel!, + notificationChannel: notificationChannel, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs index 39fc706f..c1a6f106 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs index 6d0590a2..b44fd35c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs index 78741726..b507c501 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs index d3eec14e..acd3c918 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs index 8286e7a7..f74af316 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -15,18 +14,18 @@ internal static partial class SpendAlertsUpdateOrganizationSpendAlertCommandApiC private static readonly CreateSpendAlertBodyOptionSet CreateSpendAlertBodyOptionSetOptions = CreateSpendAlertBodyOptionSet.Create(); private static readonly SpendAlertNotificationChannelOptionSet NotificationChannelOptions = SpendAlertNotificationChannelOptionSet.Create(@"notification-channel"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -71,7 +70,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -86,22 +85,21 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var alertId = parseResult.GetRequiredValue(AlertId); var thresholdAmount = parseResult.GetRequiredValue(CreateSpendAlertBodyOptionSetOptions.ThresholdAmount); - var currency = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Currency) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) : __requestBase is not null ? __requestBase.Currency : default; - var interval = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Interval) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) : __requestBase is not null ? __requestBase.Interval : default; - - var __notificationChannelBase = __requestBase?.NotificationChannel; var notificationChannelType = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) ? parseResult.GetValue(NotificationChannelOptions.Type) : __notificationChannelBase is not null ? __notificationChannelBase.Type : default; + var currency = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; + var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; + var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; var notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; + var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __notificationChannelBase is not null + __notificationChannelSpecified || __requestBase?.NotificationChannel is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients!, + Recipients = notificationChannelRecipients, SubjectPrefix = notificationChannelSubjectPrefix, } - : __notificationChannelBase; + : __requestBase?.NotificationChannel; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -110,7 +108,7 @@ await CliRuntime.RunAsync(async () => thresholdAmount: thresholdAmount, currency: currency, interval: interval, - notificationChannel: notificationChannel!, + notificationChannel: notificationChannel, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs index 0aa0484c..ac502d04 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -21,18 +20,18 @@ internal static partial class SpendAlertsUpdateProjectSpendAlertCommandApiComman private static readonly CreateSpendAlertBodyOptionSet CreateSpendAlertBodyOptionSetOptions = CreateSpendAlertBodyOptionSet.Create(); private static readonly SpendAlertNotificationChannelOptionSet NotificationChannelOptions = SpendAlertNotificationChannelOptionSet.Create(@"notification-channel"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,22 +93,21 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var alertId = parseResult.GetRequiredValue(AlertId); var thresholdAmount = parseResult.GetRequiredValue(CreateSpendAlertBodyOptionSetOptions.ThresholdAmount); - var currency = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Currency) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) : __requestBase is not null ? __requestBase.Currency : default; - var interval = CliRuntime.WasSpecified(parseResult, CreateSpendAlertBodyOptionSetOptions.Interval) ? parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) : __requestBase is not null ? __requestBase.Interval : default; - - var __notificationChannelBase = __requestBase?.NotificationChannel; var notificationChannelType = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) ? parseResult.GetValue(NotificationChannelOptions.Type) : __notificationChannelBase is not null ? __notificationChannelBase.Type : default; + var currency = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; + var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; + var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; var notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; + var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __notificationChannelBase is not null + __notificationChannelSpecified || __requestBase?.NotificationChannel is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients!, + Recipients = notificationChannelRecipients, SubjectPrefix = notificationChannelSubjectPrefix, } - : __notificationChannelBase; + : __requestBase?.NotificationChannel; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -119,7 +117,7 @@ await CliRuntime.RunAsync(async () => thresholdAmount: thresholdAmount, currency: currency, interval: interval, - notificationChannel: notificationChannel!, + notificationChannel: notificationChannel, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs index 23328ad2..a4b2ffb8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs index e6473fb8..14722e0b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs index 6fe541db..e88527bf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -28,18 +27,18 @@ internal static partial class UploadsCompleteUploadCommandApiCommand Description = @"The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. ", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -90,7 +89,7 @@ The number of bytes uploaded upon completion must match the number of bytes init var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -106,7 +105,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var uploadId = parseResult.GetRequiredValue(UploadId); var partIds = parseResult.GetRequiredValue(PartIds); - var md5 = CliRuntime.WasSpecified(parseResult, Md5) ? parseResult.GetValue(Md5) : __requestBase is not null ? __requestBase.Md5 : default; + var md5 = parseResult.GetValue(Md5) ?? __requestBase?.Md5; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs index 74645ac8..b522a9b6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -46,18 +45,18 @@ See the [documentation on File Required = true, }; private static readonly FileExpirationAfterOptionSet ExpiresAfterOptions = FileExpirationAfterOptionSet.Create(@"expires-after"); - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -121,7 +120,7 @@ Returns the Upload object with status `pending`. var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -139,18 +138,17 @@ await CliRuntime.RunAsync(async () => var purpose = parseResult.GetRequiredValue(Purpose); var bytes = parseResult.GetRequiredValue(Bytes); var mimeType = parseResult.GetRequiredValue(MimeType); - - var __expiresAfterBase = __requestBase?.ExpiresAfter; var expiresAfterAnchor = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) ? parseResult.GetValue(ExpiresAfterOptions.Anchor) : __expiresAfterBase is not null ? __expiresAfterBase.Anchor : default; + var expiresAfterAnchor = parseResult.GetValue(ExpiresAfterOptions.Anchor) ?? __requestBase?.ExpiresAfter?.Anchor; var expiresAfterSeconds = parseResult.GetValue(ExpiresAfterOptions.Seconds); var __expiresAfterSpecified = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) || CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Seconds); var expiresAfter = - __expiresAfterSpecified || __expiresAfterBase is not null + __expiresAfterSpecified || __requestBase?.ExpiresAfter is not null ? new global::tryAGI.OpenAI.FileExpirationAfter { Anchor = expiresAfterAnchor, - Seconds = expiresAfterSeconds!, + Seconds = expiresAfterSeconds, } - : __expiresAfterBase; + : __requestBase?.ExpiresAfter; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs index 0bd41bc9..344edfc8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs index 2562b026..2cf36740 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs index 5205c1db..df13ed0c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs index a2c0c774..16e1069c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs index 56aa4447..a6f8668f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs index 36ed06bf..f8628484 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs index 1872e65e..7042728f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs index 3b17d06f..dafc64af 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs index 9e96f84f..cad7159a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs index b010cfd2..8abbf14b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs index 0a2246ab..24e2f4ca 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs index 37520002..655b82f2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs index abe8bb41..9e5c37e1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs index 23775a71..4c6cebc2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs index 0f9f1741..10cd28f8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs index a8e49a56..ee0c527c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs index 7993094b..31efb75e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs index e58735b8..0808a5c4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -36,18 +35,18 @@ internal static partial class UsersModifyUserCommandApiCommand { Description = @"Developer persona metadata.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -92,7 +91,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -107,10 +106,10 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var userId = parseResult.GetRequiredValue(UserId); - var role = CliRuntime.WasSpecified(parseResult, Role) ? parseResult.GetValue(Role) : __requestBase is not null ? __requestBase.Role : default; - var roleId = CliRuntime.WasSpecified(parseResult, RoleId) ? parseResult.GetValue(RoleId) : __requestBase is not null ? __requestBase.RoleId : default; - var technicalLevel = CliRuntime.WasSpecified(parseResult, TechnicalLevel) ? parseResult.GetValue(TechnicalLevel) : __requestBase is not null ? __requestBase.TechnicalLevel : default; - var developerPersona = CliRuntime.WasSpecified(parseResult, DeveloperPersona) ? parseResult.GetValue(DeveloperPersona) : __requestBase is not null ? __requestBase.DeveloperPersona : default; + var role = parseResult.GetValue(Role) ?? __requestBase?.Role; + var roleId = parseResult.GetValue(RoleId) ?? __requestBase?.RoleId; + var technicalLevel = parseResult.GetValue(TechnicalLevel) ?? __requestBase?.TechnicalLevel; + var developerPersona = parseResult.GetValue(DeveloperPersona) ?? __requestBase?.DeveloperPersona; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs index c84b2b4e..a0824a65 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs index c7c6e474..2bda46d6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs index 90f41db9..deb44d40 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -42,18 +41,18 @@ internal static partial class VectorStoresCreateVectorStoreCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -99,7 +98,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -113,12 +112,12 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var fileIds = CliRuntime.WasSpecified(parseResult, FileIds) ? parseResult.GetValue(FileIds) : __requestBase is not null ? __requestBase.FileIds : default; - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var description = CliRuntime.WasSpecified(parseResult, DescriptionOption) ? parseResult.GetValue(DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; - var chunkingStrategy = CliRuntime.WasSpecified(parseResult, ChunkingStrategy) ? parseResult.GetValue(ChunkingStrategy) : __requestBase is not null ? __requestBase.ChunkingStrategy : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var fileIds = parseResult.GetValue(FileIds) ?? __requestBase?.FileIds; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var description = parseResult.GetValue(DescriptionOption) ?? __requestBase?.Description; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs index 2df608f5..c680a1f5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -37,18 +36,18 @@ internal static partial class VectorStoresCreateVectorStoreFileBatchCommandApiCo { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -97,7 +96,7 @@ Vector store file attach requests are rate limited per vector store (300 request var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -112,10 +111,10 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); - var fileIds = CliRuntime.WasSpecified(parseResult, FileIds) ? parseResult.GetValue(FileIds) : __requestBase is not null ? __requestBase.FileIds : default; - var files = CliRuntime.WasSpecified(parseResult, Files) ? parseResult.GetValue(Files) : __requestBase is not null ? __requestBase.Files : default; - var chunkingStrategy = CliRuntime.WasSpecified(parseResult, ChunkingStrategy) ? parseResult.GetValue(ChunkingStrategy) : __requestBase is not null ? __requestBase.ChunkingStrategy : default; - var attributes = CliRuntime.WasSpecified(parseResult, Attributes) ? parseResult.GetValue(Attributes) : __requestBase is not null ? __requestBase.Attributes : default; + var fileIds = parseResult.GetValue(FileIds) ?? __requestBase?.FileIds; + var files = parseResult.GetValue(Files) ?? __requestBase?.Files; + var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; + var attributes = parseResult.GetValue(Attributes) ?? __requestBase?.Attributes; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs index 96701ab4..e2ce5b1a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -32,18 +31,18 @@ internal static partial class VectorStoresCreateVectorStoreFileCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -89,7 +88,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -105,8 +104,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var fileId = parseResult.GetRequiredValue(FileId); - var chunkingStrategy = CliRuntime.WasSpecified(parseResult, ChunkingStrategy) ? parseResult.GetValue(ChunkingStrategy) : __requestBase is not null ? __requestBase.ChunkingStrategy : default; - var attributes = CliRuntime.WasSpecified(parseResult, Attributes) ? parseResult.GetValue(Attributes) : __requestBase is not null ? __requestBase.Attributes : default; + var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; + var attributes = parseResult.GetValue(Attributes) ?? __requestBase?.Attributes; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs index fbf6ddf9..a45b55f5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs index 06d49b46..88869196 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs index 89b4eb64..b9444835 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs index 44c213a8..6f7a5099 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs index 5b1acde1..84ad6829 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs index 9d1ec281..0ec91b70 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -30,18 +29,18 @@ internal static partial class VectorStoresModifyVectorStoreCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -85,7 +84,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -100,9 +99,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); - var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; - var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; - var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; + var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs index 45eef85c..680c486d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs index 8c18aa96..4264b0bf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs index cc857b3c..635b3b8f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs index b34ac10e..dbb77c4c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs index 1d92c8d2..b1d7fc16 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -41,18 +40,18 @@ internal static partial class VectorStoresSearchVectorStoreCommandApiCommand { Description = @"Ranking options for search.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -98,7 +97,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -114,10 +113,10 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var query = parseResult.GetRequiredValue(Query); - var rewriteQuery = CliRuntime.WasSpecified(parseResult, RewriteQuery) ? parseResult.GetValue(RewriteQuery) : __requestBase is not null ? __requestBase.RewriteQuery : default; - var maxNumResults = CliRuntime.WasSpecified(parseResult, MaxNumResults) ? parseResult.GetValue(MaxNumResults) : __requestBase is not null ? __requestBase.MaxNumResults : default; - var filters = CliRuntime.WasSpecified(parseResult, Filters) ? parseResult.GetValue(Filters) : __requestBase is not null ? __requestBase.Filters : default; - var rankingOptions = CliRuntime.WasSpecified(parseResult, RankingOptions) ? parseResult.GetValue(RankingOptions) : __requestBase is not null ? __requestBase.RankingOptions : default; + var rewriteQuery = parseResult.GetValue(RewriteQuery) ?? __requestBase?.RewriteQuery; + var maxNumResults = parseResult.GetValue(MaxNumResults) ?? __requestBase?.MaxNumResults; + var filters = parseResult.GetValue(Filters) ?? __requestBase?.Filters; + var rankingOptions = parseResult.GetValue(RankingOptions) ?? __requestBase?.RankingOptions; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs index bff031cb..bbf2bee0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +23,18 @@ internal static partial class VectorStoresUpdateVectorStoreFileAttributesCommand { Description = @"", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -78,7 +77,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -94,7 +93,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var fileId = parseResult.GetRequiredValue(FileId); - var attributes = CliRuntime.WasSpecified(parseResult, Attributes) ? parseResult.GetValue(Attributes) : __requestBase is not null ? __requestBase.Attributes : default; + var attributes = parseResult.GetValue(Attributes) ?? __requestBase?.Attributes; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs index cf2d0b06..debbff24 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs index 06f9bd1d..9ac9cac7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; @@ -37,18 +36,18 @@ internal static partial class VideosCreateVideoCommandApiCommand { Description = @"Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.", }; - private static Option Input { get; } = new(@"--input") + private static Option Input { get; } = new("--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", }; - private static Option RequestJson { get; } = new(@"--request-json") + private static Option RequestJson { get; } = new("--request-json") { Description = "Request body as JSON.", Hidden = true, }; - private static Option RequestFile { get; } = new(@"--request-file") + private static Option RequestFile { get; } = new("--request-file") { Description = "Path to a JSON request file, or '-' for stdin.", Hidden = true, @@ -93,7 +92,7 @@ public static Command Create() var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); if (specifiedCount > 1) { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + result.AddError("Specify at most one of --input, --request-json, or --request-file."); } }); @@ -107,11 +106,11 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; + var model = parseResult.GetValue(Model) ?? __requestBase?.Model; var prompt = parseResult.GetRequiredValue(Prompt); - var inputReference = CliRuntime.WasSpecified(parseResult, InputReference) ? parseResult.GetValue(InputReference) : __requestBase is not null ? __requestBase.InputReference : default; - var seconds = CliRuntime.WasSpecified(parseResult, Seconds) ? parseResult.GetValue(Seconds) : __requestBase is not null ? __requestBase.Seconds : default; - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : __requestBase is not null ? __requestBase.Size : default; + var inputReference = parseResult.GetValue(InputReference) ?? __requestBase?.InputReference; + var seconds = parseResult.GetValue(Seconds) ?? __requestBase?.Seconds; + var size = parseResult.GetValue(Size) ?? __requestBase?.Size; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs index 7c1f643d..d4956c61 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs index 70427852..a2371cf9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs index 91ab7c6f..8486f0b8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs index a44e85bd..8dcb4f84 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs index b57a967d..363f1124 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs index 7b7560fd..9655d9d9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs index 9c29530a..abaf065f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs index 40eaad2e..4aeb0241 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs @@ -1,5 +1,4 @@ #nullable enable -#pragma warning disable CS0618 using System.CommandLine;