# Introduce the ability to talk to GPT-4 within buffers on preview and dev \(\#2524\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/0b7d095c0a982b9009c616e51153db8488fa88a0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 0b7d095c0a982b9009c616e51153db8488fa88a0

Requested commit: 0b7d095c0a982b9009c616e51153db8488fa88a0

Commit: 0b7d095c0a982b9009c616e51153db8488fa88a0

Tree: 51dd05d68fcda6c22addc6cf5220903137d367c3

Author: Nathan Sobo

Committer: GitHub

## Message

```
Introduce the ability to talk to GPT-4 within buffers on preview and dev (#2524)

This adds basic ability to interact with OpenAI inside a buffer.

Release Notes:

* If`OPENAI_API_KEY` is defined in your environment, you can now run the
`ai: assist` command to pass the text of your current buffer to GPT-4.
If you're editing a file with a `.zmd` extension, you can also invoke
the model with `cmd-enter.` (preview-only)
```

## Parents

- [37d35db3d788381f7c4453381fa22a4539b2c230](https://git.cafe/gitcafe/zed/commit/37d35db3d788381f7c4453381fa22a4539b2c230?format=markdown)

- [26051de160b83fbcfb1d47c2b51cbb36c56b2ffb](https://git.cafe/gitcafe/zed/commit/26051de160b83fbcfb1d47c2b51cbb36c56b2ffb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/0b7d095c0a982b9009c616e51153db8488fa88a0?format=markdown)
