Skip to content

Commit

Permalink
some more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Nov 7, 2023
1 parent ada20da commit 640323a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 18 deletions.
1 change: 0 additions & 1 deletion OpenAI-DotNet/Chat/ChatEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public async Task<ChatResponse> GetCompletionAsync(ChatRequest chatRequest, Canc
return response.DeserializeResponse<ChatResponse>(responseAsString, OpenAIClient.JsonSerializationOptions);
}


/// <summary>
/// Created a completion for the chat message and stream the results to the <paramref name="resultHandler"/> as they come in.
/// </summary>
Expand Down
8 changes: 2 additions & 6 deletions OpenAI-DotNet/Completions/CompletionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ public CompletionRequest() : this(DefaultCompletionRequestArgs) { }
/// <param name="basedOn">The <see cref="CompletionRequest"/> to copy</param>
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;
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion OpenAI-DotNet/FineTuning/FineTuneJobResponse.cs

This file was deleted.

2 changes: 1 addition & 1 deletion OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public FineTuningEndpoint(OpenAIClient api) : base(api) { }

/// <summary>
/// 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.
/// </summary>
/// <param name="jobRequest"><see cref="CreateFineTuneJobRequest"/>.</param>
Expand Down
1 change: 0 additions & 1 deletion OpenAI-DotNet/FineTuning/FineTuningTrainingData.cs

This file was deleted.

12 changes: 6 additions & 6 deletions OpenAI-DotNet/FineTuning/JobStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
4 changes: 2 additions & 2 deletions OpenAI-DotNet/Moderations/ModerationsEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/></param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <returns>
/// True, if the text has been flagged by the model as violating OpenAI's content policy.
/// </returns>
Expand All @@ -45,7 +45,7 @@ public async Task<bool> GetModerationAsync(string input, string model = null, Ca
/// Classifies if text violates OpenAI's Content Policy
/// </summary>
/// <param name="request"><see cref="ModerationsRequest"/></param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/></param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <exception cref="HttpRequestException">Raised when the HTTP request fails</exception>
public async Task<ModerationsResponse> CreateModerationAsync(ModerationsRequest request, CancellationToken cancellationToken = default)
{
Expand Down

0 comments on commit 640323a

Please sign in to comment.