The AI Prototype will test/showcase a mobile application's ability to call and interact with an OpenAI/ChatGPT Model
The ChatGPT Console Interface is a C# program that provides a console interface for interacting with the OpenAI API using the text-davinci-003 model. The program allows users to enter a prompt and receive a response generated by the OpenAI API.
Functions Tested: Permission via Manifest / API Call / Return Content
This prototype works as a simple prompt and response chat client.
The response cushion is not interactable. Cant adjust the training or token count at the moment.
Adjusting this would be easy, but not worth the effort for this prototype.
Prototype has a very long wait time without any indication of what is happening. The type is fed into a dynamic and returned as a string. The response is a completed JSON opposed to a set of partial JSON set. Perhaps I can Adjust this.
The whole API calls. The GPT returns content that I would need for the
Sample Prompt Given to it: Create a C# Black Jack game Results: It works! I created a 2nd project in the repository that holds the game. The first response was limited by input tokens, but after making adjustments, the second one worked great!
The ChatGPT Console Interface is a C# program that provides a console interface for interacting with the OpenAI API using the text-davinci-003 model. The program allows users to enter a prompt and receive a response generated by the OpenAI API.
.NET Core SDK 2.2 or later and Newtonsoft.Json library for JSON serialization/deserialization
Obtain an OpenAI API key from the OpenAI website. Clone the repository or download the source code and extract the files. Open the project in an IDE such as Visual Studio. In the Main method of the program, replace "YOUR API HERE" with your OpenAI API key. Build and run the program. Enter a prompt at the console prompt and press enter. The program will send the prompt to the OpenAI API and display the generated response. Program Structure: The program consists of two methods: Main and API.
The Main method is the entry point of the program and contains the console interface. It prompts the user for input, calls the API method to send the input to the OpenAI API, and displays the generated response to the console.
The API method takes a prompt and an API key as input parameters and returns a string response generated by the OpenAI API. It sends an HTTP POST request to the OpenAI API endpoint, passing the prompt and other parameters such as the API key, model type, max_tokens and temperature. The API response is then read and deserialized from JSON format into a dynamic object, and the first choice of text is returned.
The program is dependent on an active internet connection to communicate with the OpenAI API. The program may generate responses that are inappropriate or offensive, depending on the nature of the prompt and the training data of the text-davinci-003 model. The program has a limited capacity for handling large amounts of input or generating long responses, as determined by the max_tokens parameter. The program may be subject to rate limits imposed by the OpenAI API, depending on the usage of the API key.