https://github.com/berquerant/emacs-openai-chat
Chat completion with emacs
https://github.com/berquerant/emacs-openai-chat
emacs emacs-lisp
Last synced: 4 months ago
JSON representation
Chat completion with emacs
- Host: GitHub
- URL: https://github.com/berquerant/emacs-openai-chat
- Owner: berquerant
- Created: 2023-04-07T15:12:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T18:56:07.000Z (over 1 year ago)
- Last Synced: 2025-03-31T11:30:36.334Z (about 1 year ago)
- Topics: emacs, emacs-lisp
- Language: Emacs Lisp
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# emacs-openai-chat
Chat completion with Emacs.
# Usage
Select region
```
Hello!
```
and `openai-chat-start-region` then you got
```
user>
Hello!
---
assistant>
Hello there! How can I assist you today?
```
in `*openai-chat-N*` buffer. (N = 1, 2, ...)
Append to the buffer:
```
user>
Hello!
---
assistant>
Hello there! How can I assist you today?
---
user>
Do you know ELIZA?
```
and `mark-whole-buffer`, `openai-chat-start-region` then
```
user>
Hello!
---
assistant>
Hello there! How can I assist you today?
---
user>
Do you know ELIZA?
---
assistant>
Yes, ELIZA is a natural language processing program created in the 1960s by MIT professor Joseph Weizenbaum. It was one of the first attempts at creating a chatbot, and it simulated a Rogerian psychotherapist to engage in conversations with people. ELIZA was designed to use pattern matching and scripted responses to simulate a conversation with a human. It was groundbreaking in its time and paved the way for the development of more advanced chatbot technology, which we see today.
```
in the buffer.
# Requirements
## `OPENAI_API_KEY`
The environment variable that contains the api key.
# Customize
## `openai-chat-chat-completion-timeout`
Increase this value if frequent API timeouts occur.
## Others
See `customize`.