Are you a Python enthusiast looking for a simple and efficient way to interact with OpenAI’s GPT-3? Look no further. Here is “SimpleGPT,” a user-friendly Python class designed to streamline your interactions with the GPT-3 API.

Why SimpleGPT?

Streamlined Interaction: Writing code to interact with OpenAI’s powerful GPT-3 model can be a complex and time-consuming task. SimpleGPT simplifies the process by providing a clean and easy-to-use Python class that lets you get the most out of GPT-3 with just a few lines of code.

Specific System Prompts: Sometimes, you need your AI model to follow a specific prompt or instruction. SimpleGPT allows you to specify a system prompt, ensuring that you get the responses you want, tailored to your requirements.

Local Cache for Efficiency: We understand that making API calls can add up in terms of costs and response times. SimpleGPT includes an optional local cache feature that stores responses, reducing the need for frequent API calls and significantly improving response time.

How to Use SimpleGPT   

The below example is preparing a free text input for feeding into a currency converter program.

    gpt = SimpleGPT("You are a currency symbol converter. You will extract the from currency symbol, destination currency symbol, and the amount to be converted. The response will be a single statement with no additional information, in the format of (from,to,amount).")

    # or turn on cache as needed
    gpt.cache_responses = True
    gpt.cache_directory = "C:/SimpleGPT/"

    response = gpt.simple_query("what is one hundred dollars Australian in us")


And the output would be:



With SimpleGPT, we’ve made harnessing the power of OpenAI’s GPT-3 even more accessible and efficient. You can save time, money, and effort by simplifying your code and ensuring you get the responses you want, all while enjoying the convenience of a local cache to speed up your interactions.

Ready to dive into the world of simple, effective GPT-3 queries? Give SimpleGPT a try today! Get started with your OpenAI API key and let your creativity flow

To get started, download the Python class from my GitHub, insert your API key and you are ready to go!

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *