Skip to content

Commit 97fb71b

Browse files
committed
fix typos in readme and add table of contents
1 parent 43732fc commit 97fb71b

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,33 @@
22

33
A simple C# .NET wrapper library to use with OpenAI's GPT-3 API. More context [on my blog](https://rogerpincombe.com/openai-dotnet-api).
44

5-
## Status
6-
Updated to work with the current API as of February 2, 2023. Added Files and Embedding endpoints. Removed the Search endpoint as OpenAI has removed that API.
7-
Potentially breaking change with v1.4: The various endpoints (Completions, Models, etc) and related classes have each moved into their own namespaces, for example `OpenAI_API.Completions.CompletionRequest` and `OpenAI_API.Models.Model.DavinciText`. You may need to add `using`s or fully qualify names in exisitng code.
8-
9-
Thank you [@GotMike](https://github.com/gotmike), [@gmilano](https://github.com/gmilano), [@metjuperry](https://github.com/metjuperry), and [@Alexei000](https://github.com/Alexei000) for your contributions!
10-
115
## Quick Example
126

137
```csharp
14-
var api = new OpenAI_API.OpenAIAPI();
15-
8+
var api = new OpenAI_API.OpenAIAPI("YOUR_API_KEY");
169
var result = await api.Completions.GetCompletion("One Two Three One Two");
1710
Console.WriteLine(result);
1811
// should print something starting with "Three"
1912
```
2013

14+
## Readme
15+
16+
* [Status](#Status)
17+
* [Requirements](#requirements)
18+
* [Installation](#install-from-nuget)
19+
* [Authentication](#authentication)
20+
* [Completions API](#completions)
21+
* [Streaming completion results](#streaming)
22+
* [Embeddings API](#embeddings)
23+
* [Files API](#files-for-fine-tuning)
24+
* [Additonal Documentation](#documentation)
25+
* [License](#license)
26+
27+
## Status
28+
Updated to work with the current API as of February 2, 2023. Added Files and Embedding endpoints. Removed the Search endpoint as OpenAI has removed that API.
29+
Potentially breaking change with v1.4: The various endpoints (Completions, Models, etc) and related classes have each moved into their own namespaces, for example `OpenAI_API.Completions.CompletionRequest` and `OpenAI_API.Models.Model.DavinciText`. You may need to add `using`s or fully qualify names in existing code.
30+
31+
Thank you [@GotMike](https://github.com/gotmike), [@gmilano](https://github.com/gmilano), [@metjuperry](https://github.com/metjuperry), and [@Alexei000](https://github.com/Alexei000) for your contributions!
2132

2233
## Requirements
2334

@@ -110,7 +121,7 @@ async Task<EmbeddingResult> CreateEmbeddingAsync(EmbeddingRequest request);
110121
// for example
111122
var result = await api.Embeddings.CreateEmbeddingAsync(new EmbeddingRequest("A test text for embedding", model: Model.AdaTextEmbedding));
112123
// or
113-
var result = await api.Completions.CreateCompletionAsync("A test text for embedding");
124+
var result = await api.Embeddings.CreateEmbeddingAsync("A test text for embedding");
114125
```
115126

116127
The embedding result contains a lot of metadata, the actual vector of floats is in result.Data[].Embedding.

0 commit comments

Comments
 (0)