Skip to content

Commit d4b0eed

Browse files
committed
Update readme status and addess Azure api version issues
1 parent 2c817ca commit d4b0eed

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Console.WriteLine(result);
3333
## Status
3434
[![OpenAI](https://badgen.net/nuget/v/OpenAI)](https://www.nuget.org/packages/OpenAI/)
3535

36-
Added support for ChatGPT, DALLE 2 image generations, and the moderation endpoint.
36+
Added support for GPT4, streaming conversations with ChatGPT, and supporting [`IHttpClientFactory`](#ihttpclientfactory).
3737

3838
Now also should work with the Azure OpenAI Service, although this is untested. See the [Azure](#azure) section for further details.
3939

@@ -290,20 +290,23 @@ Image edits and variations are not yet implemented.
290290

291291
## Azure
292292

293-
For using the Azure OpenAI Service, you need to specify the name of your Azure OpenAI resource as well as your model deployment id. Additionally you may specify the Api version which defaults to `2022-12-01`.
293+
For using the Azure OpenAI Service, you need to specify the name of your Azure OpenAI resource as well as your model deployment id.
294294

295295
_I do not have access to the Microsoft Azure OpenAI service, so I am unable to test this functionality. If you have access and can test, please submit an issue describing your results. A PR with integration tests would also be greatly appreciated. Specifically, it is unclear to me that specifying models works the same way with Azure._
296296

297-
Refer the [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference) for further information.
297+
Refer the [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference) and [detailed screenshots in #64](https://github.com/OkGoDoIt/OpenAI-API-dotnet/issues/64#issuecomment-1479276020) for further information.
298298

299299
Configuration should look something like this for the Azure service:
300300

301301
```csharp
302302
OpenAIAPI api = OpenAIAPI.ForAzure("YourResourceName", "deploymentId", "api-key");
303+
api.ApiVersion = "2023-03-15-preview"; // needed to access chat endpoint on Azure
303304
```
304305

305306
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.
306307

308+
As of April 2, 2023, you need to manually select api version `2023-03-15-preview` as shown above to access the chat endpoint on Azure. Once this is out of preview I will update the default.
309+
307310
## IHttpClientFactory
308311
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).
309312

0 commit comments

Comments
 (0)