Git Product home page Git Product logo

chatgpterminator's Introduction

#include <aboutme.h>

const Programmer me = {
  .name = "Aiden Olsen",
  .contact = "[email protected]",
  .langs = {
    "c", "c++", "rust", 
    "python", "javascript", "typescript",
    "bash"
  },
  .skills = {"git", "mysql", "sqlite", "tableau", "aws"},
  .software = {"neovim", "kicad", "gtkwave"},
  .notable_projects = {
    (Project) {"ChatGPTerminator", "https://github.com/AineeJames/ChatGPTerminator",
      "A convenient way to interact with OpenAI's chat completion and image generation API's using your command line interface."
    },
    (Project) {"rust6502", "https://github.com/AineeJames/rust6502",
      "A 6502 simulator written in the rust programming language with the ability to run compiled 6502 asm."
    },
    (Project) {"ctest.h", "https://github.com/AineeJames/ctest.h",
      "A simple single header only c testing library."
    },
  }
};

int main(void) {
  desribe(me);
  return 0;
}

chatgpterminator's People

Contributors

aineejames avatar wangw469 avatar webgtx avatar wilcockj avatar ykrx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpterminator's Issues

After generating images with !dalle

gpterm crashes with this error

raise PyperclipException(EXCEPT_MSG)
pyperclip.PyperclipException: 
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error 

Won't work with containerization

Well, I'm trying to build container image. And I stuck with this python error, this stderr appears when I'm running your script in container.

STDERR

?main ~/Desktop/devroom/ChatGPTerminator> podman run -it --name gpterm gpterm  
Traceback (most recent call last):
  File "/usr/local/bin/gpterm", line 5, in <module>
    from gpterminator.__main__ import main
  File "/usr/local/lib/python3.9/site-packages/gpterminator/__main__.py", line 1, in <module>
    from . import GPTerminator
  File "/usr/local/lib/python3.9/site-packages/gpterminator/GPTerminator.py", line 168
    match msg["role"]:
          ^
SyntaxError: invalid syntax
exit 1

Dockerfile

FROM python:3.9-alpine
WORKDIR /root
COPY . .
RUN mkdir -p /root/.config/gpterminator
RUN pip install . 
ARG APIKEY
ENV OPENAI_API_KEY=$APIKEY
CMD ["gpterm"]

Error on exit

Hello,

I was playing with the program and ended with 'q'

and on exit the program generated this error:

openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, your messages resulted in 4107 tokens. Please reduce the length of the messages.

Termux issue

Crashed if dalle is used.Image and link is okay.But then it crashes.Copy to clipboard might be the issue.

Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/gpterm", line 8, in <module> sys.exit(main()) ^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gpterminator/__main__.py", line 6, in main app.run() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gpterminator/GPTerminator.py", line 484, in run usr_input = self.queryUser() ^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gpterminator/GPTerminator.py", line 328, in queryUser self.useDalle() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/gpterminator/GPTerminator.py", line 251, in useDalle pyperclip.copy(image_url) File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyperclip/__init__.py", line 659, in lazy_load_stub_copy return copy(text) ^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyperclip/__init__.py", line 336, in __call__ raise PyperclipException(EXCEPT_MSG) pyperclip.PyperclipException: Pyperclip could not find a copy/paste mechanism for your system. For more information, please visit https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error _p9k_worker_invoke:print:5: write error: broken pipe _p9k_worker_invoke:print:5: write error: broken pipe _p9k_worker_invoke:print:5: write error: broken pipe

exit with 'q'

Additionally to the '!quit' command, it would be nice to just exit with 'q', in a vim-like fashion.

This improves usability in case where the user spawn a termimal with gpterm, search something, and inmediatelly exits.
Which often is a repetitive operation.

Input text length is limited to a number of characters

Hi all,

Thanks for this great tool.
I am trying to create some GPT-4 demos but I noticed that when I copy/paste my inout text with length of 4550 characters a big part of gets deleted in the console and only the end stays.
Is it a console behaviour or gpterminator limitation?

Maintained alternatives to ChatGPTerminator

ChatGPTerminator was and is still serve the purpose so well. The only drawback is that most of the issues raised here are left unattended.
There are multiple projects that can actually get the same work done, similar to it or even much better depending on what you concern the most.

Project Info
GPT-CLI Unites Bard and ChatGPT in your console disposal
WebChatGPT Brings ChatGPT's web-version in your console. (No API key required)
Python-tgpt Access multiple LLMs from 50+ providers right from your terminal. No API key required. Just installation and you're good to go.

Note : These projects are actively maintained and any concern raised will be addressed within no time.

WebChatGPT Console Demo

Use up arrow to load previous command

Thanks for the very useful application. Out of habit, I often press the up arrow to load the previous command to make a small edit. Since this doesn't work I have to copy and paste the previous command. Please allow the user to navigate through the command list with the arrow keys.

A similar suggestion, have !{number} load the numbered command on the current line. Perhaps add !history to print a numbered list of all previous commands? I'll stop now :)

Add base URL option

There are various open source models and hosted LLMOps tools that are compatible with the OpenAI API, like LocalAI and Helicone. Langchain has had an option called OPENAI_API_BASE (in python and via an environment variable) for three months. It would be great to be able to use gpt-terminator with these systems!

Installing via PyPi does not create and initialise config.ini

I just installed via PyPi (pip install gpterminator) and was met with an exception.

$ gpterm                                                                                    
Traceback (most recent call last):                                                          
  File "/Users/james/.pyenv/versions/3.10.9/bin/gpterm", line 8, in <module>                
    sys.exit(main())                                                                        
  File "/Users/james/.pyenv/versions/3.10.9/lib/python3.10/site-packages/gpterminator/__main__.py", line 5, in main
    app.run()                                                                               
  File "/Users/james/.pyenv/versions/3.10.9/lib/python3.10/site-packages/gpterminator/GPTerminator.py", line 374, in run
    self.loadConfig()                                                                       
  File "/Users/james/.pyenv/versions/3.10.9/lib/python3.10/site-packages/gpterminator/GPTerminator.py", line 62, in loadConfig
    self.config_selected = config["SELECTED_CONFIG"]["ConfigName"]                          
  File "/Users/james/.pyenv/versions/3.10.9/lib/python3.10/configparser.py", line 964, in __getitem__
    raise KeyError(key)                                                                     
KeyError: 'SELECTED_CONFIG'   

Looking at setup.py, I figured out it was needing ~/.config/gpterminator/config.ini and ~/.config/gpterminator/saves and created those files and populated them according to setup.py, which fixed the issue.

Python: 3.10.9 (NB: I'm using pyenv with 3.10 as my global Python)

Copying results

Thank for this amazing tool, please can you allow highlighting for copying to copy only the texts and not the | lines.

e.g

โ”‚ Hello! How can I assist you today?

should only allow copying

 Hello! How can I assist you today?

The chatgptterminator crashed because of too many requests

openai.error.RateLimitError: That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 691f1c704cab28dd0835be85e87578e3 in your message.)

API Key issue

I registered an API Key and exported the API key with the command provided. Still when I start the program I get this error:

ERROR: Please provide an OPENAI_API_KEY evn varible

export OPENAI_API_KEY=

Feature Request: Add Command to Start New ChatGPT Session

Hi there!

I'm a user of the ChatGPTerminator tool and I've been really impressed with its capabilities so far. However, I've found myself wishing there was a way to start a new ChatGPT session without having to exit the program and start it again.

I was hoping that you might consider adding a new command to the tool that would allow users to easily start a new ChatGPT session within the same program instance.

This could be as simple as adding a command like !start-new-session that would clear the current conversation buffer and start a new session with fresh context.

I think this would be a really helpful addition to the tool and would greatly streamline the workflow for users who want to have multiple conversations without having to constantly restart the program.

Thank you for your consideration!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.