Samples of OpenAI APIs in Net Core. More samples coming soon...
Uses OpenAI GPT API to generate a short bedtime story on any given topic. Also uses SignalR to display the response in real-time! Notes:
- Update OpenAI Api key in
appsettings.json
Uses OpenAI GPT and Embedding API to build a simple Q&A application. For data, right now I am using Winter 2022 Olympics articles. Also uses SignalR to display the response in real-time!. I am using OpenAI example application as a reference. OpenAI example is in Python and this one is in netcore 7. I have also used OpenAI and SharpToken Nuget Package. Both Nuget packages are community-built.
In this sample application, you can input your own [vector] data as well and do Q&A. Just need some minor changes like change filepath, change in instruction in OpenAIAPIConnecter functions, changes in UI as needed and you are good to go with your own data. Notes:
- Update OpenAI Api key in
appsettings.json
- In
Infrastructure/DataFiles
folder, add Winter 2022 Olympics data file (download it from here).