6 Lines Is All You Need πŸ”

A lighthearted guide to the changing landscape of large language models

4 Min Read β€’ Intensity: β˜•οΈ β˜•️ β˜•️ 

Good morning, Caffeinators β˜€οΈ

Hold on to your mugs, decaf and latte drinkers! This week's newsletter packs a punch! We're exploring a tutorial on implementing the GPT API and the incredible possibilities it unlocks.

Today’s Starting Sips:

  • Unleashing GPT’s full potential with APIs πŸ” 

  • Exploring GPT’s possibilities & limitations 🌟 

  • Tip of the day: A dose of digital delight πŸ—“οΈ 

GPT API Explosion πŸš€ 

Months ago, GPT released its API to the public, but it wasn't until ChatGPT burst onto the scene that it truly gained traction.

The brilliant move? Making the API accessible through Python, the simplest scripting language.

6-Lines is all it takes

To demonstrate, here is a GPT API call to ask for a coffee joke:

Awful joke, but worth a chuckle πŸ˜† 

If you are code motivated, you can copy it from here.

So what can you do once you’ve learned these API calls? Here are some examples!

Get Inspired by GPT API Creativity πŸ’« 

While a user interface is visually appealing like ChatGPT’s website, it limits the customer experience to one dimension.

With GPT API, you can add more complex logic to your backend for a richer experience. Here are some cool examples:

Get Ready for AI That Trains Itself 🧠

AutoGPT takes human intervention out of the AI training equation. It involves two GPTs conversing and critiquing each other until specific criteria are met, all at lightning speed.

The self-training capability of Auto-GPT paves the way for endless opportunities.

Gear auto turns βš™οΈ 

For example, you can have one GPT as a product manager and the other as a software engineer. The goal is to develop Flappy Bird. Below is a live conversation the GPT’s are having.

When AI makes Group Chats πŸŽ“

The college-era group chat holds a special place in our hearts. What happens when AI meets this digital sanctuary? Meet Robo Boys

Izzy Miller trained an uncensored large language model on the group chat with LlaMa and Hex led to some jaw-dropping results. Prepare to be amazed (and possibly horrified)!

This is just the tip of the ice berg 🧊 

Limitations of GPT API 🚫 

Has 0 Memory 🧠 

GPT API does not hold up a conversation like GPT in the web. Each API calls is independent from each other.

In other words, it will not remember what you tell it to do even though it was 2 seconds ago.

Memory like 🐑 

Yes, Greg Baugues developed 16 lines of Python code to make the API calls β€œchattable”. It is a brilliant idea and works just like ChatGPT on the web.

However, as you chat on, you will quickly realize that you hit the max token limit since Greg’s solution is to store all the message history in a list.

No GPT 4 🫠 

Meanwhile, the gpt-4 model is in Beta and requires a waitlist to join. Publicly, there is no access to GPT 4 via API.

OpenAI, if you're reading this, please let me in. I'll buy you coffee – thank you!

I can go on about why GPT 4 is waaaay better than GPT 3.5, but that will be another article.

Tip of the Day: Grounding πŸ” 

Set a context with GPT by using a technique called grounding. This approach involves setting a predefined role for the system, ensuring it consistently follows through with future repeated commands.

Establish context, and watch GPT seamlessly interact within the given parameters.

Subscribe to Caffeinated GPT β†’ πŸ‘‰πŸ“©πŸ‘€β˜•οΈ

To-Go Cups πŸ₯€ 

  • 6-lines of Python unleashing GPT 3.5 🐍 

  • GPT APIs ignites innovation πŸ”₯ 

  • Grounding GPT for repeated tasks πŸ” 

Until next time,

Your friendly tech barista and β˜•οΈ GPT!

Reply

or to participate.