Skip to content
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

Updates docs with reset, model lists #254

Merged
merged 14 commits into from
Jul 10, 2023
Next Next commit
Adds clear history documentation
  • Loading branch information
JasonWeill authored and dlqqq committed Jul 10, 2023
commit b84caaf1dec67c3f0bb86de86febb0d446f88fdb
20 changes: 17 additions & 3 deletions docs/source/users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,8 @@ installed in your server's environment. In a notebook, run
and re-run `%load_ext jupyter_ai_magics`.
:::


The `%%ai` magic command is user-friendly and enables you to quickly pick which
model you want to use and specify natural language prompts.
Once the extension has loaded, you can run `%%ai` cell magic commands and
`%ai` line magic commands. Run `%%ai help` or `%ai help` for help with syntax.

### Choosing a provider and model

Expand Down Expand Up @@ -477,6 +476,21 @@ A function that computes the lowest common multiples of two integers, and
a function that runs 5 test cases of the lowest common multiple function
```

### Clearing the OpenAI chat history

With the `openai-chat` provider *only*, you can run a cell magic command using the `-r` or
`--reset` option to clear the chat history. After you do this, past magic commands you've
run with the `openai-chat` provider will no longer be provided as prefix messages in
JasonWeill marked this conversation as resolved.
Show resolved Hide resolved
requests to this provider.

Because the `%%ai` command is a cell magic, you must provide a prompt on the second line.
This prompt will not be sent to the provider. A reset command will not generate any output.

```
%%ai openai-chat:gpt-3.5-turbo -r
reset the chat history
```

### Interpolating in prompts

Using curly brace syntax, you can include variables and other Python expressions in your
Expand Down