Giter VIP home page Giter VIP logo

chatgpt-repl's Introduction

Hi there ๐Ÿ‘‹

Me in an actual meeting that one time

I'm a London based JavaScript developer that enjoys making curated content on niche topics more easily available. This includes news about Mars and Moon exploration for Twitter and other side projects:

For work, I'm the Technical Integration Manager at Playmob, where we build web games for good causes for brands.

Previously I was a hosting, developer relations and product manager over a long career as an early employee at GameSpy/IGN, where we created online gaming communities and infrastructure for over 1,000 games. Before that, in the stone age of the Internet, I was a web developer at an an agency that built some of the first web sites for major brands on the emerging Web.

Tools I use include React/Next.js, Tailwind, KeystoneJS, Prisma, Serverless Framework/SST, Astro, Tinybird, Retool, Metabase and more.

Latest blog posts:

Sometimes I tweet: @joostschuur (also on Mastodon).

chatgpt-repl's People

Contributors

jschuur avatar

Stargazers

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

Watchers

 avatar

chatgpt-repl's Issues

Feature: Mid-conversation commands

Change settings ($temperature=1.7) or issue actions (!reset or !retry) for the prompt to affect the current session without exiting it.

Feature: Switch between conversations

  • save conversation to config store
  • .conversation command asks if you want to create a new one or switch
    • creates a new one
    • will list previous ones with an inquirer auto-complete prompt if you selected pick
    • alternatively .conversation new or .conversation pick does either right away
  • conversations command to list conversations
  • option/command to keep conversations ephemeral
  • some kind of quick way to toggle between recent ones or by number?

See also: #30.

Feature: Retry command should still work even with a cleared conversation history

For performance reasons, changing the system mid-session clears the conversation history. But this means you can't use the .retry command to rerun a prompt after you used .system (up arrow still works though).

Ideally, save the last prompt separate from the conversation history, so the retry command behaves consistently.

Feature: Template variables for prompts

Set variables and then use them, in a prompt.

Use case: reusing text in similar or related prompts.

  • load variables from a default file or specify a file to use
  • prompt then can interpolate them via curly braces with handlebars
  • command to list current variables\
  • set variable based on all the contents in a file
  • save response to a variable?
  • conversation specific variables?
  • specific system variables like '_prefix' or '_suffix' that are always added to the prompt

Feature: Log conversation to file

From REPL save interactive conversation to a file

  • provide file path in command line option or via command (off by default)
  • optionally append or create file
  • 'raw' formatting option, where it doesn't include prompt or response prefixes ('You', 'ChatGPT').

Feature: Non-interactive mode

Take a prompt from the command line and output only the result with no additional UI/text (suitable to pipe into a file/another script/tool).

Feature: Preserve input history across sessions

Should be able to hit up arrow when starting a new session and get the last text entered.

  • save the readline history to a file and load it back for the next session
  • CLI option to disable this
  • disable if leading space
  • prompt command to enable/disable this
  • set max history buffer size
  • rename .historylength (.conversationlength?) to avoid confusion
  • custom history file location

Feature: Command to set API key

  • .apikey [string] lets you set API during a session.
  • .apikey shows the last 6 digits of the key for security reasons
    • update .settings so it doesn't show the full API key

Feature: Customize REPL prompt

This is the REPL prompt that currently says 'You:'.

Template with variables for settings, usage, time etc.

Also allow this for the startup message?

Feature: Set response language

Is this a 'response in this language' feature or 'translate this exact text to this language'.

May make more sense as an interactive translation feature.

Would just add 'answer in {language}' or 'translate to {language}' to the prompt.

Style: Better formatting of usage summary

  • add commas to token numbers
  • always show at least 2 digits after the decimal points
  • align the currency periods even when it's more than 1 digit before the dollar amount
  • show session usage too

Turn this:

Session cost: $0.0008 (377 tokens)
Total cost:   $10.1 (57619 tokens)

Into:

Session cost: $ 0.0008 (377 tokens)
Total cost:   $10.10   (57,619 tokens)

Feature: Update known/unsupported model list based on API

  • on first use, update the list of models via the apI
  • store this lis in config
  • validate against it when switching models via .model command
  • also periodically (once a week?) update this list
  • .models update command forces an update
  • when you try and switch to an unknown model, remind about .models update` (but still allow it?)

Feature: Automatically output code in responses to files

Ideas:

  • any code snippet in the response gets saved to a file
  • .gpt-output Subdirectory of local folder but default but support override
  • handle file overwriting (date stamped or incrementing version number subdir?)
  • detect file extension if response provides it in the markup
  • one file per code snippet or all in one file? Pick one and have option to change default
  • not on by default, but add .savecode command to do this from the REPL if not on
  • specify default file extension to use (.savecode js)

Feature: Command aliases

  • allow new commands to be defined via a shorthand alias: .alias gpt4 '.model gpt4'.
  • list all aliases
  • read aliases from a local (or global) .chatgpt-repl.json config file.

Feature: Simplify option parsing

I usually use commander, but this time around, add better command line option handling of default values, the help and the version commands by using cac.

Feature: Copy code segment command

If a response contains a code segment, use a commend to copy just that

Use a regexp to extract based on triple backticks?

  • '.copycode' copies all async for async requests
  • review how this might be more complicated for streamed responses (possibly create new issue)
  • Create separate issue for advanced ideas: .copycode 1 copies the first block (use parse-numeric-range)

Related: #32

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.