#GPT-CLI | Bring ChatGPT & Dall-E into your CLI as a specialized personal assistant

14 messages · Page 1 of 1 (latest)

manic ridge
#

GPTCLI

👉 https://github.com/FlorianMgs/gpt-cli

This library provides a UNIX-ey interface to OpenAI.
Say hello to your own highly specialized GPT4 personal assistant, directly in your terminal!
Productivity stonks 📈

Consider 🌟 the repo if you find this tool useful 🔥

Features

  • Use the pipe to pass the output of commands to GPT or Dall-E 2.
  • Choose your GPT model, GPT4 supported if you have access.
  • Dall-E support: generate images directly in your terminal.
  • Contexts prompts tailored for your needs: add/update predefined context prompts or write your own when running the command.
  • Conversation history: have chat sessions with GPT just like https://chat.openai.com/ but in your terminal. However you'll be limited by the token number (which is 4097 for GPT3.5).

Examples

$ gpt give me a very short description of the moon landscape | gpt --dalle
Image saved in current directory to 7db7ab2e8914175d4f4819e033226563.png
$ uptime | gpt convert this to json
{
        "time_of_measurement": "13:48:26",
        "up_time": "30 days, 18:07",
        "users": 3,
        "load_average": [
                0.46,
                0.61,
                0.79
        ]
}
$ gpt -c "you are Vitalik Buterin, the creator of Ethereum. You know very well the whole EVM ecosystem and how to write perfectly optimized Solidity smart contracts" -p "Write a simple ERC20 token smart contract using OpenZeppelin library, respond only by the smart contract, do no write explanations" > erc20.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("MyToken", "MTK") {
        _mint(msg.sender, initialSupply);
    }
}
$ git commit -m "$(git status | gpt write me a commit message for these changes)"
[master 7d0271f] Add new files and modify README.md

See more examples, installation & setup instructions on repo 👍

GitHub

Bring ChatGPT & Dall-E 2 into your CLI as a specialized personal assistant. - GitHub - FlorianMgs/gpt-cli: Bring ChatGPT & Dall-E 2 into your CLI as a specialized personal assistant.

strong merlin
#

I’ve been wondering about something like this recently. Does it work?

manic ridge
#

Of course it works, give it a try!

manic ridge
#

GPT-CLI | Bring ChatGPT & Dall-E into your CLI as a specialized personal assistant

#

Updated!
New features: Dall-E support, conversation history support, more context prompts added 🔥

strong merlin
#

…so with this, I’ll be able to chat naturally with a chatgpt persona of my specification, and then after a couple of weeks, I can say “hey remember when we talked about x?” And it will remember?

flint blade
#

How to upgrade to new version from an older version?

manic ridge
# strong merlin …so with this, I’ll be able to chat naturally with a chatgpt persona of my speci...

Yes. You can use pre-defined personas (gpt_contexts.sample.json) or add your own in the JSON file or with --c argument.
For history, the problem right now is the number of tokens limitation, you can't go above 4097 (conversation history, prompt + response) unless you have access to GPT4 API.
I'll work on that though. If token limit is reached, it could be possible to feed it with context + a certain part of history + your actual prompt

manic ridge
strong merlin
# manic ridge Yes. You can use pre-defined personas (gpt_contexts.sample.json) or add your own...

Whoops! Actually I meant to post that in the ‘c++ chatbot with Infinite memory!” thread. That is really good to know though. In my project, I’m running a chatbot (with just the normal 4096 token limit, but with context) on a raspberry pi. I was considering giving it another raspberry pi all of it’s own to do stuff with. Are they good enough at this that they’ll achieve something useful, or will they end up breaking it, do you think? I am no good with linux and will not be able to help much..

manic ridge
strong merlin
#

Nah, I meant if I just let a gpt character on one pi loose on the command line of the other pi, will they create something awesome on the other pi or just accidentally delete system32 or whatever…

manic ridge
#

Wow didnt thought about this usecase!
Idk, you should try, im really interested to know what would be the results of such an experiment

strong merlin
#

If I ever do it, I will post the results here. I suspect someone will beat me to it though. Some of the project ideas here are insane! 👍