Skip to content

C# class for generating responses and retaining conversation context using ChatGPT API. Used for the following blog post:

License

Notifications You must be signed in to change notification settings

trystanwilcock/ChatGPTClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPTClient

ChatGPTClient is a C# class that can be used to generate responses from the ChatGPT API and retain conversation context.

The repository also includes a console application demonstrating its use.

ChatGPTClient was written for the following blog post:

https://trystanwilcock.com/2023/03/23/how-to-use-chatgpt-in-c-sharp-and-writing-a-chatgpt-client/

Configuration:

Set an Environment variable for "OpenAIAPIKey".

Usage:

var chatGPTClient = new ChatGPTClient();

var chatResponse = await chatGPTClient.SendMessage(userMessage);

About

C# class for generating responses and retaining conversation context using ChatGPT API. Used for the following blog post:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages