Skip to content

Latest commit

 

History

History
161 lines (126 loc) · 4.98 KB

wiki_en.md

File metadata and controls

161 lines (126 loc) · 4.98 KB

Pandora

Pandora, talking with ChatGPT in command lines, and with more surprises.
Wiki in 中文 »

Demo View · Bug Report · Feature Request

Table of Contents

Make it run

  • Python version no less than 3.7

  • install from pip

    pip install pandora-chatgpt
    pandora
    • gpt-3.5-turbo mode:

      pip install 'pandora-chatgpt[api]'
      // OR
      pip install pandora-chatgpt[api]
      pandora
    • cloud mode:

      pip install 'pandora-chatgpt[cloud]'
      // OR
      pip install pandora-chatgpt[cloud]
      pandora-cloud
  • install from source

    pip install .
    pandora
    • gpt-3.5-turbo mode:

      pip install '.[api]'
      // OR
      pip install .[api]
      pandora
    • cloud mode:

      pip install '.[cloud]'
      // OR
      pip install .[cloud]
      pandora-cloud
  • Docker Hub

    docker pull pengzhile/pandora
    docker run -it --rm pengzhile/pandora
  • Docker build

    docker build -t pandora .
    docker run -it --rm pandora
  • login with your credentials

  • stay simple, stay naive, stay elegant

Start parameters

  • pandora --help for help text.
  • -p or --proxy for setting the proxy. the value should beprotocol://user:pass@ip:port.
  • -t or --token_file for indicating the file that stores Access Token. You will login with access token if this option is in use.
  • -s or --server starts the HTTP server, by which you could open a web page and interact with it in a fancy UI. the value should beip:port.
  • -a or --api use gpt-3.5-turbo API in backend. NOTICE: you will be charged if this option is in use.
  • --tokens_file indicating a file storing multiple Access Tokens. The file content should be like{"key": "token"}.
  • --threads specify the number of server workers, default is 8, and for cloud mode, it is 4.
  • --sentry sending error messages to author for improving Pandora. Sensitive information won't be leaked.
  • -v or --verbose for verbose debugging messages.

Docker

These docker environment variables will override start parameters.

  • PANDORA_ACCESS_TOKEN =Access Token string.
  • PANDORA_TOKENS_FILE = the path of file which keeps Access Tokens.
  • PANDORA_PROXY =protocol://user:pass@ip:port.
  • PANDORA_SERVER =ip:port.
  • PANDORA_API for using gpt-3.5-turbo API. NOTICE: you will be charged if this option is in use.
  • PANDORA_SENTRY for sending error messages to author to improve Pandora. Sensitive information won't be leaked.
  • PANDORA_VERBOSE for verbose debugging messages.

Access Token things

  • no need for proxy if login with Access Token.
  • you could obtain your access token safely with this service.
  • Access Token has a expiration time as 14 days, you could save it and keep using within this period.
  • leaking your Access Token will lead to loss of your account.

HTTP RESTful API

  • if you start Pandora with -s/--server/PANDORA_SERVER, you could access a web UI with http://ip:port.
  • you could switch access token by passing a different one with http://ip:port/?token=xxx.
  • API documents: doc/HTTP-API.md

Commands

  • double Enter to send prompt to ChatGPT.
  • /? for help text.
  • /title for setting the title of current conversation.
  • /select back to conversation choosing page.
  • /reload for refreshing.
  • /regen for regenerating answers if you are not satisfied with the last one.
  • /continue make ChatGPT to append responses.
  • /edit for editing your previous prompt.
  • /new to start a new conversation.
  • /del to delete current conversation and back to conversation choosing page.
  • /token for printing current access token.
  • /copy for copying the last response of ChatGPT to pasteboard.
  • /copy_code for copying the code in the last response of ChatGPT to pasteboard.
  • /clear for cleaning the screen.
  • /version for printing the version of Pandora.
  • /exit to exit Pandora.

Cloud mode

  • setting up a service just like official ChatGPT website. it's so same as only jesus could tell it apart.
  • you need to use pandora-cloud instead of pandora to start Pandora.
  • enabling PANDORA_CLOUD if you are using Docker to start Pandora.
  • Other parameters are same as these guys in normal mode.