Integration of OpenAI's ChatGPT with a Blazor Server .NET Core application, providing real-time AI-powered conversations through a clean, scalable architecture.
MIT License
Welcome to the OpenAI ChatGPT Integration project! This repository demonstrates how to integrate OpenAI's ChatGPT API into a .NET Core application, providing a simple and efficient way to interact with the ChatGPT model via a web interface.
Clone the repository:
git clone https://github.com/wajid7511/openai.chatgpt.git
cd openai.chatgpt
Set up your OpenAI API key:
Create a appsettings.json file in the project's root directory or replace is appsettings.json and add your OpenAI API key:
{
"OpenAI": {
"ApiKey": "your-openai-api-key"
}
}
Restore dependencies and build the project:
dotnet restore
dotnet build
Run the application:
dotnet run
Access the application:
Open your web browser and navigate to http://localhost:5000 to start interacting with ChatGPT.
Usage Enter your text prompt in the provided input field and submit it. The application will send the prompt to the ChatGPT model using the OpenAI API. You'll receive a response from ChatGPT, which will be displayed on the screen.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
OpenAI for providing the powerful ChatGPT model.
The .NET Core community for their extensive documentation and support.