1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/chatgpt.md

29 lines
807 B
Markdown
Raw Normal View History

2023-11-28 15:29:45 +01:00
# chatgpt
> Shell script to use OpenAI's ChatGPT and DALL-E from the terminal.
> More information: <https://github.com/0xacx/chatGPT-shell-cli>.
- Start in chat mode:
`chatgpt`
- Give a prompt to answer to:
2023-11-28 15:29:45 +01:00
`chatgpt {{[-p|--prompt]}} "{{What is the regex to match an email address?}}"`
2023-11-28 15:29:45 +01:00
- Start in chat mode using a specific model (default is `gpt-3.5-turbo`):
2023-11-28 15:29:45 +01:00
`chatgpt {{[-m|--model]}} {{gpt-4}}`
2023-11-28 15:29:45 +01:00
- Start in chat mode with an initial prompt:
2023-11-28 15:29:45 +01:00
`chatgpt {{[-i|--init-prompt]}} "{{You are Rick, from Rick and Morty. Respond to questions using his mannerism and include insulting jokes.}}"`
2023-11-28 15:29:45 +01:00
- Pipe the result of a command to `chatgpt` as a prompt:
`echo "{{How to view running processes on Ubuntu?}}" | chatgpt`
- Generate an image using DALL-E:
`chatgpt {{[-p|--prompt]}} "{{image: A white cat}}"`