Skip to content

Commit

Permalink
Merge pull request #18 from betalgo/dev
Browse files Browse the repository at this point in the history
v6.2.0
  • Loading branch information
kayhantolga authored Aug 10, 2022
2 parents 1dc3a59 + 086f6f1 commit 8b02a8b
Show file tree
Hide file tree
Showing 39 changed files with 36 additions and 872 deletions.
13 changes: 2 additions & 11 deletions OpenAI.Playground/OpenAI.Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LaserCatEyes.HttpClientListener" Version="1.0.3" />
<PackageReference Include="LaserCatEyes.HttpClientListener" Version="1.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
Expand All @@ -27,19 +27,10 @@
<None Update="ApiSettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SampleData\ClassifactionSample.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SampleData\AnswerQuestionsSample.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SampleData\FineTuningSample1.jsonl">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SampleData\SearchSample.jsonl">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SampleData\SentimentAnalysisSample.json">
<None Update="SampleData\SentimentAnalysisSample.jsonl">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions OpenAI.Playground/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

await ModelTestHelper.FetchModelsTest(sdk);
//await CompletionTestHelper.RunSimpleCompletionTest(sdk);
//await SearchTestHelper.SearchDocuments(sdk);
//await ClassificationsTestHelper.RunSimpleClassificationTest(sdk);
//await AnswerTestHelper.RunSimpleAnswerTest(sdk);
//await FileTestHelper.RunSimpleFileTest(sdk);
////await FineTuningTestHelper.CleanUpAllFineTunings(sdk); //!!!!! will delete all fine-tunings
//await FineTuningTestHelper.RunCaseStudyIsTheModelMakingUntrueStatements(sdk);
Expand Down
2 changes: 0 additions & 2 deletions OpenAI.Playground/SampleData/AnswerQuestionsSample.json

This file was deleted.

2 changes: 0 additions & 2 deletions OpenAI.Playground/SampleData/ClassifactionSample.json

This file was deleted.

2 changes: 0 additions & 2 deletions OpenAI.Playground/SampleData/SearchSample.jsonl

This file was deleted.

51 changes: 0 additions & 51 deletions OpenAI.Playground/TestHelpers/AnswerTestHelper.cs

This file was deleted.

50 changes: 0 additions & 50 deletions OpenAI.Playground/TestHelpers/ClassificationsTestHelper.cs

This file was deleted.

8 changes: 4 additions & 4 deletions OpenAI.Playground/TestHelpers/FileTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public static async Task RunSimpleFileTest(IOpenAIService sdk)

try
{
const string fileName = "AnswerQuestionsSample.json";
const string fileName = "SentimentAnalysisSample.jsonl";

var sampleFile = await File.ReadAllBytesAsync($"SampleData/{fileName}");

ConsoleExtensions.WriteLine($"Uploading file {fileName}", ConsoleColor.DarkCyan);
var uploadFilesResponse = await sdk.Files.FileUpload(UploadFilePurposes.UploadFilePurpose.Answers, sampleFile, fileName);
var uploadFilesResponse = await sdk.Files.FileUpload(UploadFilePurposes.UploadFilePurpose.FineTune, sampleFile, fileName);
if (uploadFilesResponse.Successful)
{
ConsoleExtensions.WriteLine($"{fileName} uploaded", ConsoleColor.DarkGreen);
Expand Down Expand Up @@ -70,9 +70,9 @@ public static async Task CleanAllFiles(IOpenAIService sdk)
{
try
{
Console.WriteLine($"Starting to clean All Files");
Console.WriteLine("Starting to clean All Files");
var uploadedFiles = await sdk.Files.FileList();
foreach (var uploadedFile in uploadedFiles!.Data)
foreach (var uploadedFile in uploadedFiles.Data)
{
Console.WriteLine(uploadedFile.FileName);
var deleteResponse = await sdk.Files.FileDelete(uploadedFile.Id);
Expand Down
129 changes: 0 additions & 129 deletions OpenAI.Playground/TestHelpers/SearchTestHelper.cs

This file was deleted.

22 changes: 0 additions & 22 deletions OpenAI.SDK/Interfaces/IAnswer.cs

This file was deleted.

24 changes: 0 additions & 24 deletions OpenAI.SDK/Interfaces/IClassification.cs

This file was deleted.

2 changes: 1 addition & 1 deletion OpenAI.SDK/Interfaces/ICompletion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface ICompletion
/// <param name="createCompletionModel"></param>
/// <param name="engineId">The ID of the engine to use for this request</param>
/// <returns></returns>
Task<CompletionCreateResponse> Create(CompletionCreateRequest createCompletionModel, ObjectModels.Models.Model engineId)
Task<CompletionCreateResponse> Create(CompletionCreateRequest createCompletionModel, Models.Model engineId)
{
return Create(createCompletionModel, engineId.EnumToString());
}
Expand Down
Loading

0 comments on commit 8b02a8b

Please sign in to comment.