Replit ⠕ Profile picture
Mar 10, 2023 10 tweets 5 min read Read on X
Did you know you can build a ChatGPT powered personal tutor in just 3 minutes?

Here’s how 🧵
First, fork the GPT-3.5 template on Replit replit.com/@replit/OpenAI…

Then bring over your OpenAI API key to the Secrets Manager as OPEN_API_KEY.

If you click Run, you’ve already got some interaction going right out of the box, but let’s make it more useful!
The new API uses a messages array to deal with nearly everything. You can set up your starting prompt using the new `system` role and give context and instructions to your bot.
Using a prompt borrowed from @emollick we can set GPT-3 up to think of itself as an adaptive tutor, one that will adjust its teaching style and complexity to our level of understanding - that and multiple choice quizzing too! We’ve just got to customise the prompt.
@emollick Let’s set this array up, use an f-string to replace the learning topic with something user generated. Getting the response from the AI is as simple as sending a one-line command to the API. Initial code to set up the prompt and send it over to OpenAI
@emollick When we get back a message from the AI, we want to assign that to the `assistant` role and add it to the messages array. This means that we have a history of the conversation because…
@emollick Each time we go out to the API, we have to send it the full messages array, so it has all the instructions and the original context. If you don’t maintain your messages array no one else will! It’s not chat if it doesn’t remember what the user said.
@emollick The next step is to ask the user for their response and package this all back up for the API.

Nice and simple, we just need to append the dictionary containing the content back to the messages array before the end of the loop.
@emollick Hit run on your Repl and - boom - you’ve built a universal tutor bot, that can teach anyone about anything and adjust its language accordingly.

Can you imagine how much work this would have been six months ago? Now it’s a 3-minute job!
@emollick Want to try it yourself?

Just use this template and bring your own OpenAI API key.

replit.com/@replit/OpenAI…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Replit ⠕

Replit ⠕ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Replit

Jul 17, 2024
We’re sick of decade-old version control systems.

Git is unapproachable to non-engineers and makes it hard for everyone else to start contributing.

Replit Teams breaks down those barriers, allowing anyone to create software.

Introducing Projects for Replit Teams
When you create a project, you'll get a clean dashboard that shows the active forks of your main Repl and who’s currently coding on your team.

Here's a demo:
When starting a new feature or prototype, you can easily make a fresh fork and jump between versions from the Workspace header.

Check it out:
Read 5 tweets
Jun 28, 2023
An AI tool can make you a 10X engineer. Learning how to use it the right way can make you a 100X engineer.

Here’s how you can effectively leverage Ghostwriter to help you code at the speed of thought 🧵
Ghostwriter is trained on our documentation so you can ask technical questions about Replit.

An effective strategy to do this is to start off your prompt with “According to the Replit docs…”
Ghostwriter has multiple fine-tuned presets to help with different coding techniques such as code explanation, generation, and transformation.
Read 7 tweets
Jun 5, 2023
This developer used to charge $50 per project.

Today, he makes 100x that by building AI apps for clients who are listed on NASDAQ.

And he’s done it all from his dorm room in Nairobi, Kenya.

His story is a glimpse into the future of software creators in an AI world 👇 Image
George Wandhe, @tec_toi, studies computer science at Moi University.

3 months ago, he discovered Replit Bounties from @amasad’s tweets and decided to give freelancing a shot.

His goal: earn $1000 USD per month to see if life as a full-time freelancer was possible.
@tec_toi @amasad One day, @DomWellsOnfolio CEO of Onfolio ($ONFO) came to Bounties and posted an idea.

He needed a developer to build an AI shopping assistant for Onfolio portfolio company, Mighty Deals, a free website that lists daily deals for design tools and software. Image
Read 7 tweets
Apr 28, 2023
We couldn’t host Replit Developer Day without having an opportunity for developers to build.

After our keynote event, we hosted builders in our SF office, and as always, the demos were incredible!

Here’s a sampling of what they built 👇
@itsandrewgao is known for his creative AI projects on Replit, like biblegpt.org, but his hack night project was some of his best work yet.

He digitally cloned David Attenborough’s voice, and created an app that makes a mockumentary with a single prompt.
Selali’s been working on @notionsmith, a UX persona generator for any product. He used @itsandrewgao’s project as an input and got some really interesting outputs.

You can even chat with the different personas to get deeper product insights.
Read 6 tweets
Apr 26, 2023
At #ReplitDevDay, we announced we’ve trained and are open-sourcing our first Complete Code model.

Introducing replit-code-v1-3b:

- 2.7B params
- 20 languages
- 525B tokens
- 40% better than comparable models
- Trained in 10 days

Take a look at the benchmarks yourself 🧵 Image
Replit-code-v1-3b & replit-finetuned-v1-3b were trained entirely on code and were meant for single-line code completion.

We didn’t expect either to perform so well on HumanEval, but they did.

replit-finetuned-v1-3b outperformed all OSS code models, even those 5x its size. Image
Both models also benchmark impressively well against commercial models.

replit-finetuned-v1-3b is by far the smallest model on the table and it outperformed Codex and LLaMA.

PaLM-Coder is 200x larger and we’re closing in on their performance with much better latency. Image
Read 5 tweets
Apr 14, 2023
Have an idea for an AI app?

Don’t have the time or coding experience to create it?

With Services on Replit you can hire an experienced developer to build anything including
- AI Agents
- Custom chatbots
- Content generators
- More!

Here are some examples to give you an idea 💡 Image
Build a custom AI chatbot that can reference your own data.

@Klaudioz recently worked with a law firm to build SophieGPT, a chatbot that can answer questions about immigration law.
@Klaudioz Imagine an autonomous helper scouring the internet for info or leads while you sleep.

That’s what agents do and we have several developers ready to build one!

Check out @chillzaza_ demo below for an idea of how agents work.

Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(