From 640323a0fb1337d3501895be55bc3fbf75d4f262 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Mon, 6 Nov 2023 22:58:01 -0500 Subject: [PATCH] some more cleanup --- OpenAI-DotNet/Chat/ChatEndpoint.cs | 1 - OpenAI-DotNet/Completions/CompletionRequest.cs | 8 ++------ OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs | 1 - OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs | 2 +- OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs | 1 - OpenAI-DotNet/FineTuning/JobStatus.cs | 12 ++++++------ OpenAI-DotNet/Moderations/ModerationsEndpoint.cs | 4 ++-- 7 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs delete mode 100644 OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs diff --git a/OpenAI-DotNet/Chat/ChatEndpoint.cs b/OpenAI-DotNet/Chat/ChatEndpoint.cs index 85857f58..7448e158 100644 --- a/OpenAI-DotNet/Chat/ChatEndpoint.cs +++ b/OpenAI-DotNet/Chat/ChatEndpoint.cs @@ -36,7 +36,6 @@ public async Task GetCompletionAsync(ChatRequest chatRequest, Canc return response.DeserializeResponse(responseAsString, OpenAIClient.JsonSerializationOptions); } - /// /// Created a completion for the chat message and stream the results to the as they come in. /// diff --git a/OpenAI-DotNet/Completions/CompletionRequest.cs b/OpenAI-DotNet/Completions/CompletionRequest.cs index cad6c89b..d92bb43a 100644 --- a/OpenAI-DotNet/Completions/CompletionRequest.cs +++ b/OpenAI-DotNet/Completions/CompletionRequest.cs @@ -194,11 +194,7 @@ public CompletionRequest() : this(DefaultCompletionRequestArgs) { } /// The to copy public CompletionRequest(CompletionRequest basedOn) { - if (basedOn == null) - { - return; - } - + if (basedOn == null) { return; } Model = basedOn.Model ?? DefaultCompletionRequestArgs?.Model ?? Models.Model.Davinci; Prompts = basedOn.Prompts; Suffix = basedOn.Suffix ?? DefaultCompletionRequestArgs?.Suffix; @@ -274,7 +270,7 @@ public CompletionRequest( } else { - throw new ArgumentNullException(nameof(prompts), $"Missing required prompt or prompts"); + throw new ArgumentNullException(nameof(prompts), "Missing required prompt or prompts"); } Model = string.IsNullOrWhiteSpace(model) diff --git a/OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs b/OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs deleted file mode 100644 index 5f282702..00000000 --- a/OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs b/OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs index a68ead39..fdbc5e17 100644 --- a/OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs +++ b/OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs @@ -22,7 +22,7 @@ public FineTuningEndpoint(OpenAIClient api) : base(api) { } /// /// Creates a job that fine-tunes a specified model from a given dataset. - /// Response includes details of the enqueued job including job status and + /// Response includes details of the queued job including job status and /// the name of the fine-tuned models once complete. /// /// . diff --git a/OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs b/OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs deleted file mode 100644 index 5f282702..00000000 --- a/OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/OpenAI-DotNet/FineTuning/JobStatus.cs b/OpenAI-DotNet/FineTuning/JobStatus.cs index dfb01f04..dd0e1e93 100644 --- a/OpenAI-DotNet/FineTuning/JobStatus.cs +++ b/OpenAI-DotNet/FineTuning/JobStatus.cs @@ -6,16 +6,16 @@ public enum JobStatus { NotStarted = 0, [EnumMember(Value = "validating_files")] - ValidatingFiles = 1, + ValidatingFiles, [EnumMember(Value = "queued")] - Queued = 2, + Queued, [EnumMember(Value = "running")] - Running = 3, + Running, [EnumMember(Value = "succeeded")] - Succeeded = 4, + Succeeded, [EnumMember(Value = "failed")] - Failed = 5, + Failed, [EnumMember(Value = "cancelled")] - Cancelled = 6, + Cancelled } } \ No newline at end of file diff --git a/OpenAI-DotNet/Moderations/ModerationsEndpoint.cs b/OpenAI-DotNet/Moderations/ModerationsEndpoint.cs index 54e622c9..95c60cb0 100644 --- a/OpenAI-DotNet/Moderations/ModerationsEndpoint.cs +++ b/OpenAI-DotNet/Moderations/ModerationsEndpoint.cs @@ -31,7 +31,7 @@ public ModerationsEndpoint(OpenAIClient api) : base(api) { } /// If you use text-moderation-stable, we will provide advanced notice before updating the model. /// Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest. /// - /// Optional, + /// Optional, . /// /// True, if the text has been flagged by the model as violating OpenAI's content policy. /// @@ -45,7 +45,7 @@ public async Task GetModerationAsync(string input, string model = null, Ca /// Classifies if text violates OpenAI's Content Policy /// /// - /// Optional, + /// Optional, . /// Raised when the HTTP request fails public async Task CreateModerationAsync(ModerationsRequest request, CancellationToken cancellationToken = default) {