-
Notifications
You must be signed in to change notification settings - Fork 10.8k
adds examples and readme documentation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent! I left a few very small nits, but overall great starting doc!
Examples and guides for using the OpenAI API. The examples are broken down into high level capabilities, which are further broken down into use case. | ||
# OpenAI Cookbook | ||
|
||
This repository shares example code and example prompts for accomplishing common tasks with the [OpenAI API](https://openai.com/api/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe add something like: "To try these examples yourself, you’ll need an OpenAI account. Create a free account to get started."
README.md
Outdated
|
||
Beyond the code examples here, you can also learn about the [OpenAI API](https://openai.com/api/) from the following resources: | ||
|
||
* Play with GPT-3 in the [OpenAI Playground](https://beta.openai.com/playground) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Play with => Try out
* Read about the API in the [OpenAI Documentation](https://beta.openai.com/docs/introduction) | ||
* Discuss the API in the [OpenAI Community Forum](https://community.openai.com/top?period=monthly) | ||
* Look for help in the [OpenAI Help Center](https://help.openai.com/en/) | ||
* See example prompts in the [OpenAI Examples](https://beta.openai.com/examples) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: People reading this for the first time might not know what a prompt is.
Maybe instead something like "See simple examples in the" ?
README.md
Outdated
* Look for help in the [OpenAI Help Center](https://help.openai.com/en/) | ||
* See example prompts in the [OpenAI Examples](https://beta.openai.com/examples) | ||
|
||
## Code examples, organized by capability |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code examples, organized by capability => ## Examples, organized by capability
README.md
Outdated
|
||
## How large language models work | ||
|
||
Large language models are functions that map text to text. Given an input string of text, a large language model tries to predict the text that will come next. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth linking here to an external place where we explain this in more detail? Maybe GPT-2 blog https://openai.com/blog/better-language-models/
Also maybe a link to example applications built on top of our api? https://openai.com/blog/gpt-3-apps/
README.md
Outdated
### 3. Edit text | ||
|
||
#### Use cases | ||
In addition to the normal [completion API endpoint](https://beta.openai.com/docs/api-reference/completions), OpenAI now offers an [edit API endpoint](https://beta.openai.com/docs/api-reference/edits). In contrast to completions, which only take a single text input, edits take two text inputs: the instruction and the text to be modified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also link to the edit blogpost? https://openai.com/blog/gpt-3-edit-insert/
README.md
Outdated
|
||
Text: | ||
""" | ||
{text} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe create a short example, like you did for the examples prior, and add a sample output for consistency sake?
|
||
Instruction input: | ||
``` | ||
translation into French |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> Translate into French
(probably best to show instructions always grammatical and well capitalized)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, this is the edit endpoint - you might be right that for diffs different guidelines apply
|
||
#### Semantic search | ||
|
||
Embeddings can be used for search either by themselves or as a feature in a larger system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe link to the blog? https://openai.com/blog/introducing-text-and-code-embeddings/
README.md
Outdated
|
||
## Code Capabilities | ||
|
||
Large language models aren't only great at text - they can be great at writing and understanding code too. OpenAI's code model is called Codex and you can read more about it [here](https://openai.com/blog/codex-apps/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in addition maybe also link to the original codex blog? https://openai.com/blog/openai-codex/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also add a sentence regarding codex models not being instruction following, so it needs to rely on few shot examples, or just text completion.
0399194
to
5f03c27
Compare
0c3de0d
to
fbb20da
Compare
Increase readability to chatbot.py
Increase readability to chatbot.py
Update api_request_parallel_processor.py
Add AI code review workflow
No description provided.