Skip to content

This repository contains a simple C# chatbot powered by OpenAI’s ChatGPT. The chatbot utilizes the RestSharp and Newtonsoft.Json libraries to interact with the ChatGPT API and process user input.

License

dotnetsafer/CSharp-ChatBot-GPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT C# Chatbot

This repository contains a simple C# chatbot powered by OpenAI's ChatGPT. The chatbot utilizes the RestSharp and Newtonsoft.Json libraries to interact with the ChatGPT API and process user input.

How to Use

  1. Clone this repository or copy the provided code.
  2. Ensure you have the required NuGet packages installed:
    • RestSharp
    • Newtonsoft.Json
  3. Replace the placeholder API key in the Main method with your ChatGPT API key.
  4. Run the application to start interacting with the ChatGPT chatbot.

Code Explanation

For a detailed step-by-step guide on how this code works and how to create a ChatGPT chatbot in C#, please refer to the following article: Creating a Chatbot with ChatGPT and C#

Features

  • User-friendly console interface with colored prompts.
  • Easy-to-understand code structure for quick customization.
  • Simple API interaction with the ChatGPT API using RestSharp.

About

This repository contains a simple C# chatbot powered by OpenAI’s ChatGPT. The chatbot utilizes the RestSharp and Newtonsoft.Json libraries to interact with the ChatGPT API and process user input.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages