/csharp-openai-assistants-dotnet-console

A demo C# / .NET console app showing how to upload a file to the OpenAI Assistants V2 API and ask it natural language questions

Primary LanguageC#MIT LicenseMIT

C# / .NET OpenAI GPT-4 Assistant for Local File Search

This is small sample project that shows you how to:

  • upload local files to the OpenAI GPT-4 Assistant service on either Azure OpenAI service or the OpenAI API
  • Use the File Search tool on Azure OpenAI Service
  • Ask natural language questions about the file
  • Keep the conversation thread active for follow up questions

Presented as a single Program.cs .NET 8.0 Console app.

Screenshot 2024-04-13 at 15 42 25

To use the compiled app, the first parameter must be that to a local file, or on Windows you can drag and drop the file onto the compiled .exe. Tested pretty extensively with PDF files.