A simple common-line interface for ChatGPT API.
- π Streaming output!
- π‘ One-shot mode to get a quick answer
- π€ Interactive mode to have a conversation
Install latest release version to $HOME/.cargo/bin/
via cargo:
cargo install heygpt
You'll need a OpenAI API key (you can get one here), and you'll need to export your API Key as an environment variable:
You can also set a OpenAI API base environment variable, just like openai-python
export OPENAI_API_KEY=<your api key>
# export OPENAI_API_BASE="https://api.openai.com/v1"
Then you can start an interactive conversation with ChatGPT:
heygpt
OR use the one-shot mode by providing a prompt:
heygpt how to record screen on mac
You can also compose prompt with bash tricks like
heygpt read the code and tell me what it is doing: $(cat src/main.rs)
heygpt read the code diff and write a commit message: $(git diff)
You may need write prompt in multiple lines:
heygpt "please translate this poem to English:
> εΊεζζε
οΌ
> ηζ―ε°δΈιγ
> 举倴ζζζοΌ
> δ½ε€΄ζζ
δΉ‘γ"
Enter \?
to see available commands:
user => \?
Available commands:
\?, \help: Show this help
\b, \back: Retract and back to the last user message
\h, \history: View current conversation history
heygpt's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.