From ead59d1365253dab76eb982ad48aa29f77f3c039 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Sun, 18 Aug 2024 00:32:59 -0400 Subject: [PATCH] . --- OpenAI-DotNet-Proxy/Readme.md | 1 + README.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/OpenAI-DotNet-Proxy/Readme.md b/OpenAI-DotNet-Proxy/Readme.md index dd2e3eff..1485d04f 100644 --- a/OpenAI-DotNet-Proxy/Readme.md +++ b/OpenAI-DotNet-Proxy/Readme.md @@ -49,6 +49,7 @@ In this example, we demonstrate how to set up and use `OpenAIProxy` in a new ASP 1. Create a new [ASP.NET Core minimal web API](https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-6.0) project. 2. Add the OpenAI-DotNet nuget package to your project. - Powershell install: `Install-Package OpenAI-DotNet-Proxy` + - Dotnet install: `dotnet add package OpenAI-DotNet-Proxy` - Manually editing .csproj: `` 3. Create a new class that inherits from `AbstractAuthenticationFilter` and override the `ValidateAuthentication` method. This will implement the `IAuthenticationFilter` that you will use to check user session token against your internal server. 4. In `Program.cs`, create a new proxy web application by calling `OpenAIProxy.CreateWebApplication` method, passing your custom `AuthenticationFilter` as a type argument. diff --git a/README.md b/README.md index 18902fbb..05e41c89 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,18 @@ More context [on Roger Pincombe's blog](https://rogerpincombe.com/openai-dotnet- Install package [`OpenAI-DotNet` from Nuget](https://www.nuget.org/packages/OpenAI-DotNet/). Here's how via command line: -```powershell +powershell: + +```terminal Install-Package OpenAI-DotNet ``` +dotnet: + +```terminal +dotnet add package OpenAI-DotNet +``` + > Looking to [use OpenAI-DotNet in the Unity Game Engine](https://github.com/RageAgainstThePixel/com.openai.unity)? Check out our unity package on OpenUPM: > >[![openupm](https://img.shields.io/npm/v/com.openai.unity?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.openai.unity/) @@ -307,6 +315,7 @@ In this example, we demonstrate how to set up and use `OpenAIProxy` in a new ASP 1. Create a new [ASP.NET Core minimal web API](https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-6.0) project. 2. Add the OpenAI-DotNet nuget package to your project. - Powershell install: `Install-Package OpenAI-DotNet-Proxy` + - Dotnet install: `dotnet add package OpenAI-DotNet-Proxy` - Manually editing .csproj: `` 3. Create a new class that inherits from `AbstractAuthenticationFilter` and override the `ValidateAuthentication` method. This will implement the `IAuthenticationFilter` that you will use to check user session token against your internal server. 4. In `Program.cs`, create a new proxy web application by calling `OpenAIProxy.CreateWebApplication` method, passing your custom `AuthenticationFilter` as a type argument.