:::takeaways 本文要点
:::
The ChatGPT website is useful, but wouldn't it be nice if you could write and test prompts right on this website? With Learn Prompting Embeds, you can! Read on to see how to set this up. We will include these interactive embeds in the most articles.
ChatGPT 网站非常有用,但如果你能在本网站上编写和测试提示,那不是更好吗?通过学习提示嵌入(Learn Prompting Embeds),你可以实现这一点!继续阅读以了解如何设置。我们将在大多数文章中包含这些交互式嵌入。
观看视频教程:
Here is an image of what an embed looks like:
You should be able to see an embed that looks just like the image right below this paragraph. If it is not visible, you may need to enable JavaScript or use a different browser. If you still cannot see it, join the Discord and tell us about your problem.
Assuming that you can see the embed, click on the Generate button. If this is your first time using it, you will be prompted to input an OpenAI API key. An OpenAI API key is just a string of text that the embed uses to link to your OpenAI account.
You should now be able to use the embeds throughout this site. Note that OpenAI charges you for each prompt you submit through these embeds. If you have recently created a new account, you should have 3 months of free credits. If you have run out of credits, don't worry, since using these models is very cheap. ChatGPT only costs about $0.02 for every seven thousand words you generate.
Let's learn how to use the embed. Edit the "Type your prompt here" field. This embed is effectively the same as using ChatGPT, except that you cannot have a full conversation. In this course, the embeds are just used to show examples of prompt engineering techniques.
You can see four pieces of information under the Generate button. The left one, 'gpt-3.5-turbo' is the model (gpt-3.5-turbo is the technical name for ChatGPT). The three numbers are LLM settings, which we will learn about in a few articles. If you would like to make your own embed, click the edit this embed button.
These embeds will make it easier for you to learn throughout the course, since you can quickly test your prompts, without clicking into a different tab. However, you do not have to use the embeds if you prefer the ChatGPT interface. Just continue to copy and paste prompts into ChatGPT. If you do intend to use the embeds, write down your API key somewhere, since the OpenAI website only allows you to see it once.
Never tell anyone your API key, since they could charge your account with prompts.