Releases: TheR1D/shell_gpt
Release list
1.5.1
What's Changed (minor changes)
- Update litellm integration
- Fix handle empty stream chunks and enforce UTF-8 cache
- Update default model to
gpt-5.4-mini
Full Changelog: 1.5.0...1.5.1
1.5.0
1.5.0
What's Changed
- Migrate to OpenAI v2 package #744
- Add possibility to modify generated shell command in #566 (handy feature)
- Ensure first chat message is retained to prevent "Could not determine chat role" error #633
- Add check for empty choices in response chunks #738
- Removed
instructorpackage from dependencies - LLM function optimisations
Since instructor package was removed from dependencies, note that if you were using function calling before this realease, you would need to re-install default functions sgpt --install-functions and also update your custom functions.
Full Changelog: 1.4.5...1.5.0
1.4.5
What's Changed
- Support all LiteLLM supported models by @abhishekbhakat in #604
- Fix
--show-chatand--replto respect--no-mdby @florian-lnx in #513 - Update Python version requirements and dependencies by @TheR1D in #671
- Fix: Preserve system message in the chat cache by @EmVee381 @TheR1D in #669 #683
New Contributors
- @abhishekbhakat made their first contribution in #604
- @carlsmedstad made their first contribution in #554
- @florian-lnx made their first contribution in #513
- @EmVee381 made their first contribution in #669
Full Changelog: 1.4.4...1.4.5
1.4.4
What's Changed
- Minor fix shell identification by @counterapparatus in #544
- Update default model to gpt-4o by @alissonperez in #580
- Adopt new function calling format, allow function calls on Groq & other models by @tijszwinkels in #569
- Container improvements by @Robinsane in #540
New Contributors
- @counterapparatus made their first contribution in #544
- @alissonperez made their first contribution in #580
- @keidarcy made their first contribution in #539
- @tijszwinkels made their first contribution in #569
- @Robinsane made their first contribution in #540
Full Changelog: 1.4.3...1.4.4
1.4.3
What's Changed
- Bug fixed when parsing config .sgptrc that contains multiple equal "=" symbols #504
- Interuption option when LLM actively generates (stream) response in REPL mode with Ctrl + C #319
- Fixed a bug in function calls which didn’t work properly due to caching #485
Shoutout to all contributors: @keiththomps, @artsparkAI, @save196.
1.4.0
What's Changed
- Added new option
—mdand—no-mdto disable or enable markdown output. - Added new config variable
PRETTIFY_MARKDOWNto disable or enable markdown output by default. - Added new config variable
USE_LITELLMto enforce usage of LiteLLM library.
OpenAI and LiteLLM
Because LiteLLM facilitates requests for numerous other LLM backends, it is heavy to import, adding 1-2 seconds of runtime. ShellGPT, by default will use OpenAI's library, which is suitable for most users. Optionally, ShellGPT can be installed with LiteLLM by running pip install shell-gpt[litellm]. To enforce LiteLLM usage set USE_LITELLM to true in the config file ~/.config/shell_gpt/.sgptrc.
1.3.1
1.3.0
What's Changed
- Ollama and other LLM backends.
- Markdown formatting now depends on role description.
- Code refactoring and optimisation.
Multiple LLM backends
ShellGPT now can work with multiple Backends using LiteLLM. You can use locally hosted open source models which are available for free. To use local models, you will need to run your own LLM backend server such as Ollama. To setup ShellGPT with Ollama, please follow this comprehensive guide. Full list of supported models and providers here. Note that ShellGPT is not optimized for local models and may not work as expected❗️
Markdown formatting
Markdown formatting now depends on the role description. For instance, if the role includes "APPLY MARKDOWN" in its description, the output for this role will be Markdown-formatted. This applies to both default and custom roles. If you would like to disable Markdown formatting, edit the default role description in ~/.config/shell_gpt/roles.
Full Changelog: 1.2.0...1.3.0
1.2.0
- Added
--interactionthat works with--shelloption, e.g.sgpt --shell --no-interactionwill output suggested command to stdout. This is usefull when you want to redirect output to somewhere else. For instancesgpt -s "say hi" | pbcopy. - Fixed issue with stdin and
--shellnot switching to interactive input mode. - REPL mode now can accept stdin or PROMPT argument, or both.
- Changed shell integrations to use new
--no-interactionto generate shell commands. - Moved shell integrations into dedicated file integration.py.
- Changed
--install-integrationlogic, will not download sh script anymore. - Removed validation for PROMPT argument, now will be empty string by default.
- Fixing an issue when
sgptis being called from non-interactive shell environments such as cron tab. - Fixed and optimised Dockerfile.
- GitHub codespaces setup.
- Improved tests.
- README.md improvements.
- New demo video 🐴.
❗️Shell integration logic has been updated, and it will not work with previous version of integration function in ~/.bashrc or ~/.zshrc. Run sgpt --install-integration to apply new changes, and remove old integration function from your shell profile if you were using it before.
ShellGPT.mp4
REPL stdin
REPL mode can now accept stdin, a PROMPT argument, or even both. This is useful when you want to provide some initial context for your prompt.
sgpt --repl temp < my_app.pyEntering REPL mode, press Ctrl+C to exit.
──────────────────────────────────── Input ────────────────────────────────────
name = input("What is your name?")
print(f"Hello {name}")
───────────────────────────────────────────────────────────────────────────────
>>> What is this code about?
The snippet of code you've provided is written in Python. It prompts the user...
>>> Follow up questions...
It is also possible to pass PROMPT to REPL mode sgpt --repl temp "some initial prompt" or even both sgpt --repl temp "initial arg prompt" < text.txt.
Full Changelog: 1.1.0...1.2.0
1.1.0
main_h264_high_bitrate.mov
OpenAI Library
ShellGPT has now integrated the OpenAI Python library for handling API requests. This integration simplifies the development and maintenance of the ShellGPT code base. Additionally, it enhances user experience by providing more user-friendly error messages, complete with descriptions and potential solutions.
Function Calling
Function calls is a powerful feature OpenAI provides. It allows LLM to execute functions in your system, which can be used to accomplish a variety of tasks. ShellGPT has a convenient way to define functions and use them. To install default functions run:
sgpt --install-functionsThis will add a function for LLM to execute shell commands and to execute Apple Scripts (on macOS). More details in demo video and README.md.
Options
- Shortcut option
-cfor—code. - Shortcut option
-lcfor--list-chats - Shortcut option
-lrfor--list-roles - New
—functionsoption, enables/disable function calling. - New
—install-functionsoption, installs default functions.
Config
- New config variable
OPENAI_FUNCTIONS_PATH - New config variable
OPENAI_USE_FUNCTIONS - New config variable
SHOW_FUNCTIONS_OUTPUT
Minor Changes
- Code optimisation
- Cache optimisations for function calls