You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewAuthenticationException("You must provide API authentication. Please refer to https://github.com/OkGoDoIt/OpenAI-API-dotnet#authentication for details.");
Copy file name to clipboardExpand all lines: OpenAI_API/Files/FilesEndpoint.cs
-1
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,6 @@ public async Task<File> DeleteFileAsync(string fileId)
71
71
/// <param name="purpose">The intendend purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows us to validate the format of the uploaded file.</param>
Copy file name to clipboardExpand all lines: OpenAI_Tests/CompletionEndpointTests.cs
+18-2
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,22 @@ public void GetSimpleCompletion()
53
53
}
54
54
55
55
56
+
[Test]
57
+
publicvoidCompletionUsageDataWorks()
58
+
{
59
+
varapi=newOpenAI_API.OpenAIAPI();
60
+
61
+
Assert.IsNotNull(api.Completions);
62
+
63
+
varresults=api.Completions.CreateCompletionsAsync(newCompletionRequest("One Two Three Four Five Six Seven Eight Nine One Two Three Four Five Six Seven Eight",model:Model.CurieText,temperature:0.1,max_tokens:5)).Result;
0 commit comments