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
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Console.WriteLine(result);
18
18
*[Installation](#install-from-nuget)
19
19
*[Authentication](#authentication)
20
20
*[ChatGPT API](#chatgpt)
21
+
* [Conversations](#chat-conversations)
22
+
* [Chat Endpoint](#chat-endpoint-requests)
21
23
*[Completions API](#completions)
22
24
* [Streaming completion results](#streaming)
23
25
*[Embeddings API](#embeddings)
@@ -35,7 +37,7 @@ Added support for ChatGPT, DALLE 2 image generations, and the moderation endpoin
35
37
36
38
Now also should work with the Azure OpenAI Service, although this is untested. See the [Azure](#azure) section for further details.
37
39
38
-
Thank you [@GotMike](https://github.com/gotmike), [@megalon](https://github.com/megalon), [@stonelv](https://github.com/stonelv), [@ncface](https://github.com/ncface), [@KeithHenry](https://github.com/KeithHenry), [@gmilano](https://github.com/gmilano), [@metjuperry](https://github.com/metjuperry), [@pandapknaepel](https://github.com/pandapknaepel), and [@Alexei000](https://github.com/Alexei000) for your contributions!
40
+
Thank you [@babrekel](https://github.com/babrekel), [@JasonWei512](https://github.com/JasonWei512), [@GotMike](https://github.com/gotmike), [@megalon](https://github.com/megalon), [@stonelv](https://github.com/stonelv), [@ncface](https://github.com/ncface), [@KeithHenry](https://github.com/KeithHenry), [@gmilano](https://github.com/gmilano), [@metjuperry](https://github.com/metjuperry), [@pandapknaepel](https://github.com/pandapknaepel), and [@Alexei000](https://github.com/Alexei000) for your contributions!
39
41
40
42
## Requirements
41
43
@@ -126,22 +128,22 @@ chat.AppendUserInput("How to make a hamburger?");
You can access full control of the Chat API by using the `OpenAIAPI.Chat.CreateChatCompletionAsync()` and related methods.
146
148
147
149
```csharp
@@ -302,6 +304,14 @@ OpenAIAPI api = OpenAIAPI.ForAzure("YourResourceName", "deploymentId", "api-key"
302
304
303
305
You may then use the `api` object like normal. You may also specify the `APIAuthentication` is any of the other ways listed in the [Authentication](#authentication) section above. Currently this library only supports the api-key flow, not the AD-Flow.
304
306
307
+
## IHttpClientFactory
308
+
While this library does not fully support dependancy injection at this time, you may specify an `IHttpClientFactory` to be used for HTTP requests, which allows for tweaking http request properties, connection pooling, and mocking. Details in [#103](https://github.com/OkGoDoIt/OpenAI-API-dotnet/pull/103).
309
+
310
+
```csharp
311
+
OpenAIAPIapi=newOpenAIAPI();
312
+
api.HttpClientFactory=myIHttpClientFactoryObject;
313
+
```
314
+
305
315
## Documentation
306
316
307
317
Every single class, method, and property has extensive XML documentation, so it should show up automatically in IntelliSense. That combined with the official OpenAI documentation should be enough to get started. Feel free to open an issue here if you have any questions. Better documentation may come later.
0 commit comments