From ed9b3b2dda4d6beb37930eaff339aa3bbcf731b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Jun 2026 07:21:06 +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, 971 insertions(+), 704 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 d041e16b..064e4d76 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCancelARunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7c41167a..35880fe2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateMessageCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -40,18 +41,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, @@ -96,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."); } }); @@ -113,8 +114,8 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var role = parseResult.GetRequiredValue(Role); var content = parseResult.GetRequiredValue(Content); - var attachments = parseResult.GetValue(Attachments) ?? __requestBase?.Attachments; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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; 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 78751224..e5c5c813 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -133,18 +134,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, @@ -203,7 +204,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."); } }); @@ -220,22 +221,22 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var include = parseResult.GetValue(Include); var assistantId = parseResult.GetRequiredValue(AssistantId); - 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; + 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; 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 316818e5..45a79971 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadAndRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -115,18 +116,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, @@ -182,7 +183,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."); } }); @@ -197,21 +198,21 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var assistantId = parseResult.GetRequiredValue(AssistantId); - 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; + 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; 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 537570cc..d62a40f7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsCreateThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -91,9 +92,9 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var messages = parseResult.GetValue(Messages) ?? __requestBase?.Messages; - var toolResources = parseResult.GetValue(ToolResources) ?? __requestBase?.ToolResources; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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; 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 9a9f2e7d..b9290b0a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteMessageCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 75fc3854..fe014861 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsDeleteThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a04c7711..29be19f3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListMessagesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8514ee5f..0eb462d9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunStepsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 3814bf1f..3ff52d51 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsListRunsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 d020c8e5..200e5f56 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyMessageCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -93,7 +94,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); var messageId = parseResult.GetRequiredValue(MessageId); - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; 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 2b3be3c6..100796da 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -93,7 +94,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); var runId = parseResult.GetRequiredValue(RunId); - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; 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 601f3fbb..0539b6e1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsModifyThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -92,8 +93,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var threadId = parseResult.GetRequiredValue(ThreadId); - var toolResources = parseResult.GetValue(ToolResources) ?? __requestBase?.ToolResources; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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; 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 0f429412..16906654 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveMessageCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f868a081..e66d19f5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ca7a8f35..7ce2b68b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveRunStepCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5ba3ce93..d6792475 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsRetrieveThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5e56021c..ece1cd3c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AssistantsSubmitToolOutputsToRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -28,18 +29,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, @@ -84,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,7 +102,7 @@ await CliRuntime.RunAsync(async () => var threadId = parseResult.GetRequiredValue(ThreadId); var runId = parseResult.GetRequiredValue(RunId); var toolOutputs = parseResult.GetRequiredValue(ToolOutputs); - var stream = parseResult.GetValue(Stream) ?? __requestBase?.Stream; + var stream = CliRuntime.WasSpecified(parseResult, Stream) ? parseResult.GetValue(Stream) : __requestBase is not null ? __requestBase.Stream : default; 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 f114b4f2..6e8f8c6c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateSpeechCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -14,7 +15,7 @@ internal static partial class AudioCreateSpeechCommandApiCommand Required = true, }; - private static Option Input { get; } = new( + private static Option InputOption { get; } = new( name: @"--input") { Description = @"The text to generate audio for. The maximum length is 4096 characters.", @@ -51,18 +52,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 Input { get; } = new("--input") + private static Option RequestInput { get; } = new(@"--request-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,24 +76,24 @@ public static Command Create() Returns the audio file content, or a stream of audio events. "); command.Options.Add(Model); - command.Options.Add(Input); + command.Options.Add(InputOption); command.Options.Add(Instructions); command.Options.Add(Voice); command.Options.Add(ResponseFormat); command.Options.Add(Speed); command.Options.Add(StreamFormat); - command.Options.Add(Input); + command.Options.Add(RequestInput); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(Input) is not null; + var hasInput = result.GetResult(RequestInput) 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 --input, --request-json, or --request-file."); + result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); } }); @@ -101,18 +102,18 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - Input, + RequestInput, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var input = parseResult.GetRequiredValue(Input); - var instructions = parseResult.GetValue(Instructions) ?? __requestBase?.Instructions; + var input = parseResult.GetRequiredValue(InputOption); + var instructions = CliRuntime.WasSpecified(parseResult, Instructions) ? parseResult.GetValue(Instructions) : __requestBase is not null ? __requestBase.Instructions : default; var voice = parseResult.GetRequiredValue(Voice); - var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; - var speed = parseResult.GetValue(Speed) ?? __requestBase?.Speed; - var streamFormat = parseResult.GetValue(StreamFormat) ?? __requestBase?.StreamFormat; + 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; 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 24f1648c..31c59fd9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionAsStreamCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -28,18 +29,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, @@ -61,7 +62,6 @@ 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,16 +91,15 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var file = parseResult.GetRequiredValue(File); var model = parseResult.GetRequiredValue(Model); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -115,7 +114,6 @@ 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 db019a85..179f0994 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranscriptionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -28,18 +29,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, @@ -81,7 +82,6 @@ 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,16 +111,15 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var file = parseResult.GetRequiredValue(File); var model = parseResult.GetRequiredValue(Model); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -135,7 +134,6 @@ 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 a41c86ef..044d4f29 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateTranslationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -50,18 +51,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, @@ -107,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."); } }); @@ -124,9 +125,9 @@ await CliRuntime.RunAsync(async () => var file = parseResult.GetRequiredValue(File); var filename = parseResult.GetRequiredValue(Filename); var model = parseResult.GetRequiredValue(Model); - var prompt = parseResult.GetValue(Prompt) ?? __requestBase?.Prompt; - var responseFormat = parseResult.GetValue(ResponseFormat) ?? __requestBase?.ResponseFormat; - var temperature = parseResult.GetValue(Temperature) ?? __requestBase?.Temperature; + 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; 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 ffdea1eb..007743e9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 c3e16f37..2e2a36d9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioCreateVoiceConsentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ddb8b8e6..a368eb81 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioDeleteVoiceConsentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 99419d43..592995b2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioListVoiceConsentsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f194fdbc..4284ef41 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioRetrieveVoiceConsentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 27377b4b..90e6eae5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AudioUpdateVoiceConsentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ef5686b5..06dee1a4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/AuditLogsListAuditLogsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a2cdd931..f7af058a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCancelBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 78daa2f1..f366c254 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchCreateBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -42,18 +43,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, @@ -98,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."); } }); @@ -114,9 +115,9 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var inputFileId = parseResult.GetRequiredValue(InputFileId); var endpoint = parseResult.GetRequiredValue(Endpoint); - var completionWindow = parseResult.GetValue(CompletionWindow) ?? __requestBase?.CompletionWindow; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; - var outputExpiresAfter = parseResult.GetValue(OutputExpiresAfter) ?? __requestBase?.OutputExpiresAfter; + 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; 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 0f0e4c68..fe50a22b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchListBatchesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 15ae57c6..663c6a36 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/BatchRetrieveBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f724cc92..0e3d68eb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CancelChatSessionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 c63bfa55..74f67453 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForOrganizationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 33018fd5..87d83e55 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesActivateCertificatesForProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7cad55b9..326d763c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForOrganizationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f42598bd..9b3d189f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeactivateCertificatesForProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 c7dbb139..72ae8965 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesDeleteCertificateCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 230a60bc..d8a4a19f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesGetCertificateCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f865eb44..fc446f0d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListOrganizationCertificatesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 59eb22fb..ff629c98 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesListProjectCertificatesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 2153cf96..b02b8e77 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesModifyCertificateCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -17,18 +18,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, @@ -71,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."); } }); @@ -86,7 +87,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var certificateId = parseResult.GetRequiredValue(CertificateId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; 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 20fc5927..cddd7b70 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CertificatesUploadCertificateCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +19,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, @@ -74,7 +75,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."); } }); @@ -88,7 +89,7 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; + var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default; 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 b4301ed3..a13b1711 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionAsStreamCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -7,18 +8,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, @@ -57,7 +58,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 96d8045e..2176e26e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatCreateChatCompletionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -7,18 +8,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, @@ -77,7 +78,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 e4d8ccd1..1112c9a4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatDeleteChatCompletionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 edb83da1..86739749 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatCompletionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0b5990cc..98143f8d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatGetChatMessagesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a25515b7..3fd4e277 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatListChatCompletionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 d797f7ec..d19ec0e2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ChatUpdateChatCompletionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -17,18 +18,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, @@ -73,7 +74,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."); } }); @@ -88,7 +89,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var completionId = parseResult.GetRequiredValue(CompletionId); - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; 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 f74eb13e..3850100b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompactAResponseCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -13,7 +14,7 @@ internal static partial class CompactAResponseCommandApiCommand Required = true, }; - private static Option>?> Input { get; } = new( + private static Option>?> InputOption { get; } = new( name: @"--input") { Description = @"", @@ -48,18 +49,18 @@ internal static partial class CompactAResponseCommandApiCommand { Description = @"", }; - private static Option Input { get; } = new("--input") + private static Option RequestInput { get; } = new(@"--request-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, @@ -91,24 +92,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(Input); + command.Options.Add(InputOption); command.Options.Add(PreviousResponseId); command.Options.Add(Instructions); command.Options.Add(PromptCacheKey); command.Options.Add(PromptCacheRetention); command.Options.Add(ServiceTier); - command.Options.Add(Input); + command.Options.Add(RequestInput); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(Input) is not null; + var hasInput = result.GetResult(RequestInput) 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 --input, --request-json, or --request-file."); + result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); } }); @@ -117,18 +118,18 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - Input, + RequestInput, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - 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; + 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; 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 4a7188f3..94a9753e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CompletionsCreateCompletionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -158,18 +159,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, @@ -230,7 +231,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."); } }); @@ -245,23 +246,23 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - 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; + 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; 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 a7706b1e..7d945424 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateAConversationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -17,18 +18,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, @@ -70,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."); } }); @@ -84,8 +85,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; - var items = parseResult.GetValue(Items) ?? __requestBase?.Items; + 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; 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 f0722c7b..9464185a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsCreateItemsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 2d1e0f87..293640ed 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAConversationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 eafa37e8..78867dc1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsDeleteAnItemCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 78b358d2..f8013cd0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsListItemsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 66e84400..aa089372 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAConversationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 33c9814b..885ecb83 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsRetrieveAnItemCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 eed4cc37..e3c74c94 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ConversationsUpdateAConversationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +19,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, @@ -71,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."); } }); @@ -86,7 +87,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var conversationId = parseResult.GetRequiredValue(ConversationId); - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : __requestBase is not null ? __requestBase.Metadata : default; 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 c959c7f5..7b6901da 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateAdminApiKeyCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5f67465e..af4a7abd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateChatKitSessionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -37,18 +38,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, @@ -93,7 +94,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."); } }); @@ -109,9 +110,9 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var workflow = parseResult.GetRequiredValue(Workflow); var user = parseResult.GetRequiredValue(User); - var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; - var rateLimits = parseResult.GetValue(RateLimits) ?? __requestBase?.RateLimits; - var chatkitConfiguration = parseResult.GetValue(ChatkitConfiguration) ?? __requestBase?.ChatkitConfiguration; + 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; 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 1f8a9b4b..2e754aae 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -41,18 +42,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, @@ -99,7 +100,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,11 +115,11 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var name = parseResult.GetRequiredValue(NameOption); - 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; + 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; 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 6543959b..8735f932 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateContainerFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -31,18 +32,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, @@ -91,7 +92,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."); } }); @@ -106,9 +107,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var containerId = parseResult.GetRequiredValue(ContainerId); - var fileId = parseResult.GetValue(FileId) ?? __requestBase?.FileId; - var file = parseResult.GetValue(File) ?? __requestBase?.File; - var filename = parseResult.GetValue(Filename) ?? __requestBase?.Filename; + 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; 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 6b9f0542..e9022efd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveOrganizationDataRetentionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 1c997c4e..7690610d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionRetrieveProjectDataRetentionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 81393ee9..f30d7dbf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateOrganizationDataRetentionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e69e8bbb..7a3ce1d3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DataRetentionUpdateProjectDataRetentionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 81494e15..a5341527 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 78b417e2..70abcdeb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAContainerFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 c40df049..c18943b1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteAdminApiKeyCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a506b361..6566b2e7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/DeleteChatKitThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ca8a1e84..96fd1aff 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EmbeddingsCreateEmbeddingsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -6,7 +7,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>>> Input { get; } = new( + private static Option, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>> InputOption { 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. @@ -41,18 +42,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 Input { get; } = new("--input") + private static Option RequestInput { get; } = new(@"--request-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, @@ -81,23 +82,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(Input); + command.Options.Add(InputOption); command.Options.Add(Model); command.Options.Add(EncodingFormat); command.Options.Add(Dimensions); command.Options.Add(User); - command.Options.Add(Input); + command.Options.Add(RequestInput); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(Input) is not null; + var hasInput = result.GetResult(RequestInput) 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 --input, --request-json, or --request-file."); + result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); } }); @@ -106,16 +107,16 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - Input, + RequestInput, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var input = parseResult.GetRequiredValue(Input); + var input = parseResult.GetRequiredValue(InputOption); var model = parseResult.GetRequiredValue(Model); - var encodingFormat = parseResult.GetValue(EncodingFormat) ?? __requestBase?.EncodingFormat; - var dimensions = parseResult.GetValue(Dimensions) ?? __requestBase?.Dimensions; - var user = parseResult.GetValue(User) ?? __requestBase?.User; + 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; 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 d32b9da1..0e45389e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCancelEvalRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 d094e13f..1da2263a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -31,18 +32,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, @@ -89,7 +90,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,8 +104,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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 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 05fd6ac5..0a54f45f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsCreateEvalRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -30,18 +31,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, @@ -86,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."); } }); @@ -101,8 +102,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var evalId = parseResult.GetRequiredValue(EvalId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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 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 8efb4da2..416d6f4d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteAnEvalCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9e870fe0..e71c6258 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsDeleteEvalRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b780e5f6..f14adf21 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 55e3a318..57ecd300 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnEvalRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8631a1fb..f96a96e5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetAnOutputItemOfAnEvalRunCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e97cd7a1..7528363c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunOutputItemsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0fe1e1a5..d2d90d93 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsGetEvalRunsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 80c9c7b0..5be7b2b2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsListEvalsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f75cdaa2..6b33d6bd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/EvalsUpdateAnEvalCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -78,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."); } }); @@ -93,8 +94,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var evalId = parseResult.GetRequiredValue(EvalId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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; 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 2840ef0c..d16381bd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesDeleteFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a957226a..574c60b5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesListFilesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f9934bbf..f288fa96 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 fae7865b..e643a73a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesRetrieveFileContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ce57bd97..1662a018 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FilesUploadFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -36,18 +37,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, @@ -116,7 +117,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."); } }); @@ -133,17 +134,18 @@ await CliRuntime.RunAsync(async () => var file = parseResult.GetRequiredValue(File); var filename = parseResult.GetRequiredValue(Filename); var purpose = parseResult.GetRequiredValue(Purpose); - var expiresAfterAnchor = parseResult.GetValue(ExpiresAfterOptions.Anchor) ?? __requestBase?.ExpiresAfter?.Anchor; + + var __expiresAfterBase = __requestBase?.ExpiresAfter; var expiresAfterAnchor = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) ? parseResult.GetValue(ExpiresAfterOptions.Anchor) : __expiresAfterBase is not null ? __expiresAfterBase.Anchor : default; var expiresAfterSeconds = parseResult.GetValue(ExpiresAfterOptions.Seconds); var __expiresAfterSpecified = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) || CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Seconds); var expiresAfter = - __expiresAfterSpecified || __requestBase?.ExpiresAfter is not null + __expiresAfterSpecified || __expiresAfterBase is not null ? new global::tryAGI.OpenAI.FileExpirationAfter { Anchor = expiresAfterAnchor, - Seconds = expiresAfterSeconds, + Seconds = expiresAfterSeconds!, } - : __requestBase?.ExpiresAfter; + : __expiresAfterBase; 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 41abf113..0714df16 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCancelFineTuningCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 904c20bf..4f393f4a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateCheckpointPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7277b91c..c6c5cbf6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningCreateFineTuningJobCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -81,18 +82,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, @@ -145,7 +146,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."); } }); @@ -161,12 +162,12 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); var trainingFile = parseResult.GetRequiredValue(TrainingFile); - 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; + 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; 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 d10bff4e..79038531 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningDeleteCheckpointPermissionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9e58e73a..1c66c8f8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListCheckpointPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ae3b20f2..b71aec9f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningCheckpointsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 669ffac6..2a38c751 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningEventsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f7cf1322..03b7e619 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListFineTuningJobsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f2f6aa8d..c15dba50 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningPauseFineTuningCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0a3c9066..499e4816 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningResumeFineTuningCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f3901eb0..d10834fa 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRetrieveFineTuningJobCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7f8693a4..cee14d65 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningRunGraderCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -32,18 +33,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, @@ -87,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."); } }); @@ -102,7 +103,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var grader = parseResult.GetRequiredValue(Grader); - var item = parseResult.GetValue(Item) ?? __requestBase?.Item; + var item = CliRuntime.WasSpecified(parseResult, Item) ? parseResult.GetValue(Item) : __requestBase is not null ? __requestBase.Item : default; 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 5ee157ea..ffb57bae 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningValidateGraderCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8e0f9465..988666f0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GetInputTokenCountsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -12,7 +13,7 @@ internal static partial class GetInputTokenCountsCommandApiCommand Description = @"", }; - private static Option>?> Input { get; } = new( + private static Option>?> InputOption { get; } = new( name: @"--input") { Description = @"", @@ -75,18 +76,18 @@ internal static partial class GetInputTokenCountsCommandApiCommand private static Option ParallelToolCalls { get; } = CliRuntime.CreateNullableBoolOption( name: @"--parallel-tool-calls", description: @""); - private static Option Input { get; } = new("--input") + private static Option RequestInput { get; } = new(@"--request-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, @@ -118,7 +119,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(Input); + command.Options.Add(InputOption); command.Options.Add(PreviousResponseId); command.Options.Add(Tools); command.Options.Add(Text); @@ -129,18 +130,18 @@ public static Command Create() command.Options.Add(Conversation); command.Options.Add(ToolChoice); command.Options.Add(ParallelToolCalls); - command.Options.Add(Input); + command.Options.Add(RequestInput); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(Input) is not null; + var hasInput = result.GetResult(RequestInput) 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 --input, --request-json, or --request-file."); + result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); } }); @@ -149,23 +150,23 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - Input, + RequestInput, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - 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; + 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; 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 411cce39..5357f317 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsAssignOrganizationRoleToGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 26065d5c..5bf61b6a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsListGroupOrganizationRoleAssignmentsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 35969dea..51bc9333 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsRetrieveGroupOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 342a7a30..1e1bcf54 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupOrganizationRoleAssignmentsUnassignOrganizationRoleFromGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a6d59c18..7aa77f31 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersAddGroupUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 6cda59c1..539ad171 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersListGroupUsersCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 1635f1fe..fa44da6a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRemoveGroupUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 10d46754..b46cbf16 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupUsersRetrieveGroupUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 dc890c8f..cc602bf8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsCreateGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a825aaf6..260524ca 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsDeleteGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 bed8166a..96522c90 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsListGroupsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8d726170..ca262ff7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsRetrieveGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e99584d1..4e4aa873 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/GroupsUpdateGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 64533912..ba3b825e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsModifyProjectHostedToolPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -20,18 +21,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, @@ -72,7 +73,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,51 +88,56 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - var fileSearchEnabled = parseResult.GetValue(FileSearchOptions.Enabled); + + var __fileSearchBase = __requestBase?.FileSearch; var fileSearchEnabled = parseResult.GetValue(FileSearchOptions.Enabled); var __fileSearchSpecified = CliRuntime.WasSpecified(parseResult, FileSearchOptions.Enabled); var fileSearch = - __fileSearchSpecified || __requestBase?.FileSearch is not null + __fileSearchSpecified || __fileSearchBase is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = fileSearchEnabled, + Enabled = fileSearchEnabled!, } - : __requestBase?.FileSearch; - var webSearchEnabled = parseResult.GetValue(WebSearchOptions.Enabled); + : __fileSearchBase; + + var __webSearchBase = __requestBase?.WebSearch; var webSearchEnabled = parseResult.GetValue(WebSearchOptions.Enabled); var __webSearchSpecified = CliRuntime.WasSpecified(parseResult, WebSearchOptions.Enabled); var webSearch = - __webSearchSpecified || __requestBase?.WebSearch is not null + __webSearchSpecified || __webSearchBase is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = webSearchEnabled, + Enabled = webSearchEnabled!, } - : __requestBase?.WebSearch; - var imageGenerationEnabled = parseResult.GetValue(ImageGenerationOptions.Enabled); + : __webSearchBase; + + var __imageGenerationBase = __requestBase?.ImageGeneration; var imageGenerationEnabled = parseResult.GetValue(ImageGenerationOptions.Enabled); var __imageGenerationSpecified = CliRuntime.WasSpecified(parseResult, ImageGenerationOptions.Enabled); var imageGeneration = - __imageGenerationSpecified || __requestBase?.ImageGeneration is not null + __imageGenerationSpecified || __imageGenerationBase is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = imageGenerationEnabled, + Enabled = imageGenerationEnabled!, } - : __requestBase?.ImageGeneration; - var mcpEnabled = parseResult.GetValue(McpOptions.Enabled); + : __imageGenerationBase; + + var __mcpBase = __requestBase?.Mcp; var mcpEnabled = parseResult.GetValue(McpOptions.Enabled); var __mcpSpecified = CliRuntime.WasSpecified(parseResult, McpOptions.Enabled); var mcp = - __mcpSpecified || __requestBase?.Mcp is not null + __mcpSpecified || __mcpBase is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = mcpEnabled, + Enabled = mcpEnabled!, } - : __requestBase?.Mcp; - var codeInterpreterEnabled = parseResult.GetValue(CodeInterpreterOptions.Enabled); + : __mcpBase; + + var __codeInterpreterBase = __requestBase?.CodeInterpreter; var codeInterpreterEnabled = parseResult.GetValue(CodeInterpreterOptions.Enabled); var __codeInterpreterSpecified = CliRuntime.WasSpecified(parseResult, CodeInterpreterOptions.Enabled); var codeInterpreter = - __codeInterpreterSpecified || __requestBase?.CodeInterpreter is not null + __codeInterpreterSpecified || __codeInterpreterBase is not null ? new global::tryAGI.OpenAI.HostedToolPermissionUpdate { - Enabled = codeInterpreterEnabled, + Enabled = codeInterpreterEnabled!, } - : __requestBase?.CodeInterpreter; + : __codeInterpreterBase; 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 1c60ccad..0c47a610 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/HostedToolsRetrieveProjectHostedToolPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 3acbefbc..17ac236b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +19,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, @@ -46,7 +47,6 @@ 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,19 +77,18 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -102,7 +101,6 @@ 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 43d2c145..da3f2d5a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +19,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, @@ -66,7 +67,6 @@ 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,19 +97,18 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -122,7 +121,6 @@ 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 f28cc9be..403469ea 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -45,18 +46,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, @@ -84,7 +85,6 @@ 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,20 +113,19 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -144,7 +143,6 @@ 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 e94d2a89..9eec08f4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -45,18 +46,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, @@ -104,7 +105,6 @@ 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,20 +133,19 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); - 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; + 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; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -164,7 +163,6 @@ 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 288a35fb..d8f4e7f8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageVariationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -50,18 +51,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, @@ -108,7 +109,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."); } }); @@ -124,11 +125,11 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); var imagename = parseResult.GetRequiredValue(Imagename); - 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; + 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; 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 c1cff2b3..ad4c225e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesCreateInviteCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -25,18 +26,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, @@ -79,7 +80,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."); } }); @@ -95,7 +96,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var email = parseResult.GetRequiredValue(Email); var role = parseResult.GetRequiredValue(Role); - var projects = parseResult.GetValue(Projects) ?? __requestBase?.Projects; + var projects = CliRuntime.WasSpecified(parseResult, Projects) ? parseResult.GetValue(Projects) : __requestBase is not null ? __requestBase.Projects : default; 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 b600dcb5..da53ace6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesDeleteInviteCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8a04498a..9d5fb593 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesListInvitesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e3adb5e4..54bb0183 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/InvitesRetrieveInviteCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a091f616..31e97993 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListAllOrganizationAndProjectApiKeysCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 df398259..fd043ab9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadItemsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 17d147d6..09111b31 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListChatKitThreadsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 19387bc7..28277250 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainerFilesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4ae88039..db1e950c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ListContainersCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8796c42c..539bc2fa 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsDeleteAFineTunedModelCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 34dddfad..223ce086 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsListModelsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 fba37fb3..33c13390 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModelsRetrieveModelCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 788fcc09..bb6dc5a4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ModerationsCreateModerationCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -6,7 +7,7 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal static partial class ModerationsCreateModerationCommandApiCommand { - private static Option, global::System.Collections.Generic.IList>>> Input { get; } = new( + private static Option, global::System.Collections.Generic.IList>>> InputOption { get; } = new( name: @"--input") { Description = @"Input (or inputs) to classify. Can be a single string, an array of strings, or @@ -23,18 +24,18 @@ [the moderation guide](/docs/guides/moderation), and learn about available models [here](/docs/models#moderation). ", }; - private static Option Input { get; } = new("--input") + private static Option RequestInput { get; } = new(@"--request-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, @@ -65,20 +66,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(Input); + command.Options.Add(InputOption); command.Options.Add(Model); - command.Options.Add(Input); + command.Options.Add(RequestInput); command.Options.Add(RequestJson); command.Options.Add(RequestFile); command.Validators.Add(result => { - var hasInput = result.GetResult(Input) is not null; + var hasInput = result.GetResult(RequestInput) 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 --input, --request-json, or --request-file."); + result.AddError(@"Specify at most one of --request-input, --request-json, or --request-file."); } }); @@ -87,13 +88,13 @@ await CliRuntime.RunAsync(async () => { var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, - Input, + RequestInput, RequestJson, RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var input = parseResult.GetRequiredValue(Input); - var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var input = parseResult.GetRequiredValue(InputOption); + var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; 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 70db9b59..e0a3170a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsAssignProjectRoleToGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4ecd61fa..3aa6f2e2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsListProjectGroupRoleAssignmentsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 c21c032a..eaaeb5d7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsRetrieveProjectGroupRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e8954e52..bfb9073e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupRoleAssignmentsUnassignProjectRoleFromGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4bfb8ce9..c2a77a46 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsAddProjectGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e35d4a6d..3f78ee58 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsListProjectGroupsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 cbd1b94e..de2d8073 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRemoveProjectGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b43e59fc..63932dce 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectGroupsRetrieveProjectGroupCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 56fcb4c8..89acd619 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsAssignProjectRoleToUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 d1e0b4ce..757a2189 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsListProjectUserRoleAssignmentsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e3cd1ef2..44af74d5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsRetrieveProjectUserRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7d995c34..247d955d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectUserRoleAssignmentsUnassignProjectRoleFromUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ead2c3fd..34a6a636 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsArchiveProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e8d92728..f5cac4b9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -92,8 +93,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var name = parseResult.GetRequiredValue(NameOption); - var geography = parseResult.GetValue(Geography) ?? __requestBase?.Geography; - var externalKeyId = parseResult.GetValue(ExternalKeyId) ?? __requestBase?.ExternalKeyId; + 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; 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 60fe0fbb..62f81d7c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectServiceAccountCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 cfc7a063..d436e320 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsCreateProjectUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -30,18 +31,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, @@ -85,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."); } }); @@ -100,8 +101,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - var userId = parseResult.GetValue(UserId) ?? __requestBase?.UserId; - var email = parseResult.GetValue(Email) ?? __requestBase?.Email; + 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 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 9818b9cb..31ecea2d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectApiKeyCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 fb0c76c2..987e3df0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectModelPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ff95cfe2..111182bf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectServiceAccountCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b256ced3..7ff389a7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsDeleteProjectUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 bf46c13a..37080ba8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectApiKeysCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 42dcd7d7..68a35c54 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectRateLimitsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 bd783cb1..50f00ccb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectServiceAccountsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0ca22675..866d3e33 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectUsersCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 af41d183..bb1e4290 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsListProjectsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 772ed381..9bfb10d1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +30,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, @@ -84,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."); } }); @@ -99,9 +100,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var externalKeyId = parseResult.GetValue(ExternalKeyId) ?? __requestBase?.ExternalKeyId; - var geography = parseResult.GetValue(Geography) ?? __requestBase?.Geography; + 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; 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 f1322360..168f0560 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectModelPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5d919f24..dbcd0ec9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectRateLimitCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -53,18 +54,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, @@ -112,7 +113,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."); } }); @@ -128,12 +129,12 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var rateLimitId = parseResult.GetRequiredValue(RateLimitId); - 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; + 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; 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 d05e10c3..09bb72ae 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsModifyProjectUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -93,7 +94,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var userId = parseResult.GetRequiredValue(UserId); - var role = parseResult.GetValue(Role) ?? __requestBase?.Role; + var role = CliRuntime.WasSpecified(parseResult, Role) ? parseResult.GetValue(Role) : __requestBase is not null ? __requestBase.Role : default; 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 613f2b40..da5f691b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectApiKeyCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 833a303b..45dd531b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4016bed3..5e48cde7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectModelPermissionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 26d9bff9..7682b1be 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectServiceAccountCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 729ade4b..a52e8ff3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsRetrieveProjectUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5dab70ab..1f3e1bc5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ProjectsUpdateProjectServiceAccountCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +30,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, @@ -84,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."); } }); @@ -100,8 +101,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var serviceAccountId = parseResult.GetRequiredValue(ServiceAccountId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var role = parseResult.GetValue(Role) ?? __requestBase?.Role; + 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; 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 4a968617..e70961e8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeAcceptCallCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -85,18 +86,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, @@ -131,7 +132,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."); } }); @@ -146,29 +147,30 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var callId = parseResult.GetRequiredValue(CallId); - 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 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 __promptSpecified = CliRuntime.WasSpecified(parseResult, PromptOptions.Id) || CliRuntime.WasSpecified(parseResult, PromptOptions.Version); var prompt = - __promptSpecified || __requestBase?.Prompt is not null + __promptSpecified || __promptBase is not null ? new global::tryAGI.OpenAI.PromptVariant1 { - Id = promptId, + Id = promptId!, Version = promptVersion, } - : __requestBase?.Prompt; + : __promptBase; 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 365c8235..b1ad49b4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateCallCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -13,18 +14,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, @@ -70,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."); } }); @@ -85,14 +86,15 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var sdp = parseResult.GetRequiredValue(Sdp); - 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 __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 __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 || __requestBase?.Session is not null + __sessionSpecified || __sessionBase is not null ? new global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA { Type = sessionType, @@ -101,7 +103,7 @@ await CliRuntime.RunAsync(async () => Include = sessionInclude, ParallelToolCalls = sessionParallelToolCalls, } - : __requestBase?.Session; + : __sessionBase; 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 c753538e..a9803aa0 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateClientSecretCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -89,7 +90,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."); } }); @@ -103,8 +104,8 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; - var session = parseResult.GetValue(Session) ?? __requestBase?.Session; + 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; 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 87b3800a..862c912a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateSessionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -138,18 +139,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, @@ -214,7 +215,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."); } }); @@ -229,31 +230,32 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var clientSecret = parseResult.GetRequiredValue(ClientSecret); - 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 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 __promptSpecified = CliRuntime.WasSpecified(parseResult, PromptOptions.Id) || CliRuntime.WasSpecified(parseResult, PromptOptions.Version); var prompt = - __promptSpecified || __requestBase?.Prompt is not null + __promptSpecified || __promptBase is not null ? new global::tryAGI.OpenAI.PromptVariant1 { - Id = promptId, + Id = promptId!, Version = promptVersion, } - : __requestBase?.Prompt; + : __promptBase; 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 9087cbd1..3c71ccdb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranscriptionSessionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -45,18 +46,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, @@ -110,7 +111,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."); } }); @@ -124,11 +125,11 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - 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; + 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; 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 b88a5113..706780fc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeCreateTranslationClientSecretCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +25,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, @@ -86,7 +87,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."); } }); @@ -100,7 +101,7 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; + var expiresAfter = CliRuntime.WasSpecified(parseResult, ExpiresAfter) ? parseResult.GetValue(ExpiresAfter) : __requestBase is not null ? __requestBase.ExpiresAfter : default; 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 63869e15..fe60a563 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeHangUpCallCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 1b0f0e72..be815633 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeReferCallCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 10a617e0..dec9ddbf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RealtimeRejectCallCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -20,18 +21,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, @@ -53,7 +54,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."); } }); @@ -68,7 +69,7 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var callId = parseResult.GetRequiredValue(CallId); - var statusCode = parseResult.GetValue(StatusCode) ?? __requestBase?.StatusCode; + var statusCode = CliRuntime.WasSpecified(parseResult, StatusCode) ? parseResult.GetValue(StatusCode) : __requestBase is not null ? __requestBase.StatusCode : default; 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 2484caab..0a27a1aa 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCancelAResponseCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b62cedd4..3a0e5f3d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseAsStreamCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -7,18 +8,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, @@ -46,7 +47,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 80539dda..7c578aed 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesCreateAModelResponseCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -7,18 +8,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, @@ -66,7 +67,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 10d8ae19..8122706b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesDeleteAModelResponseCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 09979d5c..b74f446f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesGetAModelResponseCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 00f0591f..adfe0ae6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ResponsesListInputItemsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0d16fb1a..e410daf3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveAdminApiKeyCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 646e551d..2ad41b6f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveChatKitThreadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 15208b42..0aadd094 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0f05ac18..28ca919f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7644af0e..c057600e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RetrieveContainerFileContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 bcd447d2..955b64e1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -7,18 +8,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, @@ -61,7 +62,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."); } }); @@ -76,7 +77,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 = parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; + var description = CliRuntime.WasSpecified(parseResult, PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; 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 f1b44b27..ff40c56f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesCreateProjectRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -12,18 +13,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, @@ -66,7 +67,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."); } }); @@ -82,7 +83,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 = parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; + var description = CliRuntime.WasSpecified(parseResult, PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ? parseResult.GetValue(PublicCreateOrganizationRoleBodyOptionSetOptions.DescriptionOption) : __requestBase is not null ? __requestBase.Description : default; 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 c47d8afb..2b1c2a0c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 58d99e65..a311b34e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesDeleteProjectRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 60b4df2b..4b84b4f1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListOrganizationRolesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 94fbcfb4..05c7ec7d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesListProjectRolesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 5c8d9873..041c9293 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 3f5c2f13..36e26e15 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesRetrieveProjectRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 05734115..c8879677 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -18,18 +19,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, @@ -72,7 +73,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,8 +88,8 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var roleId = parseResult.GetRequiredValue(RoleId); - var permissions = parseResult.GetValue(Permissions) ?? __requestBase?.Permissions; var description = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; - var roleName = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ?? __requestBase?.RoleName; + 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; 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 e33e7e33..86bbd723 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/RolesUpdateProjectRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -24,18 +25,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, @@ -79,7 +80,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."); } }); @@ -95,8 +96,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var projectId = parseResult.GetRequiredValue(ProjectId); var roleId = parseResult.GetRequiredValue(RoleId); - var permissions = parseResult.GetValue(Permissions) ?? __requestBase?.Permissions; var description = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.DescriptionOption) ?? __requestBase?.Description; - var roleName = parseResult.GetValue(PublicUpdateOrganizationRoleBodyOptionSetOptions.RoleName) ?? __requestBase?.RoleName; + 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; 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 4932067e..51bda3a3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 854620fb..131730d3 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsCreateSkillVersionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -22,18 +23,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, @@ -76,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,7 +93,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var skillId = parseResult.GetRequiredValue(SkillId); var files = parseResult.GetRequiredValue(Files); - var @default = parseResult.GetValue(Default) ?? __requestBase?.Default; + var @default = CliRuntime.WasSpecified(parseResult, Default) ? parseResult.GetValue(Default) : __requestBase is not null ? __requestBase.Default : 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 ec16a24a..22c529c4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 fcf92b77..ccaa914e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsDeleteSkillVersionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 6e7141e3..2e2a0149 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 6869ba7c..ef796895 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9f855f77..087895ae 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 1e436da0..838795f6 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsGetSkillVersionContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 fd4b32b2..0309f7e2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillVersionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 d2283088..8e52d927 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsListSkillsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b1d1247c..314c2ec7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SkillsUpdateSkillDefaultVersionCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 2d9a733f..d71c5789 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -9,18 +10,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, @@ -65,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."); } }); @@ -79,21 +80,22 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var thresholdAmount = parseResult.GetRequiredValue(CreateSpendAlertBodyOptionSetOptions.ThresholdAmount); - 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 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 notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; + var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __requestBase?.NotificationChannel is not null + __notificationChannelSpecified || __notificationChannelBase is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients, + Recipients = notificationChannelRecipients!, SubjectPrefix = notificationChannelSubjectPrefix, } - : __requestBase?.NotificationChannel; + : __notificationChannelBase; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -101,7 +103,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 5f2edbe2..7a5a80d9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsCreateProjectSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -14,18 +15,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, @@ -70,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."); } }); @@ -85,21 +86,22 @@ 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 = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; - var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; - var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; + 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 notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; + var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __requestBase?.NotificationChannel is not null + __notificationChannelSpecified || __notificationChannelBase is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients, + Recipients = notificationChannelRecipients!, SubjectPrefix = notificationChannelSubjectPrefix, } - : __requestBase?.NotificationChannel; + : __notificationChannelBase; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -108,7 +110,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 c1a6f106..39fc706f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b44fd35c..6d0590a2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsDeleteProjectSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b507c501..78741726 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListOrganizationSpendAlertsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 acd3c918..d3eec14e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsListProjectSpendAlertsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f74af316..8286e7a7 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateOrganizationSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -14,18 +15,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, @@ -70,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."); } }); @@ -85,21 +86,22 @@ 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 = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; - var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; - var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; + 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 notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; + var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __requestBase?.NotificationChannel is not null + __notificationChannelSpecified || __notificationChannelBase is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients, + Recipients = notificationChannelRecipients!, SubjectPrefix = notificationChannelSubjectPrefix, } - : __requestBase?.NotificationChannel; + : __notificationChannelBase; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -108,7 +110,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 ac502d04..0aa0484c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/SpendAlertsUpdateProjectSpendAlertCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -20,18 +21,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, @@ -77,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."); } }); @@ -93,21 +94,22 @@ 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 = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Currency) ?? __requestBase?.Currency; - var interval = parseResult.GetValue(CreateSpendAlertBodyOptionSetOptions.Interval) ?? __requestBase?.Interval; - var notificationChannelType = parseResult.GetValue(NotificationChannelOptions.Type) ?? __requestBase?.NotificationChannel?.Type; + 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 notificationChannelRecipients = parseResult.GetValue(NotificationChannelOptions.Recipients); - var notificationChannelSubjectPrefix = parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) ?? __requestBase?.NotificationChannel?.SubjectPrefix; + var notificationChannelSubjectPrefix = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix) ? parseResult.GetValue(NotificationChannelOptions.SubjectPrefix) : __notificationChannelBase is not null ? __notificationChannelBase.SubjectPrefix : default; var __notificationChannelSpecified = CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Type) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.Recipients) || CliRuntime.WasSpecified(parseResult, NotificationChannelOptions.SubjectPrefix); var notificationChannel = - __notificationChannelSpecified || __requestBase?.NotificationChannel is not null + __notificationChannelSpecified || __notificationChannelBase is not null ? new global::tryAGI.OpenAI.SpendAlertNotificationChannel { Type = notificationChannelType, - Recipients = notificationChannelRecipients, + Recipients = notificationChannelRecipients!, SubjectPrefix = notificationChannelSubjectPrefix, } - : __requestBase?.NotificationChannel; + : __notificationChannelBase; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -117,7 +119,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 a4b2ffb8..23328ad2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsAddUploadPartCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 14722e0b..e6473fb8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCancelUploadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 e88527bf..6fe541db 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCompleteUploadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -27,18 +28,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, @@ -89,7 +90,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."); } }); @@ -105,7 +106,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var uploadId = parseResult.GetRequiredValue(UploadId); var partIds = parseResult.GetRequiredValue(PartIds); - var md5 = parseResult.GetValue(Md5) ?? __requestBase?.Md5; + var md5 = CliRuntime.WasSpecified(parseResult, Md5) ? parseResult.GetValue(Md5) : __requestBase is not null ? __requestBase.Md5 : default; 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 b522a9b6..74645ac8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UploadsCreateUploadCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -45,18 +46,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, @@ -120,7 +121,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."); } }); @@ -138,17 +139,18 @@ await CliRuntime.RunAsync(async () => var purpose = parseResult.GetRequiredValue(Purpose); var bytes = parseResult.GetRequiredValue(Bytes); var mimeType = parseResult.GetRequiredValue(MimeType); - var expiresAfterAnchor = parseResult.GetValue(ExpiresAfterOptions.Anchor) ?? __requestBase?.ExpiresAfter?.Anchor; + + var __expiresAfterBase = __requestBase?.ExpiresAfter; var expiresAfterAnchor = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) ? parseResult.GetValue(ExpiresAfterOptions.Anchor) : __expiresAfterBase is not null ? __expiresAfterBase.Anchor : default; var expiresAfterSeconds = parseResult.GetValue(ExpiresAfterOptions.Seconds); var __expiresAfterSpecified = CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Anchor) || CliRuntime.WasSpecified(parseResult, ExpiresAfterOptions.Seconds); var expiresAfter = - __expiresAfterSpecified || __requestBase?.ExpiresAfter is not null + __expiresAfterSpecified || __expiresAfterBase is not null ? new global::tryAGI.OpenAI.FileExpirationAfter { Anchor = expiresAfterAnchor, - Seconds = expiresAfterSeconds, + Seconds = expiresAfterSeconds!, } - : __requestBase?.ExpiresAfter; + : __expiresAfterBase; 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 344edfc8..0bd41bc9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioSpeechesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 2cf36740..2562b026 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageAudioTranscriptionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 df13ed0c..5205c1db 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCodeInterpreterSessionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 16e1069c..a2c0c774 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCompletionsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a6f8668f..56aa4447 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageCostsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 f8628484..36ed06bf 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageEmbeddingsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 7042728f..1872e65e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageFileSearchCallsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 dafc64af..3b17d06f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageImagesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 cad7159a..9e96f84f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageModerationsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8abbf14b..b010cfd2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageVectorStoresCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 24e2f4ca..0a2246ab 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsageWebSearchCallsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 655b82f2..37520002 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsAssignOrganizationRoleToUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9e5c37e1..abe8bb41 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsListUserOrganizationRoleAssignmentsCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4c6cebc2..23775a71 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsRetrieveUserOrganizationRoleCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 10cd28f8..0f9f1741 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UserOrganizationRoleAssignmentsUnassignOrganizationRoleFromUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 ee0c527c..a8e49a56 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersDeleteUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 31efb75e..7993094b 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersListUsersCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0808a5c4..e58735b8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersModifyUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -35,18 +36,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, @@ -91,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."); } }); @@ -106,10 +107,10 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var userId = parseResult.GetRequiredValue(UserId); - 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; + 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; 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 a0824a65..c84b2b4e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/UsersRetrieveUserCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 2bda46d6..c7c6e474 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCancelVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 deb44d40..90f41db9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -41,18 +42,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, @@ -98,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."); } }); @@ -112,12 +113,12 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - 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; + 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; 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 c680a1f5..2df608f5 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -36,18 +37,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, @@ -96,7 +97,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."); } }); @@ -111,10 +112,10 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); - 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; + 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; 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 e2ce5b1a..96701ab4 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresCreateVectorStoreFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -31,18 +32,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, @@ -88,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 +105,8 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var fileId = parseResult.GetRequiredValue(FileId); - var chunkingStrategy = parseResult.GetValue(ChunkingStrategy) ?? __requestBase?.ChunkingStrategy; - var attributes = parseResult.GetValue(Attributes) ?? __requestBase?.Attributes; + 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; 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 a45b55f5..fbf6ddf9 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 88869196..06d49b46 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresDeleteVectorStoreFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b9444835..89b4eb64 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 6f7a5099..44c213a8 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoreFilesInABatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 84ad6829..5b1acde1 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresListVectorStoresCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 0ec91b70..9d1ec281 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresModifyVectorStoreCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -29,18 +30,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, @@ -84,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."); } }); @@ -99,9 +100,9 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); - var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name; - var expiresAfter = parseResult.GetValue(ExpiresAfter) ?? __requestBase?.ExpiresAfter; - var metadata = parseResult.GetValue(Metadata) ?? __requestBase?.Metadata; + 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; 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 680c486d..45eef85c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4264b0bf..8c18aa96 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileBatchCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 635b3b8f..cc857b3c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 dbb77c4c..b34ac10e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresRetrieveVectorStoreFileContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 b1d7fc16..1d92c8d2 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresSearchVectorStoreCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -40,18 +41,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, @@ -97,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,10 +114,10 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var query = parseResult.GetRequiredValue(Query); - 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; + 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; 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 bbf2bee0..bff031cb 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VectorStoresUpdateVectorStoreFileAttributesCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -23,18 +24,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, @@ -77,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."); } }); @@ -93,7 +94,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var vectorStoreId = parseResult.GetRequiredValue(VectorStoreId); var fileId = parseResult.GetRequiredValue(FileId); - var attributes = parseResult.GetValue(Attributes) ?? __requestBase?.Attributes; + var attributes = CliRuntime.WasSpecified(parseResult, Attributes) ? parseResult.GetValue(Attributes) : __requestBase is not null ? __requestBase.Attributes : default; 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 debbff24..cf2d0b06 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCharacterCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9ac9cac7..06f9bd1d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine; @@ -36,18 +37,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, @@ -92,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."); } }); @@ -106,11 +107,11 @@ await CliRuntime.RunAsync(async () => RequestFile, global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var model = parseResult.GetValue(Model) ?? __requestBase?.Model; + var model = CliRuntime.WasSpecified(parseResult, Model) ? parseResult.GetValue(Model) : __requestBase is not null ? __requestBase.Model : default; var prompt = parseResult.GetRequiredValue(Prompt); - var inputReference = parseResult.GetValue(InputReference) ?? __requestBase?.InputReference; - var seconds = parseResult.GetValue(Seconds) ?? __requestBase?.Seconds; - var size = parseResult.GetValue(Size) ?? __requestBase?.Size; + 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; 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 d4956c61..7c1f643d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoEditCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 a2371cf9..70427852 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosCreateVideoExtendCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8486f0b8..91ab7c6f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosDeleteVideoCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 8dcb4f84..a44e85bd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosGetVideoCharacterCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 363f1124..b57a967d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosListVideosCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 9655d9d9..7b7560fd 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRemixVideoCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 abaf065f..9c29530a 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #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 4aeb0241..40eaad2e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/VideosRetrieveVideoContentCommandApiCommand.g.cs @@ -1,4 +1,5 @@ #nullable enable +#pragma warning disable CS0618 using System.CommandLine;